Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
175 commits
Select commit Hold shift + click to select a range
d377072
add redis-ui
pd-redis May 7, 2025
3a3696b
add forms/button
pd-redis May 7, 2025
ba385ab
run format
pd-redis May 7, 2025
049a991
add icons
pd-redis May 7, 2025
3c3b65f
add general export
pd-redis May 7, 2025
1832c1a
re-export icons from ui-icons
pd-redis May 7, 2025
e5ed77b
add theme config in themeContext.tsx
pd-redis May 7, 2025
8026a6c
make SecondaryButton.tsx outlined by default
pd-redis May 7, 2025
36e23a1
add EmptyButton.tsx
pd-redis May 7, 2025
e2a9bfe
add key panels
pd-redis May 7, 2025
f580b98
icon button added
pd-redis May 7, 2025
192aa1f
edit json icons
pd-redis May 7, 2025
e9358e0
analysis page
pd-redis May 8, 2025
f1051e2
update font size
pd-redis May 8, 2025
31da78e
DatetimeForm.tsx
pd-redis May 8, 2025
40cbb55
CloudSettings.tsx
pd-redis May 8, 2025
75db002
add play and play filled icons
pd-redis May 8, 2025
52771a4
QueryCardHeader.tsx
pd-redis May 8, 2025
d07d5d2
QueryActions.tsx
pd-redis May 8, 2025
eee47b2
InternalPage.tsx
pd-redis May 8, 2025
aaaa43b
Merge branch 'main' into fe/feature/RI-7039-replace-eui
pd-redis May 12, 2025
6301a55
move all icon imports
pd-redis May 12, 2025
05ef986
checkpoint
pd-redis May 12, 2025
88bfbe9
add db dialog
pd-redis May 12, 2025
4966145
notifications
pd-redis May 12, 2025
226baf2
remove unused imports
pd-redis May 12, 2025
1acb93a
fix ZSetDetails.tsx overflow
pd-redis May 12, 2025
e836924
command helper
pd-redis May 12, 2025
f744afc
refactor window controls
pd-redis May 12, 2025
0f0e74f
checkpoint
pd-redis May 12, 2025
a02015d
stream
pd-redis May 12, 2025
5c04afc
monitor, browser search, connection
pd-redis May 13, 2025
321112b
InstanceHeader.tsx, WbNoResultsMessage.tsx
pd-redis May 13, 2025
735ad96
rdi
pd-redis May 13, 2025
42a16fb
InlineItemEditor.tsx
pd-redis May 13, 2025
6803376
rdi
pd-redis May 13, 2025
4e1f2d3
Merge branch 'main' into fe/feature/RI-7039-replace-eui
pd-redis May 14, 2025
c4045c9
NotFoundErrorPage.tsx
pd-redis May 14, 2025
4937213
update to public packages
pd-redis May 14, 2025
f33e3da
ensure color is supported
pd-redis May 14, 2025
d4ef6ef
connectivity screens
pd-redis May 14, 2025
85ab56d
ConnectivityOptions.tsx
pd-redis May 14, 2025
47ab453
Recommendations.tsx
pd-redis May 14, 2025
0d1e8ee
update vite config
KrumTy May 15, 2025
38a54bb
update jest config
KrumTy May 15, 2025
88c342b
OnboardingStartPopover.tsx
pd-redis May 14, 2025
5775639
CodeButtonBlock.tsx
pd-redis May 15, 2025
b58bb78
RunConfirmationPopover.tsx
pd-redis May 15, 2025
b916a2a
UploadTutorialForm.tsx
pd-redis May 15, 2025
03855eb
RedisUploadButton.tsx
pd-redis May 15, 2025
eaa652e
BulkUpload.tsx
pd-redis May 15, 2025
e78731f
FilterNotAvailable.tsx
pd-redis May 15, 2025
e098586
ModuleNotLoadedButton.tsx
pd-redis May 15, 2025
12f628a
ModuleNotLoadedMinimalized.tsx
pd-redis May 15, 2025
f976c0c
MonacoEditor.tsx
pd-redis May 15, 2025
8c831cb
CloudCapiUnAuthorizedErrorContent.tsx
pd-redis May 15, 2025
822c0e9
InfiniteMessages.tsx
pd-redis May 15, 2025
d24f422
OAuthConnectFreeDb.tsx, RdiDeployErrorContent.tsx, Link.tsx
pd-redis May 15, 2025
78f808d
OAuthSelectAccountDialog.tsx
pd-redis May 15, 2025
51a6f74
OAuthSelectPlan.tsx
pd-redis May 15, 2025
c311f89
OAuthSignInButton.tsx
pd-redis May 15, 2025
12a402b
OAuthAutodiscovery.tsx
pd-redis May 15, 2025
02aa2aa
OAuthCreateDb.tsx
pd-redis May 15, 2025
4893c44
OAuthSsoForm.tsx
pd-redis May 15, 2025
355db6c
InternalLink.tsx, OnboardingTour.tsx
pd-redis May 15, 2025
96a592a
VoteOption.tsx
pd-redis May 15, 2025
f043f43
ScanMore.tsx
pd-redis May 15, 2025
4817dfc
ChatForm.tsx, ErrorMessage.tsx, ExpertChatHeader.tsx
pd-redis May 15, 2025
1d6d38a
RestartChat.tsx
pd-redis May 15, 2025
7ef621e
DeleteTutorialButton.tsx
pd-redis May 15, 2025
3b897fa
PopoverRunAnalyze.tsx
pd-redis May 15, 2025
ba26fac
CopilotTrigger.tsx
pd-redis May 15, 2025
6db7083
RedisCloudDatabasesResult.tsx
pd-redis May 15, 2025
960bcc9
RedisCloudDatabases.tsx
pd-redis May 16, 2025
ba662a9
RedisCloudSubscriptions.tsx
pd-redis May 16, 2025
ee882ea
SentinelDatabasesResult.tsx, SentinelDatabasesResultPage.tsx
pd-redis May 16, 2025
79e5e29
SentinelDatabases.tsx
pd-redis May 16, 2025
ecefce7
BulkDeleteFooter.tsx
pd-redis May 16, 2025
93c5de6
BulkDeleteSummaryButton.tsx
pd-redis May 16, 2025
c9aeaf9
CreateRedisearchIndex.tsx
pd-redis May 16, 2025
c2df435
RI-7051: Replace EuiFieldPassword with PasswordInput (#4552)
KrumTy May 20, 2025
97b2d46
fix Config.spec.tsx
pd-redis May 28, 2025
901d5ec
fic AddKeyList.spec.tsx, AddKeyList.tsx, RdiDeployErrorContent.tsx, R…
pd-redis May 28, 2025
7de2983
fic SentinelDatabasesResultPage.tsx
pd-redis May 28, 2025
6553188
RI-7053: replace EuiFlyout with Drawer (#4582)
KrumTy May 28, 2025
ffda0f7
RI-7054: replace EuiFormRow with FormField (#4585)
KrumTy May 28, 2025
839830c
RI-7052: replace EuiFieldSearch with SearchInput (#4586)
KrumTy May 28, 2025
66a4de2
RI-7056 replace eui health (#4593)
pd-redis May 29, 2025
4f09c94
RI-7045: replace EuiCallOut
pd-redis May 29, 2025
b3ba28e
RI-7044 , RI-7043: EuiButtonEmpty, EuiButtonIcon
pd-redis May 29, 2025
a4ca899
RI-7046: replace EuiCheckbox
pd-redis Jun 4, 2025
5f12ecf
RI-7047: replace eui combo box
pd-redis Jun 4, 2025
0c385bd
RI-7041: replace eui badge
pd-redis Jun 4, 2025
e98b604
RI-7055: replace eui global toast
pd-redis Jun 5, 2025
5fc5800
RI-7070: RI-7072 replace eui text, eui colortext
pd-redis Jun 5, 2025
84a3d21
RI-7050 replace EUI field number with NumericInput (#4607)
dantovska Jun 6, 2025
0b87f59
RI-7048, RI-7049: replace eui menu with redis menu (#4611)
dantovska Jun 9, 2025
4cb33d0
RI-7071: Replace EuiTextArea with TextArea (#4619)
KrumTy Jun 9, 2025
1469bda
replace euitext with colortext
pd-redis Jun 10, 2025
662ee58
RI-7073 replace eui title
pd-redis Jun 10, 2025
bf3ddfe
RI-7068: replace EuiSwitch with SwitchInput (#4622)
KrumTy Jun 16, 2025
384bdff
[RI-7069]: Replace EuiTabs with Tabs (#4625)
KrumTy Jun 16, 2025
62f8a72
RI-7059: Replace EUI Link with Redis Link (#4620)
dantovska Jun 24, 2025
01d6ef4
RI-7060: Replace EUI Loading Spinner with Redis Loader (#4631)
dantovska Jun 24, 2025
debba5d
[RI-7058] Replace EuiInMemoryTable with Table (#4640)
KrumTy Jun 30, 2025
face974
RI-7179: replace eui tour step
pd-redis Jun 30, 2025
1320c70
RI-7063: replace EuiPanel with Card (#4655)
KrumTy Jul 1, 2025
e075507
RI-7066: replace eui radio group and eui SuperSelect, RI-7067 (#4645)
pd-redis Jul 2, 2025
7f0bbd4
remove cx
pd-redis Jul 2, 2025
bd05295
[RI-7074] Replace EuiToolTip with RiTooltip (#4659)
KrumTy Jul 4, 2025
c7bb583
Merge branch 'main' into fe/feature/RI-7039-replace-eui
pd-redis Jul 8, 2025
59650e0
fix errors after main merge
pd-redis Jul 9, 2025
6d9f45f
RI-7040: replace eui accordion
pd-redis Jul 9, 2025
f93a9a7
[RI-7064] Replace EuiPopover with RiPopover (#4671)
KrumTy Jul 10, 2025
e3f0b73
[RI-7074] revert anchorClassName prop usage for RiTooltip (#4710)
KrumTy Jul 10, 2025
0dd6e01
RI-7065: Replace EUI Progress with custom Progress Bar Loader (#4663)
dantovska Jul 13, 2025
483390b
RI-7062: Replace EUI sidebar with Redis SideBar (#4660)
dantovska Jul 14, 2025
4c6983b
Fe/feature/ri 7039 replace eui build fix 2 (#4721)
Jul 15, 2025
a7f885d
RI-7040: replace eui icon
pd-redis Jul 17, 2025
b993a06
[RI-7040] RiIcon refactor (#4727)
KrumTy Jul 18, 2025
9508198
RI-7226: fix RiTooltip when content is empty (#4742)
KrumTy Jul 22, 2025
65736aa
electron upgraded from 33.* to 36.* (#4740)
Jul 22, 2025
2e64134
RI-7212: replace EuiFormFieldset with FormFieldset (#4739)
KrumTy Jul 22, 2025
f08ae61
RI-7226: fix RiTooltip when title/content is empty (#4747)
KrumTy Jul 22, 2025
8416742
RI-7236 replace settings icon (#4745)
dantovska Jul 25, 2025
5c86907
RI-7211: replace eui form
pd-redis Jul 25, 2025
030f3f0
RI-7208 replace eui collapsible nav group
pd-redis Jul 25, 2025
907799f
Remove unused PageBreadcrumbs component (#4746)
pd-redis Jul 25, 2025
a061b08
RI-7228 - key details - space is missing between Add / Cancel (#4761)
Jul 28, 2025
c14102f
RI-7239 - Workbench results - the execution time has a broken layout …
Jul 28, 2025
f1d8528
RI-7030 - on workbench page, the text in the executing queries has br…
Jul 28, 2025
1ccfce9
RI-7210 replace eui file picker
pd-redis Jul 29, 2025
7d34422
Fe/feature/ri 7233 key details on web and full screen do not expand…
Jul 29, 2025
d0997b0
RI-7224 - in messages - ACK / CLAIM buttons need space between (#4769)
Jul 29, 2025
16e5768
RI-7213: replace EuiImage with img tag (#4760)
dantovska Jul 29, 2025
7d4f6bc
RI-7209 - Replace EuiFieldText with Input (#4775)
Jul 30, 2025
3016ee7
RI-7214: Replace EUI loading logo with custom bouncing logo component…
dantovska Jul 31, 2025
31b21bb
RI-7235 new navigation (#4777)
pd-redis Jul 31, 2025
37686f6
RI-7207: Replace RUI Button Group with Redis Button Group (#4773)
dantovska Jul 31, 2025
510f314
RI-7061: Replace EUI Modal (#4749)
dantovska Aug 1, 2025
8bcb187
Fe/feature/ri 7269 fix major discrepancies between the ds previews …
Aug 1, 2025
06e6020
RI-7263: Replace EUI empty prompt (#4778)
dantovska Aug 1, 2025
1e70c67
RI-7252 - RDI-empty-screen-is-missaligned (#4792)
Aug 1, 2025
c355c70
RI-7250 - RDI---the-loading-message-is-not-aligned (#4791)
Aug 1, 2025
36a272b
RI-7249 - RDI---Connection-test-results-are-broken (#4790)
Aug 1, 2025
22d55f1
RI-7248 - RDI---deploy-button-has-broken-styles (#4787)
Aug 1, 2025
579b31c
RI-7244 -Edit-and-remove-buttons-are-not-aligned (#4786)
Aug 4, 2025
bcc8946
RI-7243 capabilities not displayed
pd-redis Aug 4, 2025
a9db370
RI-7223 links should have underline only on hover
pd-redis Aug 4, 2025
8138740
Fe/feature/ri 7252 rdi broken layout for the list of jobs (#4797)
Aug 4, 2025
93ab1e1
RI-7253: make delete buttons same size
pd-redis Aug 4, 2025
bf5aa14
RI-7240 - White-area-below-the-tooltip-in-connection-forms (#4798)
Aug 4, 2025
ed3b7bd
RI-7247: older notifications are displayed
pd-redis Aug 5, 2025
cfb662d
replace some import paths, export RiAccordion from index.ts
pd-redis Aug 5, 2025
386eded
update exports from base/display
pd-redis Aug 5, 2025
3e2e8c7
update exports from base/form
pd-redis Aug 5, 2025
409b34d
update exports from base/input
pd-redis Aug 5, 2025
399349e
update exports from base/layout
pd-redis Aug 5, 2025
cbf0cc9
update exports from base/link
pd-redis Aug 5, 2025
80f533c
update exports from base/popover
pd-redis Aug 5, 2025
2fe7a5c
update exports from base/shared
pd-redis Aug 5, 2025
df924a5
update exports from base/tooltip
pd-redis Aug 5, 2025
da61943
update exports from base/text
pd-redis Aug 5, 2025
5e06bf9
update exports from base
pd-redis Aug 5, 2025
3a380bf
fix tests
pd-redis Aug 6, 2025
11d6fc6
add GlobalStyle theme component
pd-redis Aug 7, 2025
863f668
add a bunch of css props in index.ts
pd-redis Aug 11, 2025
0d8ab0f
Merge branch 'main' into fe/feature/RI-7231-replace-eui-unify-compone…
pd-redis Aug 15, 2025
3eae649
fixing issues
pd-redis Aug 15, 2025
23779ff
fixing issues
pd-redis Aug 18, 2025
f2388dc
remove unused components
pd-redis Aug 18, 2025
5ca1850
Merge branch 'main' into fe/feature/RI-7231-replace-eui-unify-compone…
pd-redis Aug 18, 2025
455379c
fix merge issues
pd-redis Aug 18, 2025
dc9ed52
fix spacer import
pd-redis Aug 18, 2025
9e2833e
Merge branch 'main' into fe/feature/RI-7231-replace-eui-unify-compone…
pd-redis Aug 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22.11.0
22
1 change: 1 addition & 0 deletions jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = {
'\\.scss\\?inline$': '<rootDir>/redisinsight/__mocks__/scssRaw.js',
'uiSrc/slices/store$': '<rootDir>/redisinsight/ui/src/utils/test-store.ts',
'uiSrc/(.*)': '<rootDir>/redisinsight/ui/src/$1',
'uiBase/(.*)': '<rootDir>/redisinsight/ui/src/components/base/$1',
'apiSrc/(.*)': '<rootDir>/redisinsight/api/src/$1',
'@redislabsdev/redis-ui-components': '@redis-ui/components',
'@redislabsdev/redis-ui-styles': '@redis-ui/styles',
Expand Down
1 change: 1 addition & 0 deletions redisinsight/desktop/vite.renderer.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default defineConfig({
alias: {
uiSrc: path.resolve(__dirname, '../ui/src'),
apiSrc: path.resolve(__dirname, '../api/src'),
uiBase: path.resolve(__dirname, '../ui/src/components/base'),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh, nice! ❤️

},
},
optimizeDeps: {
Expand Down
10 changes: 5 additions & 5 deletions redisinsight/ui/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import React, { ReactElement, useEffect } from 'react'
import { Provider, useSelector } from 'react-redux'

import { Route, Switch } from 'react-router-dom'
import { RiPage, RiPageBody } from 'uiBase/layout'
import { store } from 'uiSrc/slices/store'
import { appInfoSelector } from 'uiSrc/slices/app/info'
import { removePagePlaceholder } from 'uiSrc/utils'
import MonacoLanguages from 'uiSrc/components/monaco-laguages'
import AppInit from 'uiSrc/components/init/AppInit'
import { Page, PageBody } from 'uiSrc/components/base/layout/page'
import { Pages, Theme } from './constants'
import { themeService } from './services'
import {
Expand Down Expand Up @@ -59,14 +59,14 @@ const App = ({ children }: { children?: ReactElement[] }) => {
path="*"
render={() => (
<>
<Page className="main">
<RiPage className="main">
<GlobalDialogs />
<GlobalSubscriptions />
<NavigationMenu />
<PageBody component="main">
<RiPageBody component="main">
<MainComponent />
</PageBody>
</Page>
</RiPageBody>
</RiPage>
<Notifications />
<Config />
<ShortcutsFlyout />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import React, { useEffect, useMemo } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { useParams, useHistory } from 'react-router-dom'

import { RiTabs, TabInfo } from 'uiBase/layout'
import { RiText } from 'uiBase/text'
import { Pages } from 'uiSrc/constants'
import { AnalyticsViewTab } from 'uiSrc/slices/interfaces/analytics'
import {
Expand All @@ -18,8 +20,6 @@ import { renderOnboardingTourWithChild } from 'uiSrc/utils/onboarding'
import { OnboardingSteps } from 'uiSrc/constants/onboarding'
import { useConnectionType } from 'uiSrc/components/hooks/useConnectionType'
import { ONBOARDING_FEATURES } from 'uiSrc/components/onboarding-features'
import Tabs, { TabInfo } from 'uiSrc/components/base/layout/tabs'
import { Text } from 'uiSrc/components/base/text'

const AnalyticsTabs = () => {
const { viewTab } = useSelector(analyticsSettingsSelector)
Expand All @@ -46,7 +46,7 @@ const AnalyticsTabs = () => {
value: AnalyticsViewTab.DatabaseAnalysis,
content: null,
label: renderOnboardingTourWithChild(
<Text>Database Analysis</Text>,
<RiText>Database Analysis</RiText>,
{
options: ONBOARDING_FEATURES?.ANALYTICS_DATABASE_ANALYSIS,
anchorPosition: 'downLeft',
Expand All @@ -59,7 +59,7 @@ const AnalyticsTabs = () => {
value: AnalyticsViewTab.SlowLog,
content: null,
label: renderOnboardingTourWithChild(
<Text>Slow Log</Text>,
<RiText>Slow Log</RiText>,
{
options: ONBOARDING_FEATURES?.ANALYTICS_SLOW_LOG,
anchorPosition: 'downLeft',
Expand All @@ -75,7 +75,7 @@ const AnalyticsTabs = () => {
value: AnalyticsViewTab.ClusterDetails,
content: null,
label: renderOnboardingTourWithChild(
<Text>Overview</Text>,
<RiText>Overview</RiText>,
{
options: ONBOARDING_FEATURES?.ANALYTICS_OVERVIEW,
anchorPosition: 'downLeft',
Expand Down Expand Up @@ -105,7 +105,7 @@ const AnalyticsTabs = () => {
}

return (
<Tabs
<RiTabs
tabs={tabs}
value={viewTab}
onChange={handleTabChange}
Expand Down
27 changes: 13 additions & 14 deletions redisinsight/ui/src/components/auto-refresh/AutoRefresh.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import React, { useEffect, useState } from 'react'
import cx from 'classnames'
import { ChevronDownIcon, RefreshIcon } from 'uiSrc/components/base/icons'
import { ChevronDownIcon, RefreshIcon, RiIcon } from 'uiBase/icons'
import { RiIconButton } from 'uiBase/forms'
import { RiColorText } from 'uiBase/text'
import { RiSwitchInput } from 'uiBase/inputs'
import { RiPopover, RiTooltip } from 'uiBase/index'
Comment on lines +3 to +7
Copy link
Collaborator

@KrumTy KrumTy Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

barrel or no barrel imports; mix is a bit confusing imo

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All imports here are barrel imports, the only confising thing for me is why inputs are not part of the forms subtree, but the reallity is that I don't care that much where are things stored

import {
errorValidateRefreshRateNumber,
MIN_REFRESH_RATE,
Expand All @@ -10,11 +14,6 @@ import {
import InlineItemEditor from 'uiSrc/components/inline-item-editor'
import { localStorageService } from 'uiSrc/services'
import { BrowserStorageItem } from 'uiSrc/constants'
import { IconButton } from 'uiSrc/components/base/forms/buttons'
import { ColorText } from 'uiSrc/components/base/text'
import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
import { SwitchInput } from 'uiSrc/components/base/inputs'
import { RiPopover, RiTooltip } from 'uiSrc/components/base'
import {
DEFAULT_REFRESH_RATE,
DURATION_FIRST_REFRESH_TIME,
Expand Down Expand Up @@ -206,7 +205,7 @@ const AutoRefresh = ({
})}
data-testid={getDataTestid('auto-refresh-container')}
>
<ColorText className={styles.summary}>
<RiColorText className={styles.summary}>
{displayText && (
<span data-testid={getDataTestid('refresh-message-label')}>
{enableAutoRefresh ? 'Auto refresh:' : 'Last refresh:'}
Expand All @@ -222,7 +221,7 @@ const AutoRefresh = ({
{` ${enableAutoRefresh ? refreshRateMessage : refreshMessage}`}
</span>
)}
</ColorText>
</RiColorText>

<RiTooltip
title={!disabled && 'Last Refresh'}
Expand All @@ -231,7 +230,7 @@ const AutoRefresh = ({
content={disabled ? disabledRefreshButtonMessage : refreshMessage}
data-testid={getDataTestid('refresh-tooltip')}
>
<IconButton
<RiIconButton
size={iconSize}
icon={RefreshIcon}
disabled={loading || disabled}
Expand All @@ -255,7 +254,7 @@ const AutoRefresh = ({
})}
closePopover={closePopover}
button={
<IconButton
<RiIconButton
disabled={disabled}
size="S"
icon={ChevronDownIcon}
Expand All @@ -268,7 +267,7 @@ const AutoRefresh = ({
/>
}
>
<SwitchInput
<RiSwitchInput
title="Auto Refresh"
checked={enableAutoRefresh}
onCheckedChange={onChangeEnableAutoRefresh}
Expand All @@ -278,7 +277,7 @@ const AutoRefresh = ({
<div className={styles.inputContainer}>
<div className={styles.inputLabel}>Refresh rate:</div>
{!editingRate && (
<ColorText
<RiColorText
color="subdued"
className={styles.refreshRateText}
onClick={() => setEditingRate(true)}
Expand All @@ -288,7 +287,7 @@ const AutoRefresh = ({
<div className={styles.refreshRatePencil}>
<RiIcon type="EditIcon" />
</div>
</ColorText>
</RiColorText>
)}
{editingRate && (
<>
Expand All @@ -307,7 +306,7 @@ const AutoRefresh = ({
onApply={(value) => handleApplyAutoRefreshRate(value)}
/>
</div>
<ColorText color="subdued">{' s'}</ColorText>
<RiColorText color="subdued">{' s'}</RiColorText>
</>
)}
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from 'react'
import { Banner } from '@redis-ui/components'

export type CallOutProps = Omit<React.ComponentProps<typeof Banner>, 'show'> & {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we keep the props with the same name convention as components? A.k.a. RiCallOutProps?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is probably not a bad idea!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

children: React.ReactNode
}

export const RiCallOut = ({ children, ...rest }: CallOutProps) => (
<Banner
{...rest}
show
showIcon={false}
layoutVariant="banner"
message={children}
/>
)
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import React, { ReactNode } from 'react'
import cx from 'classnames'
import {
RiAccordion,
RiAccordionProps,
} from 'uiSrc/components/base/display/accordion/RiAccordion'
import { RiAccordion, RiAccordionProps } from 'uiBase/display'

export type RICollapsibleNavGroupProps = Omit<
export type RiCollapsibleNavGroupProps = Omit<
RiAccordionProps,
'collapsible' | 'content' | 'defaultOpen' | 'title' | 'label'
> & {
Expand All @@ -17,7 +14,7 @@ export type RICollapsibleNavGroupProps = Omit<
onToggle?: (isOpen: boolean) => void
forceState?: 'open' | 'closed'
}
export const RICollapsibleNavGroup = ({
export const RiCollapsibleNavGroup = ({
children,
title,
isCollapsible = true,
Expand All @@ -27,7 +24,7 @@ export const RICollapsibleNavGroup = ({
forceState,
open,
...rest
}: RICollapsibleNavGroupProps) => (
}: RiCollapsibleNavGroupProps) => (
<RiAccordion
{...rest}
collapsible={isCollapsible}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import React from 'react'
import { RiImageProps, StyledImage } from './image.styles'

const RiImage = ({ $size, src, alt, ...rest }: RiImageProps) => (
export const RiImage = ({ $size, src, alt, ...rest }: RiImageProps) => (
<StyledImage src={src} alt={alt} $size={$size} {...rest} />
)

export default RiImage
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default export + a single barrel file that does export { default as RiImage } from ... could resolve the suggested auto import issue

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or just export const ...
why introduce extra files that don't do anything meaningful? Single file per single export ....

28 changes: 18 additions & 10 deletions redisinsight/ui/src/components/base/display/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
import Loader from './loader/Loader'
import ProgressBarLoader from './progress-bar/ProgressBarLoader'
import RiImage from './image/RiImage'
import RiLoadingLogo from './loading-logo/RiLoadingLogo'
import { Modal } from './modal'
export { RiAccordion } from './accordion/RiAccordion'
export type { RiAccordionProps } from './accordion/RiAccordion'
export { RiBadge } from './badge/RiBadge'
export { RiCallOut } from './call-out/RiCallOut'
export { RiCollapsibleNavGroup } from './collapsible-nav-group/RiCollapsibleNavGroup'
export { RiImage } from './image/RiImage'
export { RiLoader } from './loader/RiLoader'
export { RiLoadingLogo } from './loading-logo/RiLoadingLogo'
export { RiModal } from './modal'
export { RiProgressBarLoader } from './progress-bar/RiProgressBarLoader'
export { RiToast, riToast } from './toast/RiToast'
export { RiToaster } from './toast/RiToaster'
export { RiTourStep } from './tour/RiTourStep'
export { RiLink } from './link/RiLink'
export { UserProfileLink } from './link/UserProfileLink'
export * from './popover'
export * from './tooltip'

export { Loader, ProgressBarLoader, RiImage, RiLoadingLogo, Modal }

export { RICollapsibleNavGroup } from './collapsible-nav-group/RICollapsibleNavGroup'

export type { RICollapsibleNavGroupProps } from './collapsible-nav-group/RICollapsibleNavGroup'
export type { RiCollapsibleNavGroupProps } from './collapsible-nav-group/RiCollapsibleNavGroup'
7 changes: 7 additions & 0 deletions redisinsight/ui/src/components/base/display/link/RiLink.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react'
import { LinkProps } from '@redis-ui/components'
import { StyledLink } from './link.styles'

export const RiLink = ({ color, ...props }: LinkProps) => (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow up on the following suggestion https://github.com/redis/RedisInsight/pull/4841/files#r2292865447

Looking at this example, here we don't alter the base interface in any way, but since we're implementing RiComponents as a middle layer between RedisInsight and the outer world, does it make sense to define our own interfaces for each component we wrap?

export interface RiLinkProps extends LinkProps {}

export const RiLink = ({ color, ...props }: RiLinkProps) => (

This way, our codebase will be bound to RiLinkProps and in case we need to switch the components library (once again), we'll do it in a single place (in theory).

Yes, it will look a bit meaningless, but I'm thinking out loud.

<StyledLink {...props} $color={color} />
)
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import styled from "styled-components"
import { useTheme } from "@redis-ui/styles"
import { Link } from "./Link"
import styled from 'styled-components'
import { useTheme } from '@redis-ui/styles'
import { RiLink } from './RiLink'

export const UserProfileLink = styled(Link)`
export const UserProfileLink = styled(RiLink)`
padding: 8px 12px !important;
width: 100%;
color: ${({ theme }: { theme: ReturnType<typeof useTheme> }) =>
Expand All @@ -12,7 +12,7 @@ export const UserProfileLink = styled(Link)`
&:not(:last-child) {
border-bottom: 1px solid
${({ theme }: { theme: ReturnType<typeof useTheme> }) =>
theme.color.gray400};
theme.color.gray400};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like you need to run format on the branch

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

format runs on safe, but will do it again

}

span {
Expand Down
30 changes: 30 additions & 0 deletions redisinsight/ui/src/components/base/display/loader/RiLoader.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import React, { ComponentProps } from 'react'

import { Loader as RedisLoader } from '@redis-ui/components'
import { useTheme, theme } from '@redis-ui/styles'

type Space = typeof theme.core.space

export type RedisLoaderProps = ComponentProps<typeof RedisLoader>

const convertSizeToPx = (tShirtSize: string, space: Space) => {
switch (tShirtSize.toLowerCase()) {
case 's':
return space.space050
case 'm':
return space.space100
case 'l':
return space.space250
case 'xl':
return space.space300
default:
return space.space100
}
}

export const RiLoader = ({ size, ...rest }: RedisLoaderProps) => {
const theme = useTheme()
const { space } = theme.core
const sizeInPx = size ? convertSizeToPx(size, space) : space.space100
return <RedisLoader size={sizeInPx} {...rest} />
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const BouncingLogo = styled.img<RiLoadingLogoProps>`
infinite;
`

const RiLoadingLogo = ({
export const RiLoadingLogo = ({
src,
$size = 'XL',
$bounceSpeed = 1,
Expand All @@ -50,5 +50,3 @@ const RiLoadingLogo = ({
/>
</Wrapper>
)

export default RiLoadingLogo
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { Modal } from '@redis-ui/components'
export { Modal as RiModal } from '@redis-ui/components'
Loading
Loading