From 634f838b562f95d14e1abe10a2c12baaa584731a Mon Sep 17 00:00:00 2001 From: andreastanderen <71079896+standeren@users.noreply.github.com> Date: Mon, 16 Dec 2024 07:20:01 +0100 Subject: [PATCH] refactor: add 'page' suffix to the library page components (#14279) Co-authored-by: Tomas Engebretsen --- .../appContentLibrary/AppContentLibrary.test.tsx | 4 ++-- .../LibraryBody/pages/CodeList/index.ts | 2 -- .../CodeListPage.module.css} | 0 .../CodeListPage.test.tsx} | 12 ++++++------ .../CodeList.tsx => CodeListPage/CodeListPage.tsx} | 8 ++++---- .../CodeLists/CodeLists.test.tsx | 2 +- .../CodeLists/CodeLists.tsx | 2 +- .../{CodeList => CodeListPage}/CodeLists/index.ts | 0 .../CodeListsActionsBar.module.css | 0 .../CodeListsActionsBar/CodeListsActionsBar.test.tsx | 0 .../CodeListsActionsBar/CodeListsActionsBar.tsx | 2 +- .../CreateNewCodeListModal.module.css | 0 .../CreateNewCodeListModal.test.tsx | 0 .../CreateNewCodeListModal.tsx | 2 +- .../CodeListsActionsBar/index.ts | 0 .../CodeListsCounterMessage.test.tsx | 0 .../CodeListsCounterMessage.tsx | 0 .../CodeListsCounterMessage/index.ts | 0 .../hooks/useCodeListEditorTexts.ts | 0 .../hooks/useInputCodeListNameErrorMessage.test.ts | 0 .../hooks/useInputCodeListNameErrorMessage.ts | 0 .../hooks/useUploadCodeListNameErrorMessage.test.ts | 0 .../hooks/useUploadCodeListNameErrorMessage.ts | 0 .../LibraryBody/pages/CodeListPage/index.ts | 2 ++ .../ContentLibrary/LibraryBody/pages/Images/index.ts | 1 - .../ImagesPage.test.tsx} | 12 ++++++------ .../{Images/Images.tsx => ImagesPage/ImagesPage.tsx} | 4 ++-- .../LibraryBody/pages/ImagesPage/index.ts | 1 + .../src/ContentLibrary/LibraryBody/pages/index.ts | 2 +- .../studio-content-library/src/types/PagesProps.ts | 8 ++++---- .../src/utils/router/RouterRouteMapper.test.ts | 4 ++-- .../src/utils/router/RouterRouteMapper.ts | 12 ++++++------ 32 files changed, 40 insertions(+), 40 deletions(-) delete mode 100644 frontend/libs/studio-content-library/src/ContentLibrary/LibraryBody/pages/CodeList/index.ts rename frontend/libs/studio-content-library/src/ContentLibrary/LibraryBody/pages/{CodeList/CodeList.module.css => CodeListPage/CodeListPage.module.css} (100%) rename frontend/libs/studio-content-library/src/ContentLibrary/LibraryBody/pages/{CodeList/CodeList.test.tsx => CodeListPage/CodeListPage.test.tsx} (89%) rename frontend/libs/studio-content-library/src/ContentLibrary/LibraryBody/pages/{CodeList/CodeList.tsx => CodeListPage/CodeListPage.tsx} (90%) rename frontend/libs/studio-content-library/src/ContentLibrary/LibraryBody/pages/{CodeList => CodeListPage}/CodeLists/CodeLists.test.tsx (98%) rename frontend/libs/studio-content-library/src/ContentLibrary/LibraryBody/pages/{CodeList => CodeListPage}/CodeLists/CodeLists.tsx (96%) rename frontend/libs/studio-content-library/src/ContentLibrary/LibraryBody/pages/{CodeList => CodeListPage}/CodeLists/index.ts (100%) rename frontend/libs/studio-content-library/src/ContentLibrary/LibraryBody/pages/{CodeList => CodeListPage}/CodeListsActionsBar/CodeListsActionsBar.module.css (100%) rename frontend/libs/studio-content-library/src/ContentLibrary/LibraryBody/pages/{CodeList => CodeListPage}/CodeListsActionsBar/CodeListsActionsBar.test.tsx (100%) rename frontend/libs/studio-content-library/src/ContentLibrary/LibraryBody/pages/{CodeList => CodeListPage}/CodeListsActionsBar/CodeListsActionsBar.tsx (96%) rename frontend/libs/studio-content-library/src/ContentLibrary/LibraryBody/pages/{CodeList => CodeListPage}/CodeListsActionsBar/CreateNewCodeListModal/CreateNewCodeListModal.module.css (100%) rename frontend/libs/studio-content-library/src/ContentLibrary/LibraryBody/pages/{CodeList => CodeListPage}/CodeListsActionsBar/CreateNewCodeListModal/CreateNewCodeListModal.test.tsx (100%) rename frontend/libs/studio-content-library/src/ContentLibrary/LibraryBody/pages/{CodeList => CodeListPage}/CodeListsActionsBar/CreateNewCodeListModal/CreateNewCodeListModal.tsx (98%) rename frontend/libs/studio-content-library/src/ContentLibrary/LibraryBody/pages/{CodeList => CodeListPage}/CodeListsActionsBar/index.ts (100%) rename frontend/libs/studio-content-library/src/ContentLibrary/LibraryBody/pages/{CodeList => CodeListPage}/CodeListsCounterMessage/CodeListsCounterMessage.test.tsx (100%) rename frontend/libs/studio-content-library/src/ContentLibrary/LibraryBody/pages/{CodeList => CodeListPage}/CodeListsCounterMessage/CodeListsCounterMessage.tsx (100%) rename frontend/libs/studio-content-library/src/ContentLibrary/LibraryBody/pages/{CodeList => CodeListPage}/CodeListsCounterMessage/index.ts (100%) rename frontend/libs/studio-content-library/src/ContentLibrary/LibraryBody/pages/{CodeList => CodeListPage}/hooks/useCodeListEditorTexts.ts (100%) rename frontend/libs/studio-content-library/src/ContentLibrary/LibraryBody/pages/{CodeList => CodeListPage}/hooks/useInputCodeListNameErrorMessage.test.ts (100%) rename frontend/libs/studio-content-library/src/ContentLibrary/LibraryBody/pages/{CodeList => CodeListPage}/hooks/useInputCodeListNameErrorMessage.ts (100%) rename frontend/libs/studio-content-library/src/ContentLibrary/LibraryBody/pages/{CodeList => CodeListPage}/hooks/useUploadCodeListNameErrorMessage.test.ts (100%) rename frontend/libs/studio-content-library/src/ContentLibrary/LibraryBody/pages/{CodeList => CodeListPage}/hooks/useUploadCodeListNameErrorMessage.ts (100%) create mode 100644 frontend/libs/studio-content-library/src/ContentLibrary/LibraryBody/pages/CodeListPage/index.ts delete mode 100644 frontend/libs/studio-content-library/src/ContentLibrary/LibraryBody/pages/Images/index.ts rename frontend/libs/studio-content-library/src/ContentLibrary/LibraryBody/pages/{Images/Images.test.tsx => ImagesPage/ImagesPage.test.tsx} (81%) rename frontend/libs/studio-content-library/src/ContentLibrary/LibraryBody/pages/{Images/Images.tsx => ImagesPage/ImagesPage.tsx} (88%) create mode 100644 frontend/libs/studio-content-library/src/ContentLibrary/LibraryBody/pages/ImagesPage/index.ts diff --git a/frontend/app-development/features/appContentLibrary/AppContentLibrary.test.tsx b/frontend/app-development/features/appContentLibrary/AppContentLibrary.test.tsx index f30022cc42e..ac0c6d30212 100644 --- a/frontend/app-development/features/appContentLibrary/AppContentLibrary.test.tsx +++ b/frontend/app-development/features/appContentLibrary/AppContentLibrary.test.tsx @@ -18,9 +18,9 @@ const updateCodeListButtonTextMock = 'Update Code List'; const codeListNameMock = 'codeListNameMock'; const codeListMock: CodeList = [{ value: '', label: '' }]; jest.mock( - '../../../libs/studio-content-library/src/ContentLibrary/LibraryBody/pages/CodeList', + '../../../libs/studio-content-library/src/ContentLibrary/LibraryBody/pages/CodeListPage', () => ({ - CodeList: ({ onUpdateCodeList, onUploadCodeList }: any) => ( + CodeListPage: ({ onUpdateCodeList, onUploadCodeList }: any) => (