Skip to content

Commit d420f81

Browse files
authored
RI-7554 Rework the actions button on the browser page (#4994)
* fix(ui): rework the actions button on the browser page
1 parent aefda49 commit d420f81

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

redisinsight/ui/src/components/navigation-menu/app-navigation/AppNavigation.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const AppNavigation = ({ actions, onChange }: AppNavigationProps) => {
6262
borderLess
6363
grow={false}
6464
justify="center"
65-
style={{ paddingTop: '20px' }}
65+
style={{ paddingTop: '16px' }}
6666
>
6767
<Tabs.Compose
6868
value={activeTab?.pageName}

redisinsight/ui/src/pages/browser/components/actions/Actions.spec.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ const mockedProps: Props = {
1717
describe('Actions', () => {
1818
it('should render', () => {
1919
expect(render(<Actions {...mockedProps} />)).toBeTruthy()
20+
21+
// Verify the buttons are present
22+
const bulkActionsButton = screen.getByTestId('btn-bulk-actions')
23+
const addKeyButton = screen.getByTestId('btn-add-key')
24+
25+
expect(bulkActionsButton).toBeInTheDocument()
26+
expect(addKeyButton).toBeInTheDocument()
2027
})
2128

2229
it('should show feature dependent items when feature flag is off', async () => {

redisinsight/ui/src/pages/browser/components/actions/Actions.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import {
66
TelemetryEvent,
77
} from 'uiSrc/telemetry'
88
import {
9+
EmptyButton,
910
SecondaryButton,
1011
} from 'uiSrc/components/base/forms/buttons'
11-
import styles from 'uiSrc/pages/browser/components/browser-search-panel/styles.module.scss'
1212
import { setBulkActionType } from 'uiSrc/slices/browser/bulkActions'
1313
import { BulkActionsType, FeatureFlags } from 'uiSrc/constants'
1414
import { SubscriptionsIcon } from 'uiSrc/components/base/icons'
@@ -46,28 +46,29 @@ const Actions = ({ handleAddKeyPanel, handleBulkActionsPanel }: Props) => {
4646
onClick={openAddKeyPanel}
4747
data-testid="btn-add-key"
4848
>
49-
+ <span className={styles.addKeyText}>Key</span>
49+
Add key
5050
</SecondaryButton>
5151
)
5252
const openBulkActions = () => {
5353
dispatch(setBulkActionType(BulkActionsType.Delete))
5454
handleBulkActionsPanel(true)
5555
}
5656
const BulkActionsBtn = (
57-
<SecondaryButton
57+
<EmptyButton
5858
color="secondary"
5959
icon={SubscriptionsIcon}
6060
onClick={openBulkActions}
6161
data-testid="btn-bulk-actions"
6262
aria-label="bulk actions"
6363
>
64-
Bulk Actions
65-
</SecondaryButton>
64+
Bulk actions
65+
</EmptyButton>
6666
)
6767
return (
6868
<Row
6969
grow={false}
7070
gap="m"
71+
align="center"
7172
style={{
7273
flexShrink: 0,
7374
marginLeft: 12,

0 commit comments

Comments
 (0)