From 0d6a13e187b564922b013dc80ab54c6d63c8a955 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20B=C3=A9gaudeau?= Date: Thu, 19 Dec 2024 09:54:26 +0100 Subject: [PATCH] [cleanup] Improve the organization of the code of the workbench views MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Bégaudeau --- .../extension/DefaultExtensionRegistry.tsx | 10 +++--- .../sirius-web-application/src/index.ts | 32 +++++++++---------- .../{ => details}/DetailsView.tsx | 0 .../{ => details}/DetailsView.types.ts | 0 .../useDetailsViewSubscription.tsx | 0 .../useDetailsViewSubscription.types.ts | 0 .../explorer/ExplorerView.tsx | 0 .../explorer/ExplorerView.types.ts | 0 .../explorer/TreeDescriptionsMenu.tsx | 0 .../explorer/TreeDescriptionsMenu.types.ts | 0 .../explorer/useExplorerDescriptions.ts | 0 .../explorer/useExplorerDescriptions.types.ts | 0 .../explorer/useExplorerSubscription.tsx | 0 .../explorer/useExplorerSubscription.types.ts | 0 .../RelatedElementsView.tsx | 0 .../RelatedElementsView.types.ts | 0 .../useRelatedElementsViewSubscription.tsx | 0 ...seRelatedElementsViewSubscription.types.ts | 0 .../RepresentationsView.tsx | 0 .../RepresentationsView.types.ts | 0 .../useRepresentationsViewSubscription.tsx | 0 ...seRepresentationsViewSubscription.types.ts | 0 22 files changed, 21 insertions(+), 21 deletions(-) rename packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/{ => details}/DetailsView.tsx (100%) rename packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/{ => details}/DetailsView.types.ts (100%) rename packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/{ => details}/useDetailsViewSubscription.tsx (100%) rename packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/{ => details}/useDetailsViewSubscription.types.ts (100%) rename packages/sirius-web/frontend/sirius-web-application/src/views/{ => edit-project/workbench-views}/explorer/ExplorerView.tsx (100%) rename packages/sirius-web/frontend/sirius-web-application/src/views/{ => edit-project/workbench-views}/explorer/ExplorerView.types.ts (100%) rename packages/sirius-web/frontend/sirius-web-application/src/views/{ => edit-project/workbench-views}/explorer/TreeDescriptionsMenu.tsx (100%) rename packages/sirius-web/frontend/sirius-web-application/src/views/{ => edit-project/workbench-views}/explorer/TreeDescriptionsMenu.types.ts (100%) rename packages/sirius-web/frontend/sirius-web-application/src/views/{ => edit-project/workbench-views}/explorer/useExplorerDescriptions.ts (100%) rename packages/sirius-web/frontend/sirius-web-application/src/views/{ => edit-project/workbench-views}/explorer/useExplorerDescriptions.types.ts (100%) rename packages/sirius-web/frontend/sirius-web-application/src/views/{ => edit-project/workbench-views}/explorer/useExplorerSubscription.tsx (100%) rename packages/sirius-web/frontend/sirius-web-application/src/views/{ => edit-project/workbench-views}/explorer/useExplorerSubscription.types.ts (100%) rename packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/{ => related-elements}/RelatedElementsView.tsx (100%) rename packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/{ => related-elements}/RelatedElementsView.types.ts (100%) rename packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/{ => related-elements}/useRelatedElementsViewSubscription.tsx (100%) rename packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/{ => related-elements}/useRelatedElementsViewSubscription.types.ts (100%) rename packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/{ => representations}/RepresentationsView.tsx (100%) rename packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/{ => representations}/RepresentationsView.types.ts (100%) rename packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/{ => representations}/useRepresentationsViewSubscription.tsx (100%) rename packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/{ => representations}/useRepresentationsViewSubscription.types.ts (100%) diff --git a/packages/sirius-web/frontend/sirius-web-application/src/extension/DefaultExtensionRegistry.tsx b/packages/sirius-web/frontend/sirius-web-application/src/extension/DefaultExtensionRegistry.tsx index 72098a6f0fc..632f05f24e8 100644 --- a/packages/sirius-web/frontend/sirius-web-application/src/extension/DefaultExtensionRegistry.tsx +++ b/packages/sirius-web/frontend/sirius-web-application/src/extension/DefaultExtensionRegistry.tsx @@ -65,19 +65,19 @@ import { DocumentTreeItemContextMenuContribution } from '../views/edit-project/D import { DownloadProjectMenuEntryContribution } from '../views/edit-project/EditProjectNavbar/DownloadProjectMenuEntryContribution'; import { editProjectNavbarMenuEntryExtensionPoint } from '../views/edit-project/EditProjectNavbar/EditProjectNavbarMenuExtensionPoints'; import { ObjectTreeItemContextMenuContribution } from '../views/edit-project/ObjectTreeItemContextMenuContribution'; -import { DetailsView } from '../views/edit-project/workbench-views/DetailsView'; -import { RelatedElementsView } from '../views/edit-project/workbench-views/RelatedElementsView'; -import { RepresentationsView } from '../views/edit-project/workbench-views/RepresentationsView'; -import { ExplorerView } from '../views/explorer/ExplorerView'; +import { DetailsView } from '../views/edit-project/workbench-views/details/DetailsView'; +import { ExplorerView } from '../views/edit-project/workbench-views/explorer/ExplorerView'; +import { RelatedElementsView } from '../views/edit-project/workbench-views/related-elements/RelatedElementsView'; +import { RepresentationsView } from '../views/edit-project/workbench-views/representations/RepresentationsView'; import { createProjectAreaCardExtensionPoint } from '../views/project-browser/create-projects-area/CreateProjectAreaExtensionPoints'; import { NewProjectCard } from '../views/project-browser/create-projects-area/NewProjectCard'; import { ShowAllProjectTemplatesCard } from '../views/project-browser/create-projects-area/ShowAllProjectTemplatesCard'; import { UploadProjectCard } from '../views/project-browser/create-projects-area/UploadProjectCard'; import { projectContextMenuEntryExtensionPoint } from '../views/project-browser/list-projects-area/ProjectContextMenuExtensionPoints'; import { ProjectDownloadMenuItemExtension } from '../views/project-browser/list-projects-area/ProjectDownloadMenuItemExtension'; +import { ProjectImagesSettings } from '../views/project-settings/images/ProjectImagesSettings'; import { ProjectSettingTabContribution } from '../views/project-settings/ProjectSettingsView.types'; import { projectSettingsTabExtensionPoint } from '../views/project-settings/ProjectSettingsViewExtensionPoints'; -import { ProjectImagesSettings } from '../views/project-settings/images/ProjectImagesSettings'; import { ellipseNodeStyleDocumentTransform } from './EllipseNodeDocumentTransform'; import { referenceWidgetDocumentTransform } from './ReferenceWidgetDocumentTransform'; diff --git a/packages/sirius-web/frontend/sirius-web-application/src/index.ts b/packages/sirius-web/frontend/sirius-web-application/src/index.ts index 3cc0c24b811..7091e8d4894 100644 --- a/packages/sirius-web/frontend/sirius-web-application/src/index.ts +++ b/packages/sirius-web/frontend/sirius-web-application/src/index.ts @@ -32,6 +32,12 @@ export { httpOptionsConfigurersExtensionPoint, webSocketOptionsConfigurersExtensionPoint, } from './graphql/useCreateApolloClientExtensionPoints'; +export { NewObjectModal } from './modals/new-object/NewObjectModal'; +export { type NewObjectModalProps } from './modals/new-object/NewObjectModal.types'; +export { NewRepresentationModal } from './modals/new-representation/NewRepresentationModal'; +export { type NewRepresentationModalProps } from './modals/new-representation/NewRepresentationModal.types'; +export { NewRootObjectModal } from './modals/new-root-object/NewRootObjectModal'; +export { type NewRootObjectModalProps } from './modals/new-root-object/NewRootObjectModal.types'; export { NavigationBar } from './navigationBar/NavigationBar'; export { type NavigationBarIconProps, @@ -71,23 +77,23 @@ export { editProjectViewReadOnlyPredicateExtensionPoint } from './views/edit-pro export { useCurrentProject } from './views/edit-project/useCurrentProject'; export type { UseCurrentProjectValue } from './views/edit-project/useCurrentProject.types'; export type { GQLProject } from './views/edit-project/useProjectAndRepresentationMetadata.types'; -export { DetailsView } from './views/edit-project/workbench-views/DetailsView'; -export type { GQLDetailsEventPayload } from './views/edit-project/workbench-views/useDetailsViewSubscription.types'; -export { useRelatedElementsViewSubscription } from './views/edit-project/workbench-views/useRelatedElementsViewSubscription'; +export { DetailsView } from './views/edit-project/workbench-views/details/DetailsView'; +export type { GQLDetailsEventPayload } from './views/edit-project/workbench-views/details/useDetailsViewSubscription.types'; +export { useExplorerSubscription } from './views/edit-project/workbench-views/explorer/useExplorerSubscription'; +export { + type GQLTreeEventPayload, + type GQLTreeRefreshedEventPayload, + type UseExplorerSubscriptionValue, +} from './views/edit-project/workbench-views/explorer/useExplorerSubscription.types'; +export { useRelatedElementsViewSubscription } from './views/edit-project/workbench-views/related-elements/useRelatedElementsViewSubscription'; export { type GQLFormRefreshedEventPayload, type GQLRelatedElementsEventPayload, type UseRelatedElementsViewSubscriptionValue, -} from './views/edit-project/workbench-views/useRelatedElementsViewSubscription.types'; +} from './views/edit-project/workbench-views/related-elements/useRelatedElementsViewSubscription.types'; export { ErrorView } from './views/error/ErrorView'; export { type ErrorMessageProvider } from './views/error/ErrorView.types'; export { errorMessageProvidersExtensionPoint } from './views/error/ErrorViewExtensionPoints'; -export { useExplorerSubscription } from './views/explorer/useExplorerSubscription'; -export { - type GQLTreeEventPayload, - type GQLTreeRefreshedEventPayload, - type UseExplorerSubscriptionValue, -} from './views/explorer/useExplorerSubscription.types'; export { type CreateProjectAreaCardProps } from './views/project-browser/create-projects-area/CreateProjectArea.types'; export { createProjectAreaCardExtensionPoint } from './views/project-browser/create-projects-area/CreateProjectAreaExtensionPoints'; export { ProjectActionButton } from './views/project-browser/list-projects-area/ProjectActionButton'; @@ -107,9 +113,3 @@ export { type ProjectSettingTabProps, } from './views/project-settings/ProjectSettingsView.types'; export * from './views/project-settings/ProjectSettingsViewExtensionPoints'; -export { NewObjectModal } from './modals/new-object/NewObjectModal'; -export { type NewObjectModalProps } from './modals/new-object/NewObjectModal.types'; -export { NewRepresentationModal } from './modals/new-representation/NewRepresentationModal'; -export { type NewRepresentationModalProps } from './modals/new-representation/NewRepresentationModal.types'; -export { NewRootObjectModal } from './modals/new-root-object/NewRootObjectModal'; -export { type NewRootObjectModalProps } from './modals/new-root-object/NewRootObjectModal.types'; diff --git a/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/DetailsView.tsx b/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/details/DetailsView.tsx similarity index 100% rename from packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/DetailsView.tsx rename to packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/details/DetailsView.tsx diff --git a/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/DetailsView.types.ts b/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/details/DetailsView.types.ts similarity index 100% rename from packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/DetailsView.types.ts rename to packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/details/DetailsView.types.ts diff --git a/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/useDetailsViewSubscription.tsx b/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/details/useDetailsViewSubscription.tsx similarity index 100% rename from packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/useDetailsViewSubscription.tsx rename to packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/details/useDetailsViewSubscription.tsx diff --git a/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/useDetailsViewSubscription.types.ts b/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/details/useDetailsViewSubscription.types.ts similarity index 100% rename from packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/useDetailsViewSubscription.types.ts rename to packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/details/useDetailsViewSubscription.types.ts diff --git a/packages/sirius-web/frontend/sirius-web-application/src/views/explorer/ExplorerView.tsx b/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/explorer/ExplorerView.tsx similarity index 100% rename from packages/sirius-web/frontend/sirius-web-application/src/views/explorer/ExplorerView.tsx rename to packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/explorer/ExplorerView.tsx diff --git a/packages/sirius-web/frontend/sirius-web-application/src/views/explorer/ExplorerView.types.ts b/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/explorer/ExplorerView.types.ts similarity index 100% rename from packages/sirius-web/frontend/sirius-web-application/src/views/explorer/ExplorerView.types.ts rename to packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/explorer/ExplorerView.types.ts diff --git a/packages/sirius-web/frontend/sirius-web-application/src/views/explorer/TreeDescriptionsMenu.tsx b/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/explorer/TreeDescriptionsMenu.tsx similarity index 100% rename from packages/sirius-web/frontend/sirius-web-application/src/views/explorer/TreeDescriptionsMenu.tsx rename to packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/explorer/TreeDescriptionsMenu.tsx diff --git a/packages/sirius-web/frontend/sirius-web-application/src/views/explorer/TreeDescriptionsMenu.types.ts b/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/explorer/TreeDescriptionsMenu.types.ts similarity index 100% rename from packages/sirius-web/frontend/sirius-web-application/src/views/explorer/TreeDescriptionsMenu.types.ts rename to packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/explorer/TreeDescriptionsMenu.types.ts diff --git a/packages/sirius-web/frontend/sirius-web-application/src/views/explorer/useExplorerDescriptions.ts b/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/explorer/useExplorerDescriptions.ts similarity index 100% rename from packages/sirius-web/frontend/sirius-web-application/src/views/explorer/useExplorerDescriptions.ts rename to packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/explorer/useExplorerDescriptions.ts diff --git a/packages/sirius-web/frontend/sirius-web-application/src/views/explorer/useExplorerDescriptions.types.ts b/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/explorer/useExplorerDescriptions.types.ts similarity index 100% rename from packages/sirius-web/frontend/sirius-web-application/src/views/explorer/useExplorerDescriptions.types.ts rename to packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/explorer/useExplorerDescriptions.types.ts diff --git a/packages/sirius-web/frontend/sirius-web-application/src/views/explorer/useExplorerSubscription.tsx b/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/explorer/useExplorerSubscription.tsx similarity index 100% rename from packages/sirius-web/frontend/sirius-web-application/src/views/explorer/useExplorerSubscription.tsx rename to packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/explorer/useExplorerSubscription.tsx diff --git a/packages/sirius-web/frontend/sirius-web-application/src/views/explorer/useExplorerSubscription.types.ts b/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/explorer/useExplorerSubscription.types.ts similarity index 100% rename from packages/sirius-web/frontend/sirius-web-application/src/views/explorer/useExplorerSubscription.types.ts rename to packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/explorer/useExplorerSubscription.types.ts diff --git a/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/RelatedElementsView.tsx b/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/related-elements/RelatedElementsView.tsx similarity index 100% rename from packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/RelatedElementsView.tsx rename to packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/related-elements/RelatedElementsView.tsx diff --git a/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/RelatedElementsView.types.ts b/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/related-elements/RelatedElementsView.types.ts similarity index 100% rename from packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/RelatedElementsView.types.ts rename to packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/related-elements/RelatedElementsView.types.ts diff --git a/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/useRelatedElementsViewSubscription.tsx b/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/related-elements/useRelatedElementsViewSubscription.tsx similarity index 100% rename from packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/useRelatedElementsViewSubscription.tsx rename to packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/related-elements/useRelatedElementsViewSubscription.tsx diff --git a/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/useRelatedElementsViewSubscription.types.ts b/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/related-elements/useRelatedElementsViewSubscription.types.ts similarity index 100% rename from packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/useRelatedElementsViewSubscription.types.ts rename to packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/related-elements/useRelatedElementsViewSubscription.types.ts diff --git a/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/RepresentationsView.tsx b/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/representations/RepresentationsView.tsx similarity index 100% rename from packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/RepresentationsView.tsx rename to packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/representations/RepresentationsView.tsx diff --git a/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/RepresentationsView.types.ts b/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/representations/RepresentationsView.types.ts similarity index 100% rename from packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/RepresentationsView.types.ts rename to packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/representations/RepresentationsView.types.ts diff --git a/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/useRepresentationsViewSubscription.tsx b/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/representations/useRepresentationsViewSubscription.tsx similarity index 100% rename from packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/useRepresentationsViewSubscription.tsx rename to packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/representations/useRepresentationsViewSubscription.tsx diff --git a/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/useRepresentationsViewSubscription.types.ts b/packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/representations/useRepresentationsViewSubscription.types.ts similarity index 100% rename from packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/useRepresentationsViewSubscription.types.ts rename to packages/sirius-web/frontend/sirius-web-application/src/views/edit-project/workbench-views/representations/useRepresentationsViewSubscription.types.ts