Skip to content

Commit b8af727

Browse files
authored
Ri-7334: icons titles and link handlers
1 parent 2c591be commit b8af727

File tree

29 files changed

+129
-133
lines changed

29 files changed

+129
-133
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22.12.0
1+
22

jest.config.cjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ module.exports = {
2626
'remark-rehype': '<rootDir>/redisinsight/__mocks__/remarkRehype.js',
2727
'rehype-stringify': '<rootDir>/redisinsight/__mocks__/rehypeStringify.js',
2828
'unist-util-visit': '<rootDir>/redisinsight/__mocks__/unistUtilsVisit.js',
29-
'react-children-utilities':
30-
'<rootDir>/redisinsight/__mocks__/react-children-utilities.js',
3129
d3: '<rootDir>/node_modules/d3/dist/d3.min.js',
3230
'^uuid$': require.resolve('uuid'),
3331
msgpackr: require.resolve('msgpackr'),

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@
222222
"tsconfig-paths-webpack-plugin": "^4.1.0",
223223
"typescript": "^4.0.5",
224224
"url-loader": "^4.1.0",
225-
"vite": "^5.4.19",
225+
"vite": "^5.4.20",
226226
"vite-bundle-visualizer": "1.0.1",
227227
"vite-plugin-compression2": "^1.1.0",
228228
"vite-plugin-ejs": "^1.7.0",
@@ -241,10 +241,10 @@
241241
"dependencies": {
242242
"@elastic/datemath": "^5.0.3",
243243
"@elastic/eui": "34.6.0",
244-
"@redis-ui/components": "^38.1.4",
245-
"@redis-ui/icons": "^4.16.1",
246-
"@redis-ui/styles": "^11.4.0",
247-
"@redis-ui/table": "^2.4.0",
244+
"@redis-ui/components": "^39.18.0",
245+
"@redis-ui/icons": "^6.1.1",
246+
"@redis-ui/styles": "^12.9.0",
247+
"@redis-ui/table": "^2.18.0",
248248
"@reduxjs/toolkit": "^1.6.2",
249249
"@stablelib/snappy": "^1.0.2",
250250
"@types/json-dup-key-validator": "^1.0.2",
@@ -276,6 +276,7 @@
276276
"jszip": "^3.10.1",
277277
"lodash": "^4.17.21",
278278
"lz4js": "^0.2.0",
279+
"modern-normalize": "^3.0.1",
279280
"monaco-editor": "^0.48.0",
280281
"monaco-yaml": "^5.1.1",
281282
"msgpackr": "^1.10.1",

redisinsight/ui/index.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
</script>
2727

2828
<style>
29+
#root {
30+
min-height: 100vh;
31+
display: flex;
32+
flex-direction: column;
33+
}
2934
#page-placeholder {
3035
display: flex;
3136
background-color: black;

redisinsight/ui/src/components/base/external-link/ExternalLink.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
import React from 'react'
2-
import { EuiLinkProps } from '@elastic/eui/src/components/link/link'
3-
import { LinkButtonVariants } from '@redis-ui/components'
42
import { IconProps } from 'uiSrc/components/base/icons'
53
import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
6-
import { Link } from 'uiSrc/components/base/link/Link'
4+
import { Link, type LinkProps } from 'uiSrc/components/base/link/Link'
75

8-
export type Props = EuiLinkProps & {
6+
export type Props = LinkProps & {
97
href: string
108
iconPosition?: 'left' | 'right'
119
iconSize?: IconProps['size']
12-
variant?: LinkButtonVariants
10+
variant?: LinkProps['variant']
11+
size?: LinkProps['size']
1312
}
1413

1514
const ExternalLink = (props: Props) => {

redisinsight/ui/src/components/base/forms/checkbox/Checkbox.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ describe('Checkbox', () => {
3535

3636
const checkbox = screen.getByRole('checkbox')
3737
expect(checkbox).toHaveValue('on')
38-
expect(checkbox).toHaveTextContent('Minus')
38+
expect(screen.getByLabelText('Minus')).toBeInTheDocument()
3939
})
4040
})
4141

redisinsight/ui/src/components/base/link/Link.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react'
22
import { LinkProps } from '@redis-ui/components'
3+
export { type LinkProps } from '@redis-ui/components'
34
import { StyledLink } from 'uiSrc/components/base/link/link.styles'
45

56
export const Link = ({ color, ...props }: LinkProps) => (

redisinsight/ui/src/components/base/utils/pluginsThemeContext.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { useLayoutEffect, useState } from 'react'
22
import { ThemeProvider as StyledThemeProvider } from 'styled-components'
3-
import { themeLight, themeDark } from '@redis-ui/styles'
3+
import { CommonStyles, themeLight, themeDark } from '@redis-ui/styles'
4+
import 'modern-normalize/modern-normalize.css'
45
import '@redis-ui/styles/normalized-styles.css'
56
import '@redis-ui/styles/fonts.css'
67

@@ -28,7 +29,10 @@ export const ThemeProvider = ({ children }: Props) => {
2829
}, [theme])
2930
return (
3031
<PluginsThemeContext.Provider value={{ theme }}>
31-
<StyledThemeProvider theme={theme}>{children}</StyledThemeProvider>
32+
<StyledThemeProvider theme={theme}>
33+
<CommonStyles />
34+
{children}
35+
</StyledThemeProvider>
3236
</PluginsThemeContext.Provider>
3337
)
3438
}

redisinsight/ui/src/components/command-helper/CommandHelper/CommandHelper.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ const CommandHelper = (props: Props) => {
4949
href={docUrl}
5050
target="_blank"
5151
data-testid="read-more"
52-
variant="small-inline"
52+
size="S"
53+
variant="inline"
5354
color="primary"
5455
>
5556
Read more

redisinsight/ui/src/components/command-helper/components/command-helper-search-output/CHSearchOutput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ const CHSearchOutput = ({ searchedCommands }: Props) => {
9090
handleClickCommand(e, command)
9191
}}
9292
>
93-
<UnderlineReverseLink color="text" variant="regular">
93+
<UnderlineReverseLink color="text" variant="button">
9494
{command}
9595
</UnderlineReverseLink>
9696
</Text>

0 commit comments

Comments
 (0)