Skip to content

Commit 7c716e2

Browse files
committed
💬 fix command name, 'Show/Hide Al' to 'Show/Hide All Tables' to avoid confusion with 'Show All Fields' command
1 parent 56af585 commit 7c716e2

File tree

4 files changed

+15
-16
lines changed

4 files changed

+15
-16
lines changed

‎.changeset/breezy-yaks-arrive.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"@liam-hq/erd-core": patch
33
---
44

5-
- ✨ Add "Show All" and "Hide All" table visibility shortcuts and options in CommandPalette
6-
- Command Palette: new "Show All" and "Hide All" commands
7-
- Subscribe shortcuts: ⇧A for "Show All" and ⇧H for "Hide All"
5+
- ✨ Add "Show All Tables" and "Hide All Tables" table visibility shortcuts and options in CommandPalette
6+
- Command Palette: new "Show All Tables" and "Hide All Tables" commands
7+
- Subscribe shortcuts: ⇧A for "Show All Tables" and ⇧H for "Hide All Tables"

‎frontend/packages/erd-core/src/features/erd/components/ERDRenderer/CommandPalette/CommandPaletteOptions/CommandOptions.test.tsx‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ it('renders options with descriptions', async () => {
5050
})
5151

5252
describe('show/hide all tables options', () => {
53-
it('shows "Show All" option and hide "Hide all" option when all tables are hidden', () => {
53+
it('shows "Show All Tables " option and hide "Hide All Tables" option when all tables are hidden', () => {
5454
mockDefaultNodes.mockReturnValueOnce([
5555
{
5656
id: '1',
@@ -71,14 +71,14 @@ describe('show/hide all tables options', () => {
7171
render(<CommandPaletteCommandOptions />, { wrapper })
7272

7373
expect(
74-
screen.getByRole('option', { name: 'Show All ⇧ A' }),
74+
screen.getByRole('option', { name: 'Show All Tables ⇧ A' }),
7575
).toBeInTheDocument()
7676
expect(
77-
screen.queryByRole('option', { name: 'Hide All ⇧ H' }),
77+
screen.queryByRole('option', { name: 'Hide All Tables ⇧ H' }),
7878
).not.toBeInTheDocument()
7979
})
8080

81-
it('shows "Hide All" option and hide "Show all" option when all tables are visible', () => {
81+
it('shows "Hide All Tables" option and hide "Show All Tables" option when all tables are visible', () => {
8282
mockDefaultNodes.mockReturnValueOnce([
8383
{
8484
id: '1',
@@ -99,14 +99,14 @@ describe('show/hide all tables options', () => {
9999
render(<CommandPaletteCommandOptions />, { wrapper })
100100

101101
expect(
102-
screen.queryByRole('option', { name: 'Show All ⇧ A' }),
102+
screen.queryByRole('option', { name: 'Show All Tables ⇧ A' }),
103103
).not.toBeInTheDocument()
104104
expect(
105-
screen.getByRole('option', { name: 'Hide All ⇧ H' }),
105+
screen.getByRole('option', { name: 'Hide All Tables ⇧ H' }),
106106
).toBeInTheDocument()
107107
})
108108

109-
it('shows both "Show All" and "Hide All" options when some tables are visible and the others are hidden', () => {
109+
it('shows both "Show All Tables" and "Hide All Tables" options when some tables are visible and the others are hidden', () => {
110110
mockDefaultNodes.mockReturnValueOnce([
111111
{
112112
id: '1',
@@ -127,10 +127,10 @@ describe('show/hide all tables options', () => {
127127
render(<CommandPaletteCommandOptions />, { wrapper })
128128

129129
expect(
130-
screen.getByRole('option', { name: 'Show All ⇧ A' }),
130+
screen.getByRole('option', { name: 'Show All Tables ⇧ A' }),
131131
).toBeInTheDocument()
132132
expect(
133-
screen.getByRole('option', { name: 'Hide All ⇧ H' }),
133+
screen.getByRole('option', { name: 'Hide All Tables ⇧ H' }),
134134
).toBeInTheDocument()
135135
})
136136
})

‎frontend/packages/erd-core/src/features/erd/components/ERDRenderer/CommandPalette/CommandPaletteOptions/CommandOptions.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export const CommandPaletteCommandOptions: FC = () => {
117117
}}
118118
>
119119
<Eye className={styles.itemIcon} />
120-
<span className={styles.itemText}>Show All</span>
120+
<span className={styles.itemText}>Show All Tables</span>
121121
<span className={styles.keyIcon}>⇧</span>
122122
<span className={styles.keyIcon}>A</span>
123123
</Command.Item>
@@ -132,7 +132,7 @@ export const CommandPaletteCommandOptions: FC = () => {
132132
}}
133133
>
134134
<EyeOff className={styles.itemIcon} />
135-
<span className={styles.itemText}>Hide All</span>
135+
<span className={styles.itemText}>Hide All Tables</span>
136136
<span className={styles.keyIcon}>⇧</span>
137137
<span className={styles.keyIcon}>H</span>
138138
</Command.Item>

‎frontend/packages/erd-core/src/features/erd/components/ERDRenderer/CommandPalette/CommandPalettePreview/CommandPreview.tsx‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ type Props = {
55
commandName: string
66
}
77

8-
// TODO: set gif or image for "Show All" and "Hide All" commands
9-
8+
// TODO: set gif or image for "Show All Table" and "Hide All Table" commands
109
const COMMAND_VIDEO_SOURCE: Record<string, string> = {
1110
'copy link':
1211
'https://assets.liambx.com/erd-core/2025-09-01/videos/copy-link.mp4',

0 commit comments

Comments
 (0)