diff --git a/lang/en_US.json b/lang/en_US.json index 9e9cb336d2..4f264f8dd9 100644 --- a/lang/en_US.json +++ b/lang/en_US.json @@ -511,5 +511,6 @@ "We're excited to have you here! We know you might have some questions about hardcore mode, RetroPoints (white points), subsets, or which emulators to use. Don't worry, we've got you covered! Check out our <1>comprehensive FAQ to get started. Happy gaming!": "We're excited to have you here! We know you might have some questions about hardcore mode, RetroPoints (white points), subsets, or which emulators to use. Don't worry, we've got you covered! Check out our <1>comprehensive FAQ to get started. Happy gaming!", "Getting Started": "Getting Started", "Moderation Comments - {{user}}": "Moderation Comments - {{user}}", - "Moderation Comments": "Moderation Comments" + "Moderation Comments": "Moderation Comments", + "Columns": "Columns" } \ No newline at end of file diff --git a/resources/js/features/game-list/components/AllGamesMainRoot/AllGamesMainRoot.test.tsx b/resources/js/features/game-list/components/AllGamesMainRoot/AllGamesMainRoot.test.tsx index 6575720830..65b749a673 100644 --- a/resources/js/features/game-list/components/AllGamesMainRoot/AllGamesMainRoot.test.tsx +++ b/resources/js/features/game-list/components/AllGamesMainRoot/AllGamesMainRoot.test.tsx @@ -240,7 +240,7 @@ describe('Component: AllGamesMainRoot', () => { }); // ACT - await userEvent.click(screen.getByRole('button', { name: /view/i })); + await userEvent.click(screen.getByRole('button', { name: /columns/i })); await userEvent.click(screen.getByRole('menuitemcheckbox', { name: /points/i })); // ASSERT @@ -260,7 +260,7 @@ describe('Component: AllGamesMainRoot', () => { }); // ACT - await userEvent.click(screen.getByRole('button', { name: /view/i })); + await userEvent.click(screen.getByRole('button', { name: /columns/i })); // ASSERT expect( @@ -281,7 +281,7 @@ describe('Component: AllGamesMainRoot', () => { }); // ACT - await userEvent.click(screen.getByRole('button', { name: /view/i })); + await userEvent.click(screen.getByRole('button', { name: /columns/i })); await userEvent.click(screen.getByRole('menuitemcheckbox', { name: /tickets/i })); // ASSERT @@ -318,7 +318,7 @@ describe('Component: AllGamesMainRoot', () => { }); // ACT - await userEvent.click(screen.getByRole('button', { name: /view/i })); + await userEvent.click(screen.getByRole('button', { name: /columns/i })); await userEvent.click(screen.getByRole('menuitemcheckbox', { name: /tickets/i })); // ASSERT @@ -626,7 +626,7 @@ describe('Component: AllGamesMainRoot', () => { }); // ACT - await userEvent.click(screen.getByRole('button', { name: /view/i })); + await userEvent.click(screen.getByRole('button', { name: /columns/i })); await userEvent.click(screen.getByRole('menuitemcheckbox', { name: /claimed/i })); await userEvent.click(screen.getByTestId('column-header-Claimed')); diff --git a/resources/js/features/game-list/components/DataTableViewOptions/DataTableViewOptions.tsx b/resources/js/features/game-list/components/DataTableColumnsToggle/DataTableColumnsToggle.tsx similarity index 90% rename from resources/js/features/game-list/components/DataTableViewOptions/DataTableViewOptions.tsx rename to resources/js/features/game-list/components/DataTableColumnsToggle/DataTableColumnsToggle.tsx index 89876db780..713b19eb08 100644 --- a/resources/js/features/game-list/components/DataTableViewOptions/DataTableViewOptions.tsx +++ b/resources/js/features/game-list/components/DataTableColumnsToggle/DataTableColumnsToggle.tsx @@ -12,11 +12,11 @@ import { BaseDropdownMenuTrigger, } from '@/common/components/+vendor/BaseDropdownMenu'; -interface DataTableViewOptionsProps { +interface DataTableColumnsToggleProps { table: Table; } -export function DataTableViewOptions({ table }: DataTableViewOptionsProps) { +export function DataTableColumnsToggle({ table }: DataTableColumnsToggleProps) { const { t } = useTranslation(); return ( @@ -24,7 +24,7 @@ export function DataTableViewOptions({ table }: DataTableViewOptionsProps - {t('View')} + {t('Columns')} diff --git a/resources/js/features/game-list/components/DataTableColumnsToggle/index.ts b/resources/js/features/game-list/components/DataTableColumnsToggle/index.ts new file mode 100644 index 0000000000..b040ba51d6 --- /dev/null +++ b/resources/js/features/game-list/components/DataTableColumnsToggle/index.ts @@ -0,0 +1 @@ +export * from './DataTableColumnsToggle'; diff --git a/resources/js/features/game-list/components/DataTableToolbar/DataTableDesktopToolbar.tsx b/resources/js/features/game-list/components/DataTableToolbar/DataTableDesktopToolbar.tsx index fbc63536e7..d1b9911a1f 100644 --- a/resources/js/features/game-list/components/DataTableToolbar/DataTableDesktopToolbar.tsx +++ b/resources/js/features/game-list/components/DataTableToolbar/DataTableDesktopToolbar.tsx @@ -6,9 +6,9 @@ import { usePageProps } from '@/common/hooks/usePageProps'; import { doesColumnExist } from '../../utils/doesColumnExist'; import { getAreNonDefaultFiltersSet } from '../../utils/getAreNonDefaultFiltersSet'; +import { DataTableColumnsToggle } from '../DataTableColumnsToggle'; import { DataTableResetFiltersButton } from '../DataTableResetFiltersButton'; import { DataTableSearchInput } from '../DataTableSearchInput'; -import { DataTableViewOptions } from '../DataTableViewOptions'; import { DataTableAchievementsPublishedFilter } from './DataTableAchievementsPublishedFilter'; import { DataTableProgressFilter } from './DataTableProgressFilter'; import { DataTableSystemFilter } from './DataTableSystemFilter'; @@ -100,7 +100,7 @@ export function DataTableDesktopToolbar({ disabled={table.getRowCount() === 0} /> - + diff --git a/resources/js/features/game-list/components/DataTableViewOptions/index.ts b/resources/js/features/game-list/components/DataTableViewOptions/index.ts deleted file mode 100644 index 122358e026..0000000000 --- a/resources/js/features/game-list/components/DataTableViewOptions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './DataTableViewOptions'; diff --git a/resources/js/features/game-list/components/HubMainRoot/HubMainRoot.test.tsx b/resources/js/features/game-list/components/HubMainRoot/HubMainRoot.test.tsx index c59fe3d701..95144ad050 100644 --- a/resources/js/features/game-list/components/HubMainRoot/HubMainRoot.test.tsx +++ b/resources/js/features/game-list/components/HubMainRoot/HubMainRoot.test.tsx @@ -263,7 +263,7 @@ describe('Component: HubMainRoot', () => { }); // ACT - await userEvent.click(screen.getByRole('button', { name: /view/i })); + await userEvent.click(screen.getByRole('button', { name: /columns/i })); await userEvent.click(screen.getByRole('menuitemcheckbox', { name: /points/i })); // ASSERT @@ -287,7 +287,7 @@ describe('Component: HubMainRoot', () => { }); // ACT - await userEvent.click(screen.getByRole('button', { name: /view/i })); + await userEvent.click(screen.getByRole('button', { name: /columns/i })); // ASSERT expect( @@ -312,7 +312,7 @@ describe('Component: HubMainRoot', () => { }); // ACT - await userEvent.click(screen.getByRole('button', { name: /view/i })); + await userEvent.click(screen.getByRole('button', { name: /columns/i })); await userEvent.click(screen.getByRole('menuitemcheckbox', { name: /tickets/i })); // ASSERT @@ -353,7 +353,7 @@ describe('Component: HubMainRoot', () => { }); // ACT - await userEvent.click(screen.getByRole('button', { name: /view/i })); + await userEvent.click(screen.getByRole('button', { name: /columns/i })); await userEvent.click(screen.getByRole('menuitemcheckbox', { name: /tickets/i })); // ASSERT @@ -710,7 +710,7 @@ describe('Component: HubMainRoot', () => { }); // ACT - await userEvent.click(screen.getByRole('button', { name: /view/i })); + await userEvent.click(screen.getByRole('button', { name: /columns/i })); await userEvent.click(screen.getByRole('menuitemcheckbox', { name: /claimed/i })); await userEvent.click(screen.getByTestId('column-header-Claimed')); diff --git a/resources/js/features/game-list/components/SystemGamesMainRoot/SystemGamesMainRoot.test.tsx b/resources/js/features/game-list/components/SystemGamesMainRoot/SystemGamesMainRoot.test.tsx index e4e94a00c6..8440072eb4 100644 --- a/resources/js/features/game-list/components/SystemGamesMainRoot/SystemGamesMainRoot.test.tsx +++ b/resources/js/features/game-list/components/SystemGamesMainRoot/SystemGamesMainRoot.test.tsx @@ -251,7 +251,7 @@ describe('Component: SystemGamesMainRoot', () => { }); // ACT - await userEvent.click(screen.getByRole('button', { name: /view/i })); + await userEvent.click(screen.getByRole('button', { name: /columns/i })); await userEvent.click(screen.getByRole('menuitemcheckbox', { name: /points/i })); // ASSERT @@ -272,7 +272,7 @@ describe('Component: SystemGamesMainRoot', () => { }); // ACT - await userEvent.click(screen.getByRole('button', { name: /view/i })); + await userEvent.click(screen.getByRole('button', { name: /columns/i })); // ASSERT expect( @@ -294,7 +294,7 @@ describe('Component: SystemGamesMainRoot', () => { }); // ACT - await userEvent.click(screen.getByRole('button', { name: /view/i })); + await userEvent.click(screen.getByRole('button', { name: /columns/i })); await userEvent.click(screen.getByRole('menuitemcheckbox', { name: /tickets/i })); // ASSERT @@ -332,7 +332,7 @@ describe('Component: SystemGamesMainRoot', () => { }); // ACT - await userEvent.click(screen.getByRole('button', { name: /view/i })); + await userEvent.click(screen.getByRole('button', { name: /columns/i })); await userEvent.click(screen.getByRole('menuitemcheckbox', { name: /tickets/i })); // ASSERT @@ -603,7 +603,7 @@ describe('Component: SystemGamesMainRoot', () => { }); // ACT - await userEvent.click(screen.getByRole('button', { name: /view/i })); + await userEvent.click(screen.getByRole('button', { name: /columns/i })); await userEvent.click(screen.getByRole('menuitemcheckbox', { name: /claimed/i })); await userEvent.click(screen.getByTestId('column-header-Claimed')); diff --git a/resources/js/features/game-list/components/WantToPlayGamesMainRoot/WantToPlayGamesMainRoot.test.tsx b/resources/js/features/game-list/components/WantToPlayGamesMainRoot/WantToPlayGamesMainRoot.test.tsx index a136f959b8..24fd985b28 100644 --- a/resources/js/features/game-list/components/WantToPlayGamesMainRoot/WantToPlayGamesMainRoot.test.tsx +++ b/resources/js/features/game-list/components/WantToPlayGamesMainRoot/WantToPlayGamesMainRoot.test.tsx @@ -204,7 +204,7 @@ describe('Component: WantToPlayGamesMainRoot', () => { }); // ACT - await userEvent.click(screen.getByRole('button', { name: /view/i })); + await userEvent.click(screen.getByRole('button', { name: /columns/i })); await userEvent.click(screen.getByRole('menuitemcheckbox', { name: /points/i })); // ASSERT @@ -224,7 +224,7 @@ describe('Component: WantToPlayGamesMainRoot', () => { }); // ACT - await userEvent.click(screen.getByRole('button', { name: /view/i })); + await userEvent.click(screen.getByRole('button', { name: /columns/i })); // ASSERT expect( @@ -245,7 +245,7 @@ describe('Component: WantToPlayGamesMainRoot', () => { }); // ACT - await userEvent.click(screen.getByRole('button', { name: /view/i })); + await userEvent.click(screen.getByRole('button', { name: /columns/i })); await userEvent.click(screen.getByRole('menuitemcheckbox', { name: /tickets/i })); // ASSERT @@ -282,7 +282,7 @@ describe('Component: WantToPlayGamesMainRoot', () => { }); // ACT - await userEvent.click(screen.getByRole('button', { name: /view/i })); + await userEvent.click(screen.getByRole('button', { name: /columns/i })); await userEvent.click(screen.getByRole('menuitemcheckbox', { name: /tickets/i })); // ASSERT @@ -589,7 +589,7 @@ describe('Component: WantToPlayGamesMainRoot', () => { }); // ACT - await userEvent.click(screen.getByRole('button', { name: /view/i })); + await userEvent.click(screen.getByRole('button', { name: /columns/i })); await userEvent.click(screen.getByRole('menuitemcheckbox', { name: /claimed/i })); await userEvent.click(screen.getByTestId('column-header-Claimed'));