diff --git a/redisinsight/ui/src/components/recommendation/content-element/ContentElement.tsx b/redisinsight/ui/src/components/recommendation/content-element/ContentElement.tsx index 43b5cffc19..e41a59b7cd 100644 --- a/redisinsight/ui/src/components/recommendation/content-element/ContentElement.tsx +++ b/redisinsight/ui/src/components/recommendation/content-element/ContentElement.tsx @@ -45,7 +45,7 @@ const ContentElement = (props: Props) => { key={`${telemetryName}-${idx}`} component="div" className={cx(styles.text, { [styles.insights]: insights })} - color="subdued" + color="primary" > {value} @@ -56,7 +56,7 @@ const ContentElement = (props: Props) => { data-testid={`code-${telemetryName}-${idx}`} className={cx(styles.code, { [styles.insights]: insights })} key={`${telemetryName}-${idx}`} - color="subdued" + color="primary" > {value} @@ -66,7 +66,7 @@ const ContentElement = (props: Props) => { { case 'link': return ( ( - <> +
{// eslint-disable-next-line react/no-array-index-key elements?.map((item, idx) => ( ))} - +
) export default RecommendationBody diff --git a/redisinsight/ui/src/components/recommendation/recommendation-copy-component/RecommendationCopyComponent.tsx b/redisinsight/ui/src/components/recommendation/recommendation-copy-component/RecommendationCopyComponent.tsx index 808e23014c..7725c9eeba 100644 --- a/redisinsight/ui/src/components/recommendation/recommendation-copy-component/RecommendationCopyComponent.tsx +++ b/redisinsight/ui/src/components/recommendation/recommendation-copy-component/RecommendationCopyComponent.tsx @@ -1,14 +1,43 @@ import React from 'react' import { useParams } from 'react-router-dom' -import cx from 'classnames' +import styled from 'styled-components' import { bufferToString } from 'uiSrc/utils' import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry' -import { Text, ColorText } from 'uiSrc/components/base/text' +import { Text } from 'uiSrc/components/base/text' import { IconButton } from 'uiSrc/components/base/forms/buttons' import { CopyIcon } from 'uiSrc/components/base/icons' -import styles from './styles.module.scss' +import { FlexGroup } from 'uiSrc/components/base/layout/flex' +import { HorizontalSpacer } from 'uiSrc/components/base/layout' + +const StyledWrapper = styled.div` + margin-top: 15px; +` + +const StyledKeyNameWrapper = styled(FlexGroup)<{ $isDbAnalysis: boolean }>` + margin-top: 5px; + border: 1px dashed ${({ theme }) => theme.semantic.color.border.neutral500}; + border-radius: 4px; + background-color: ${(props) => + props.$isDbAnalysis + ? props.theme.semantic.color.background.neutral100 + : props.theme.semantic.color.background.neutral400}; +` + +const StyledKeyName = styled(Text)` + padding: ${({ theme }) => theme.core.space.space050}; + font: + normal normal normal 13px/16px Graphik, + sans-serif !important; + height: 26px; +` + +const StyledText = styled(Text)` + font: + normal normal normal 13px/16px Graphik, + sans-serif !important; +` export interface IProps { keyName: string @@ -42,30 +71,25 @@ const RecommendationCopyComponent = ({ } return ( -
- - Example of a key that may be relevant: - -
- + Example of a key that may be relevant: + + {formattedName} - + -
-
+ + + ) } diff --git a/redisinsight/ui/src/components/recommendation/recommendation-copy-component/styles.module.scss b/redisinsight/ui/src/components/recommendation/recommendation-copy-component/styles.module.scss deleted file mode 100644 index 0cf8c2daf7..0000000000 --- a/redisinsight/ui/src/components/recommendation/recommendation-copy-component/styles.module.scss +++ /dev/null @@ -1,35 +0,0 @@ -.wrapper { - margin-top: 15px; - - .keyNameWrapper { - margin-top: 4px; - } -} - -.keyNameWrapper { - position: relative; -} - -.keyName { - padding: 4px 30px 4px 8px; - background-color: var(--recommendationsBgColor); - border: 1px dashed var(--separatorColorLight); - border-radius: 4px; - font: normal normal normal 13px/16px Graphik, sans-serif !important; - height: 26px; -} - -.keyName.dbAnalysis { - background-color: var(--euiColorEmptyShade); -} - -.text { - font: normal normal normal 13px/16px Graphik, sans-serif !important; - color: var(--htmlColor); -} - -.btn { - position: absolute; - top: 0; - right: 4px; -} diff --git a/redisinsight/ui/src/components/recommendation/recommendation-voting/RecommendationVoting.tsx b/redisinsight/ui/src/components/recommendation/recommendation-voting/RecommendationVoting.tsx index 6eb9406645..739140e372 100644 --- a/redisinsight/ui/src/components/recommendation/recommendation-voting/RecommendationVoting.tsx +++ b/redisinsight/ui/src/components/recommendation/recommendation-voting/RecommendationVoting.tsx @@ -35,7 +35,7 @@ const RecommendationVoting = ({ gap={live ? 'none' : 'l'} data-testid="recommendation-voting" > - + Is this useful?
diff --git a/redisinsight/ui/src/components/recommendation/recommendation-voting/components/vote-option/VoteOption.tsx b/redisinsight/ui/src/components/recommendation/recommendation-voting/components/vote-option/VoteOption.tsx index cb3d5424a6..ad9d83b441 100644 --- a/redisinsight/ui/src/components/recommendation/recommendation-voting/components/vote-option/VoteOption.tsx +++ b/redisinsight/ui/src/components/recommendation/recommendation-voting/components/vote-option/VoteOption.tsx @@ -14,7 +14,7 @@ import { Nullable } from 'uiSrc/utils' import { Col, FlexItem, Row } from 'uiSrc/components/base/layout/flex' import { Text } from 'uiSrc/components/base/text' -import { CancelSlimIcon } from 'uiSrc/components/base/icons' +import { CancelSlimIcon, Icon } from 'uiSrc/components/base/icons' import { IconButton } from 'uiSrc/components/base/forms/buttons' import { Link } from 'uiSrc/components/base/link/Link' import { RiPopover, RiTooltip } from 'uiSrc/components/base' @@ -49,6 +49,12 @@ const GitHubLink = styled(Link)` } ` +const VotingIconButton = styled(IconButton)` + width: 28px !important; + height: 28px !important; + border-radius: 50%; +` + export interface Props { voteOption: Vote vote?: Nullable @@ -130,7 +136,7 @@ const VoteOption = (props: Props) => { position="bottom" data-testid={`${voteOption}-vote-tooltip`} > - { className={styles.popover} data-testid="insights-db-analysis-popover" > - Run database analysis - - - {popoverContent} + + Run database analysis + + {popoverContent} theme.core.space.space150}; +` + const Recommendations = () => { const { data, loading } = useSelector(dbAnalysisSelector) const { provider } = useSelector(connectedInstanceSelector) @@ -186,7 +191,7 @@ const Recommendations = () => { onOpenChange={(isOpen) => handleToggle(isOpen, id)} data-testid={`${id}-accordion`} > - + { } /> )} - +
diff --git a/redisinsight/ui/src/pages/database-analysis/components/recommendations-view/styles.module.scss b/redisinsight/ui/src/pages/database-analysis/components/recommendations-view/styles.module.scss index 5de8765976..c595e5aaae 100644 --- a/redisinsight/ui/src/pages/database-analysis/components/recommendations-view/styles.module.scss +++ b/redisinsight/ui/src/pages/database-analysis/components/recommendations-view/styles.module.scss @@ -71,10 +71,6 @@ margin-bottom: 6px; padding: 30px 18px 11px; - .accordionContent { - padding: 18px 0 0 !important; - } - .footer { display: flex; align-items: center;