Skip to content

Commit dd3e7e3

Browse files
committed
#RI-4982 - remove highlighting
1 parent a6921f9 commit dd3e7e3

File tree

3 files changed

+4
-44
lines changed

3 files changed

+4
-44
lines changed

redisinsight/ui/src/constants/featuresHighlighting.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,5 @@ interface BuildHighlightingFeature {
1212
}
1313

1414
export const BUILD_FEATURES: Record<string, BuildHighlightingFeature> = {
15-
cloudButton: {
16-
type: 'plain'
17-
}
15+
1816
} as const

redisinsight/ui/src/pages/home/components/HomeHeader/HomeHeader.tsx

Lines changed: 3 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
EuiToolTip,
1010
} from '@elastic/eui'
1111
import { isEmpty } from 'lodash'
12-
import { useDispatch, useSelector } from 'react-redux'
12+
import { useSelector } from 'react-redux'
1313
import cx from 'classnames'
1414
import { FeatureFlagComponent, ImportDatabasesDialog, OAuthSsoHandlerDialog } from 'uiSrc/components'
1515
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
@@ -25,10 +25,7 @@ import { OAuthSocialSource } from 'uiSrc/slices/interfaces'
2525
import { FeatureFlags } from 'uiSrc/constants'
2626
import { ReactComponent as ConfettiIcon } from 'uiSrc/assets/img/oauth/confetti.svg'
2727
import { getContentByFeature } from 'uiSrc/utils/content'
28-
import HighlightedFeature from 'uiSrc/components/hightlighted-feature/HighlightedFeature'
29-
import { appFeatureFlagsFeaturesSelector, appFeatureHighlightingSelector, removeFeatureFromHighlighting } from 'uiSrc/slices/app/features'
30-
import { getHighlightingFeatures } from 'uiSrc/utils/highlighting'
31-
import { BUILD_FEATURES } from 'uiSrc/constants/featuresHighlighting'
28+
import { appFeatureFlagsFeaturesSelector } from 'uiSrc/slices/app/features'
3229
import SearchDatabasesList from '../SearchDatabasesList'
3330

3431
import styles from './styles.module.scss'
@@ -46,15 +43,11 @@ const HomeHeader = ({ onAddInstance, direction }: Props) => {
4643
const { data: instances } = useSelector(instancesSelector)
4744
const featureFlags = useSelector(appFeatureFlagsFeaturesSelector)
4845
const { loading, data } = useSelector(contentSelector)
49-
const { features } = useSelector(appFeatureHighlightingSelector)
50-
const { cloudButton: cloudButtonHighlighting } = getHighlightingFeatures(features)
5146

5247
const [promoData, setPromoData] = useState<ContentCreateRedis>()
5348
const [guides, setGuides] = useState<IHelpGuide[]>([])
5449
const [isImportDialogOpen, setIsImportDialogOpen] = useState<boolean>(false)
5550

56-
const dispatch = useDispatch()
57-
5851
useEffect(() => {
5952
if (loading || !data || isEmpty(data)) {
6053
return
@@ -183,7 +176,7 @@ const HomeHeader = ({ onAddInstance, direction }: Props) => {
183176
const { title, description, styles: stylesCss, links } = content
184177
// @ts-ignore
185178
const linkStyles = stylesCss ? stylesCss[theme] : {}
186-
const promoLink = (
179+
return (
187180
<OAuthSsoHandlerDialog>
188181
{(ssoCloudHandlerClick, isSSOEnabled) => (
189182
<PromoLink
@@ -209,32 +202,6 @@ const HomeHeader = ({ onAddInstance, direction }: Props) => {
209202
)}
210203
</OAuthSsoHandlerDialog>
211204
)
212-
return (
213-
<FeatureFlagComponent name={FeatureFlags.cloudSso} otherwise={promoLink}>
214-
<HighlightedFeature
215-
isHighlight={cloudButtonHighlighting}
216-
type={BUILD_FEATURES?.cloudButton?.type}
217-
onClick={() => dispatch(removeFeatureFromHighlighting('cloudButton'))}
218-
>
219-
<EuiToolTip
220-
position="bottom"
221-
anchorClassName={styles.cloudSsoPromoBtnAnchor}
222-
content={(
223-
<div className={styles.cloudSsoPromoTooltip}>
224-
<EuiIcon type={ConfettiIcon} className={styles.cloudSsoPromoTooltipIcon} />
225-
<div>
226-
New!
227-
<br />
228-
Now you can create a free Redis Stack database in Redis Enterprise Cloud in a few clicks.
229-
</div>
230-
</div>
231-
)}
232-
>
233-
{promoLink}
234-
</EuiToolTip>
235-
</HighlightedFeature>
236-
</FeatureFlagComponent>
237-
)
238205
}
239206

240207
return (

redisinsight/ui/src/pages/home/components/HomeHeader/styles.module.scss

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,6 @@
138138
}
139139
}
140140

141-
.cloudSsoPromoBtnAnchor {
142-
position: relative;
143-
display: flex !important;
144-
max-width: 348px;
145-
}
146141
.cloudSsoPromoTooltip {
147142
display: flex;
148143
flex-direction: row;

0 commit comments

Comments
 (0)