diff --git a/lib/papi-dts/papi.d.ts b/lib/papi-dts/papi.d.ts index 2eb75200d9..96bbd95568 100644 --- a/lib/papi-dts/papi.d.ts +++ b/lib/papi-dts/papi.d.ts @@ -2014,7 +2014,7 @@ declare module 'shared/services/web-view.service' { currentTabId?: string, direction?: DropDirection, ) => Promise; - /** Properties related to the dock layout provided by `paranext-dock-layout.component.tsx` */ + /** Properties related to the dock layout provided by `platform-dock-layout.component.tsx` */ type PapiDockLayout = { /** The rc-dock dock layout React element ref. Used to perform operations on the layout */ dockLayout: DockLayout; @@ -2051,7 +2051,7 @@ declare module 'shared/services/web-view.service' { * * TODO: This should be removed and the `testLayout` imported directly in this file once this * service is refactored to split the code between processes. The only reason this is passed from - * `paranext-dock-layout.component.tsx` is that we cannot import `testLayout` here since this + * `platform-dock-layout.component.tsx` is that we cannot import `testLayout` here since this * service is currently all shared code. Refactor should happen in #203 */ testLayout: LayoutBase; @@ -2464,7 +2464,7 @@ declare module 'shared/models/project-metadata.model' { projectType: string; }; } -declare module 'shared/services/project-lookup.service.model' { +declare module 'shared/services/project-lookup.service-model' { import { ProjectMetadata } from 'shared/models/project-metadata.model'; /** * Provides metadata for projects known by the platform @@ -2485,7 +2485,7 @@ declare module 'shared/services/project-lookup.service.model' { export const projectLookupServiceNetworkObjectName = 'ProjectLookupService'; } declare module 'shared/services/project-lookup.service' { - import { ProjectLookupServiceType } from 'shared/services/project-lookup.service.model'; + import { ProjectLookupServiceType } from 'shared/services/project-lookup.service-model'; const projectLookupService: ProjectLookupServiceType; export default projectLookupService; } @@ -2940,7 +2940,7 @@ declare module 'renderer/components/dialogs/dialog-base.data' { const DIALOG_BASE: DialogDefinitionBase; export default DIALOG_BASE; } -declare module 'renderer/components/dialogs/dialog.data' { +declare module 'renderer/components/dialogs/dialog-definition.model' { import { DialogOptions } from 'shared/models/dialog-options.model'; import { DialogDefinitionBase, DialogProps } from 'renderer/components/dialogs/dialog-base.data'; import { ReactElement } from 'react'; @@ -2989,8 +2989,8 @@ declare module 'renderer/components/dialogs/dialog.data' { } >; } -declare module 'shared/services/dialog.service.model' { - import { DialogTabTypes, DialogTypes } from 'renderer/components/dialogs/dialog.data'; +declare module 'shared/services/dialog.service-model' { + import { DialogTabTypes, DialogTypes } from 'renderer/components/dialogs/dialog-definition.model'; import { DialogOptions } from 'shared/models/dialog-options.model'; /** * Prompt the user for responses with dialogs @@ -3025,12 +3025,12 @@ declare module 'shared/services/dialog.service.model' { export const CATEGORY_DIALOG = 'dialog'; } declare module 'shared/services/dialog.service' { - import { DialogService } from 'shared/services/dialog.service.model'; + import { DialogService } from 'shared/services/dialog.service-model'; const dialogService: DialogService; export default dialogService; } declare module 'renderer/hooks/papi-hooks/use-dialog-callback.hook' { - import { DialogTabTypes, DialogTypes } from 'renderer/components/dialogs/dialog.data'; + import { DialogTabTypes, DialogTypes } from 'renderer/components/dialogs/dialog-definition.model'; /** * Enables using `papi.dialogs.showDialog` in React more easily. Provides a callback to run to get a * response from a dialog as well as states that indicate the dialog's response and whether the @@ -3155,12 +3155,12 @@ declare module 'papi-frontend' { import { PapiWebViewService } from 'shared/services/web-view.service'; import { InternetService } from 'shared/services/internet.service'; import { DataProviderService } from 'shared/services/data-provider.service'; - import { ProjectLookupServiceType } from 'shared/services/project-lookup.service.model'; + import { ProjectLookupServiceType } from 'shared/services/project-lookup.service-model'; import { PapiFrontendProjectDataProviderService } from 'shared/services/project-data-provider.service'; import { PapiContext } from 'renderer/context/papi-context/index'; import { PapiHooks } from 'renderer/hooks/papi-hooks/index'; import { SettingsService } from 'shared/services/settings.service'; - import { DialogService } from 'shared/services/dialog.service.model'; + import { DialogService } from 'shared/services/dialog.service-model'; const papi: { /** * Event manager - accepts subscriptions to an event and runs the subscription callbacks when the event is emitted @@ -3490,8 +3490,8 @@ declare module 'papi-backend' { import { DataProviderService } from 'shared/services/data-provider.service'; import { PapiBackendProjectDataProviderService } from 'shared/services/project-data-provider.service'; import { ExtensionStorageService } from 'extension-host/services/extension-storage.service'; - import { ProjectLookupServiceType } from 'shared/services/project-lookup.service.model'; - import { DialogService } from 'shared/services/dialog.service.model'; + import { ProjectLookupServiceType } from 'shared/services/project-lookup.service-model'; + import { DialogService } from 'shared/services/dialog.service-model'; const papi: { /** * Event manager - accepts subscriptions to an event and runs the subscription callbacks when the event is emitted diff --git a/src/__tests__/app.component.test.tsx b/src/__tests__/app.component.test.tsx index 6a2641bc93..a2461a3d05 100644 --- a/src/__tests__/app.component.test.tsx +++ b/src/__tests__/app.component.test.tsx @@ -35,7 +35,7 @@ jest.mock('@renderer/hooks/papi-hooks/use-event.hook', () => ({ __esModule: true, default: /** useEvent Mock */ () => {}, })); -jest.mock('@renderer/components/docking/paranext-dock-layout.component', () => ({ +jest.mock('@renderer/components/docking/platform-dock-layout.component', () => ({ __esModule: true, default: /** ParanextDockLayout Mock */ () => undefined, })); diff --git a/src/extension-host/extension-host.ts b/src/extension-host/extension-host.ts index 1af47fd4ca..c07bb1fa03 100644 --- a/src/extension-host/extension-host.ts +++ b/src/extension-host/extension-host.ts @@ -9,7 +9,7 @@ import dataProviderService from '@shared/services/data-provider.service'; import extensionAssetService from '@shared/services/extension-asset.service'; import { getErrorMessage } from '@shared/utils/util'; import { CommandNames } from 'papi-shared-types'; -import { startProjectLookupService } from '@extension-host/services/project-lookup.service.host'; +import { startProjectLookupService } from '@extension-host/services/project-lookup.service-host'; // #region Test logs diff --git a/src/extension-host/services/papi-backend.service.ts b/src/extension-host/services/papi-backend.service.ts index 0c100ea8be..2479a58fdf 100644 --- a/src/extension-host/services/papi-backend.service.ts +++ b/src/extension-host/services/papi-backend.service.ts @@ -23,10 +23,10 @@ import { import extensionStorageService, { ExtensionStorageService, } from '@extension-host/services/extension-storage.service'; -import { ProjectLookupServiceType } from '@shared/services/project-lookup.service.model'; +import { ProjectLookupServiceType } from '@shared/services/project-lookup.service-model'; import projectLookupService from '@shared/services/project-lookup.service'; import dialogService from '@shared/services/dialog.service'; -import { DialogService } from '@shared/services/dialog.service.model'; +import { DialogService } from '@shared/services/dialog.service-model'; // IMPORTANT NOTES: // 1) When adding new services here, consider whether they also belong in papi-frontend.service.ts. diff --git a/src/extension-host/services/project-lookup.service.host.ts b/src/extension-host/services/project-lookup.service-host.ts similarity index 98% rename from src/extension-host/services/project-lookup.service.host.ts rename to src/extension-host/services/project-lookup.service-host.ts index 16dd5c81c2..bde3f2dd58 100644 --- a/src/extension-host/services/project-lookup.service.host.ts +++ b/src/extension-host/services/project-lookup.service-host.ts @@ -4,7 +4,7 @@ import { ProjectMetadata } from '@shared/models/project-metadata.model'; import { projectLookupServiceNetworkObjectName, ProjectLookupServiceType, -} from '@shared/services/project-lookup.service.model'; +} from '@shared/services/project-lookup.service-model'; import { joinUriPaths } from '@node/utils/util'; import logger from '@shared/services/logger.service'; import networkObjectService from '@shared/services/network-object.service'; diff --git a/src/renderer/app.component.tsx b/src/renderer/app.component.tsx index fb72da8965..f7e16ff5ab 100644 --- a/src/renderer/app.component.tsx +++ b/src/renderer/app.component.tsx @@ -1,6 +1,6 @@ import { MemoryRouter as Router, Routes, Route } from 'react-router-dom'; import './app.component.css'; -import ParanextDockLayout from '@renderer/components/docking/paranext-dock-layout.component'; +import PlatformDockLayout from '@renderer/components/docking/platform-dock-layout.component'; import TestContext from '@renderer/context/papi-context/test.context'; import PlatformBibleToolbar from './components/platform-bible-toolbar'; @@ -8,7 +8,7 @@ function Main() { return ( - + ); } diff --git a/src/renderer/components/dialogs/dialog.data.ts b/src/renderer/components/dialogs/dialog-definition.model.ts similarity index 100% rename from src/renderer/components/dialogs/dialog.data.ts rename to src/renderer/components/dialogs/dialog-definition.model.ts diff --git a/src/renderer/components/dialogs/index.ts b/src/renderer/components/dialogs/index.ts index d8c73a6080..7a703d01b0 100644 --- a/src/renderer/components/dialogs/index.ts +++ b/src/renderer/components/dialogs/index.ts @@ -1,5 +1,5 @@ import SELECT_PROJECT_DIALOG from '@renderer/components/dialogs/select-project.dialog'; -import { DialogDefinition, DialogTabTypes } from './dialog.data'; +import { DialogDefinition, DialogTabTypes } from './dialog-definition.model'; /** * Map of all available dialog definitions used to create dialogs diff --git a/src/renderer/components/dialogs/select-project.dialog.tsx b/src/renderer/components/dialogs/select-project.dialog.tsx index ee24ed88ba..08064145f0 100644 --- a/src/renderer/components/dialogs/select-project.dialog.tsx +++ b/src/renderer/components/dialogs/select-project.dialog.tsx @@ -2,11 +2,11 @@ import { ListItemIcon } from '@mui/material'; import FolderOpenIcon from '@mui/icons-material/FolderOpen'; import './select-project.dialog.scss'; import { useMemo } from 'react'; -import ProjectList from '@renderer/components/project-components/project-list.component'; +import ProjectList from '@renderer/components/projects/project-list.component'; import usePromise from '@renderer/hooks/papi-hooks/use-promise.hook'; import projectLookupService from '@shared/services/project-lookup.service'; import DIALOG_BASE, { DialogProps } from '@renderer/components/dialogs/dialog-base.data'; -import { DialogDefinition } from '@renderer/components/dialogs/dialog.data'; +import { DialogDefinition } from '@renderer/components/dialogs/dialog-definition.model'; type SelectProjectDialogProps = DialogProps; diff --git a/src/renderer/components/docking/paranext-dock-layout.component.css b/src/renderer/components/docking/platform-dock-layout.component.css similarity index 66% rename from src/renderer/components/docking/paranext-dock-layout.component.css rename to src/renderer/components/docking/platform-dock-layout.component.css index fe61ad7667..9c9aaf9284 100644 --- a/src/renderer/components/docking/paranext-dock-layout.component.css +++ b/src/renderer/components/docking/platform-dock-layout.component.css @@ -3,7 +3,7 @@ margin: 4px; } -.dock-layout .dock-panel.dock-style-paranext { +.dock-layout .dock-panel.dock-style-platform-bible { border: 0; } @@ -21,7 +21,7 @@ border: 0; } -.dock-layout .dock-panel.dock-style-paranext .dock-tab { +.dock-layout .dock-panel.dock-style-platform-bible .dock-tab { margin-right: 0; border: 1px solid #5c5c5c; background: #bfbfbf; @@ -29,7 +29,7 @@ flex: 1 0 auto; } -.dock-layout .dock-panel.dock-style-paranext .dock-tab > div { +.dock-layout .dock-panel.dock-style-platform-bible .dock-tab > div { padding-left: 7px; } @@ -37,47 +37,47 @@ * Show borders on the sides of the dock-nav, not on the very edges of the dock-tabs, * so the borders show even when the tabs don't fit in the space and you have to scroll */ -.dock-layout .dock-panel.dock-style-paranext .dock-tab:first-child { +.dock-layout .dock-panel.dock-style-platform-bible .dock-tab:first-child { border-left: 0; } -.dock-layout .dock-panel.dock-style-paranext .dock-tab:nth-last-child(2) { +.dock-layout .dock-panel.dock-style-platform-bible .dock-tab:nth-last-child(2) { border-right: 0; } -.dock-layout .dock-panel.dock-style-paranext .dock-nav { +.dock-layout .dock-panel.dock-style-platform-bible .dock-nav { border-left: 1px solid #5c5c5c; border-right: 1px solid #5c5c5c; } -.dock-layout .dock-panel.dock-style-paranext .dock-tab.dock-tab-active { +.dock-layout .dock-panel.dock-style-platform-bible .dock-tab.dock-tab-active { background: #a6c9ff; color: #191919; border-bottom: 1px solid #a6c9ff; } /* Curved corners including on floating window */ -.dock-layout .dock-panel.dock-style-paranext, -.dock-layout .dock-panel.dock-style-paranext .dock-bar, -.dock-layout .dock-panel.dock-style-paranext .dock-nav, -.dock-layout .dock-panel.dock-style-paranext .dock-nav-wrap, -.dock-layout .dock-panel.dock-style-paranext .dock-tab { +.dock-layout .dock-panel.dock-style-platform-bible, +.dock-layout .dock-panel.dock-style-platform-bible .dock-bar, +.dock-layout .dock-panel.dock-style-platform-bible .dock-nav, +.dock-layout .dock-panel.dock-style-platform-bible .dock-nav-wrap, +.dock-layout .dock-panel.dock-style-platform-bible .dock-tab { border-radius: 5px 5px 0 0; } -.dock-layout .dock-panel.dock-style-paranext .dock-bar { +.dock-layout .dock-panel.dock-style-platform-bible .dock-bar { background: #8c8c8c; padding: 0; border: 0; } -.dock-layout .dock-panel.dock-style-paranext .dock-tab-hit-area { +.dock-layout .dock-panel.dock-style-platform-bible .dock-tab-hit-area { /* expand the invisible dock-tab-hit-area a bit to cover the border area above it */ left: -1px; right: -1px; } -.dock-layout .dock-panel.dock-style-paranext .dock-nav-wrap { +.dock-layout .dock-panel.dock-style-platform-bible .dock-nav-wrap { /* * Remove the handle bar at the top of each dock-tab. Note: Now, the tab * group can only be grabbed by grabbing the intersection between two tabs @@ -91,7 +91,7 @@ } /* tabs take all the space */ -.dock-layout .dock-panel.dock-style-paranext .dock-nav-list { +.dock-layout .dock-panel.dock-style-platform-bible .dock-nav-list { flex-grow: 1; } diff --git a/src/renderer/components/docking/paranext-dock-layout.component.test.ts b/src/renderer/components/docking/platform-dock-layout.component.test.ts similarity index 99% rename from src/renderer/components/docking/paranext-dock-layout.component.test.ts rename to src/renderer/components/docking/platform-dock-layout.component.test.ts index 7919c1b877..e98bacd1f3 100644 --- a/src/renderer/components/docking/paranext-dock-layout.component.test.ts +++ b/src/renderer/components/docking/platform-dock-layout.component.test.ts @@ -22,7 +22,7 @@ import { addWebViewToDock, getFloatPosition, loadTab, -} from './paranext-dock-layout.component'; +} from './platform-dock-layout.component'; describe('Dock Layout Component', () => { const mockDockLayout = mock(DockLayout); diff --git a/src/renderer/components/docking/paranext-dock-layout.component.tsx b/src/renderer/components/docking/platform-dock-layout.component.tsx similarity index 95% rename from src/renderer/components/docking/paranext-dock-layout.component.tsx rename to src/renderer/components/docking/platform-dock-layout.component.tsx index 7097f52ac8..e7ca5663f4 100644 --- a/src/renderer/components/docking/paranext-dock-layout.component.tsx +++ b/src/renderer/components/docking/platform-dock-layout.component.tsx @@ -1,5 +1,5 @@ import 'rc-dock/dist/rc-dock.css'; -import './paranext-dock-layout.component.css'; +import './platform-dock-layout.component.css'; import { useRef, useEffect } from 'react'; import DockLayout, { BoxData, @@ -15,8 +15,8 @@ import { createErrorTab, saveErrorTab, } from '@renderer/components/docking/error-tab.component'; -import ParanextPanel from '@renderer/components/docking/paranext-panel.component'; -import ParanextTabTitle from '@renderer/components/docking/paranext-tab-title.component'; +import PlatformPanel from '@renderer/components/docking/platform-panel.component'; +import PlatformTabTitle from '@renderer/components/docking/platform-tab-title.component'; import { loadWebViewTab, TAB_TYPE_WEBVIEW, @@ -51,11 +51,11 @@ import { getErrorMessage } from '@shared/utils/util'; import { loadDownloadUpdateProjectTab, TAB_TYPE_DOWNLOAD_UPDATE_PROJECT_DIALOG, -} from '@renderer/components/project-components/download-update-project-tab.component'; +} from '@renderer/components/projects/download-update-project-tab.component'; import { loadOpenMultipleProjectsTab, TAB_TYPE_OPEN_MULTIPLE_PROJECTS_DIALOG, -} from '@renderer/components/project-components/open-multiple-projects-tab.component'; +} from '@renderer/components/projects/open-multiple-projects-tab.component'; import { TAB_TYPE_EXTENSION_MANAGER, loadExtensionManagerTab, @@ -64,7 +64,7 @@ import { TAB_TYPE_RUN_BASIC_CHECKS, loadRunBasicChecksTab, } from '@renderer/components/run-basic-checks-dialog/run-basic-checks-tab.component'; -import { hasDialogRequest, resolveDialogRequest } from '@renderer/services/dialog.service.host'; +import { hasDialogRequest, resolveDialogRequest } from '@renderer/services/dialog.service-host'; import { DialogData } from '@shared/models/dialog-options.model'; import DIALOGS from '@renderer/components/dialogs'; import cloneDeep from 'lodash/cloneDeep'; @@ -80,8 +80,8 @@ const DEFAULT_PANEL_DIRECTION: PanelDirection = 'right'; const DOCK_FLOAT_OFFSET = 28; // NOTE: 'card' is a built-in style. We can likely remove it when we create a full theme for -// Paranext. -const TAB_GROUP = 'card paranext'; +// Platform. +const TAB_GROUP = 'card platform-bible'; const groups: { [key: string]: TabGroup } = { [TAB_GROUP]: { @@ -98,7 +98,7 @@ const groups: { [key: string]: TabGroup } = { // a shared file. // TODO: please move these utility functions with #203 -/** tab loader functions for each Paranext tab type */ +/** tab loader functions for each Platform tab type */ const tabLoaderMap = new Map([ [TAB_TYPE_ABOUT, loadAboutTab], [TAB_TYPE_BUTTONS, loadButtonsTab], @@ -116,7 +116,7 @@ const tabLoaderMap = new Map([ ), ]); -/** tab saver functions for each Paranext tab type that wants to override the default */ +/** tab saver functions for each Platform tab type that wants to override the default */ const tabSaverMap = new Map([ [TAB_TYPE_WEBVIEW, saveWebViewTab], [TAB_TYPE_ERROR, saveErrorTab], @@ -170,8 +170,8 @@ export function loadTab(savedTabInfo: SavedTabInfo): RCDockTabInfo { // Translate the data from the loaded tab to be in the form needed by rc-dock return { ...tabInfo, - title: , - content: {tabInfo.content}, + title: , + content: {tabInfo.content}, group: TAB_GROUP, closable: true, }; @@ -418,14 +418,14 @@ export function addWebViewToDock( const tabId = webView.id; if (!tabId) throw new Error( - `paranext-dock-layout error: WebView of type ${webView.webViewType} has no id!`, + `platform-dock-layout error: WebView of type ${webView.webViewType} has no id!`, ); return addTabToDock({ id: tabId, tabType: TAB_TYPE_WEBVIEW, data: webView }, layout, dockLayout); } // #endregion -export default function ParanextDockLayout() { +export default function PlatformDockLayout() { // This ref will always be defined // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const dockLayoutRef = useRef(null!); diff --git a/src/renderer/components/docking/paranext-panel.component.css b/src/renderer/components/docking/platform-panel.component.css similarity index 100% rename from src/renderer/components/docking/paranext-panel.component.css rename to src/renderer/components/docking/platform-panel.component.css diff --git a/src/renderer/components/docking/paranext-panel.component.tsx b/src/renderer/components/docking/platform-panel.component.tsx similarity index 88% rename from src/renderer/components/docking/paranext-panel.component.tsx rename to src/renderer/components/docking/platform-panel.component.tsx index 6ecd2050dc..31520ab390 100644 --- a/src/renderer/components/docking/paranext-panel.component.tsx +++ b/src/renderer/components/docking/platform-panel.component.tsx @@ -1,5 +1,5 @@ import { ReactNode } from 'react'; -import './paranext-panel.component.css'; +import './platform-panel.component.css'; /** * Used for possible styling on every panel in Paranext diff --git a/src/renderer/components/docking/paranext-tab-title.component.css b/src/renderer/components/docking/platform-tab-title.component.css similarity index 100% rename from src/renderer/components/docking/paranext-tab-title.component.css rename to src/renderer/components/docking/platform-tab-title.component.css diff --git a/src/renderer/components/docking/paranext-tab-title.component.tsx b/src/renderer/components/docking/platform-tab-title.component.tsx similarity index 77% rename from src/renderer/components/docking/paranext-tab-title.component.tsx rename to src/renderer/components/docking/platform-tab-title.component.tsx index bb9104c5e3..5dd3d2c2d6 100644 --- a/src/renderer/components/docking/paranext-tab-title.component.tsx +++ b/src/renderer/components/docking/platform-tab-title.component.tsx @@ -1,7 +1,7 @@ -import './paranext-tab-title.component.css'; +import './platform-tab-title.component.css'; import logger from '@shared/services/logger.service'; -type ParanextTabTitleProps = { +type PlatformTabTitleProps = { /** Url to image to show on the tab. Defaults to Platform.Bible logo */ iconUrl?: string; /** Text to show on the tab */ @@ -9,10 +9,10 @@ type ParanextTabTitleProps = { }; /** - * Custom tab title for all tabs in Paranext + * Custom tab title for all tabs in Platform * @param text The text to show on the tab title */ -export default function ParanextTabTitle({ iconUrl, text }: ParanextTabTitleProps) { +export default function PlatformTabTitle({ iconUrl, text }: PlatformTabTitleProps) { const toggleDropdown = () => { logger.info('Pretend a menu was shown!'); }; diff --git a/src/renderer/components/project-components/download-update-project-tab.component.scss b/src/renderer/components/projects/download-update-project-tab.component.scss similarity index 100% rename from src/renderer/components/project-components/download-update-project-tab.component.scss rename to src/renderer/components/projects/download-update-project-tab.component.scss diff --git a/src/renderer/components/project-components/download-update-project-tab.component.tsx b/src/renderer/components/projects/download-update-project-tab.component.tsx similarity index 97% rename from src/renderer/components/project-components/download-update-project-tab.component.tsx rename to src/renderer/components/projects/download-update-project-tab.component.tsx index c758806789..6c9f2daff0 100644 --- a/src/renderer/components/project-components/download-update-project-tab.component.tsx +++ b/src/renderer/components/projects/download-update-project-tab.component.tsx @@ -15,7 +15,7 @@ import { useMemo } from 'react'; import ProjectList, { fetchProjects, Project, -} from '@renderer/components/project-components/project-list.component'; +} from '@renderer/components/projects/project-list.component'; import './download-update-project-tab.component.scss'; export const TAB_TYPE_DOWNLOAD_UPDATE_PROJECT_DIALOG = 'download-update-project-dialog'; diff --git a/src/renderer/components/project-components/open-multiple-projects-tab.component.scss b/src/renderer/components/projects/open-multiple-projects-tab.component.scss similarity index 100% rename from src/renderer/components/project-components/open-multiple-projects-tab.component.scss rename to src/renderer/components/projects/open-multiple-projects-tab.component.scss diff --git a/src/renderer/components/project-components/open-multiple-projects-tab.component.tsx b/src/renderer/components/projects/open-multiple-projects-tab.component.tsx similarity index 96% rename from src/renderer/components/project-components/open-multiple-projects-tab.component.tsx rename to src/renderer/components/projects/open-multiple-projects-tab.component.tsx index acbbd751c6..745ab6809e 100644 --- a/src/renderer/components/project-components/open-multiple-projects-tab.component.tsx +++ b/src/renderer/components/projects/open-multiple-projects-tab.component.tsx @@ -8,7 +8,7 @@ import { Button } from 'papi-components'; import ProjectList, { fetchProjects, Project, -} from '@renderer/components/project-components/project-list.component'; +} from '@renderer/components/projects/project-list.component'; import './open-multiple-projects-tab.component.scss'; export const TAB_TYPE_OPEN_MULTIPLE_PROJECTS_DIALOG = 'open-multiple-projects-dialog'; diff --git a/src/renderer/components/project-components/project-list.component.tsx b/src/renderer/components/projects/project-list.component.tsx similarity index 100% rename from src/renderer/components/project-components/project-list.component.tsx rename to src/renderer/components/projects/project-list.component.tsx diff --git a/src/renderer/hooks/papi-hooks/use-dialog-callback.hook.ts b/src/renderer/hooks/papi-hooks/use-dialog-callback.hook.ts index f8babe1e14..aec6141105 100644 --- a/src/renderer/hooks/papi-hooks/use-dialog-callback.hook.ts +++ b/src/renderer/hooks/papi-hooks/use-dialog-callback.hook.ts @@ -1,4 +1,4 @@ -import { DialogTabTypes, DialogTypes } from '@renderer/components/dialogs/dialog.data'; +import { DialogTabTypes, DialogTypes } from '@renderer/components/dialogs/dialog-definition.model'; import dialogService from '@shared/services/dialog.service'; import { getErrorMessage } from '@shared/utils/util'; import { useCallback, useEffect, useRef, useState } from 'react'; diff --git a/src/renderer/index.tsx b/src/renderer/index.tsx index 2bb0f7d458..9bc3944a26 100644 --- a/src/renderer/index.tsx +++ b/src/renderer/index.tsx @@ -5,7 +5,7 @@ import * as commandService from '@shared/services/command.service'; import * as webViewService from '@shared/services/web-view.service'; import logger from '@shared/services/logger.service'; import webViewProviderService from '@shared/services/web-view-provider.service'; -import { startDialogService } from '@renderer/services/dialog.service.host'; +import { startDialogService } from '@renderer/services/dialog.service-host'; import App from './app.component'; import { cleanupOldWebViewState } from './services/web-view-state.service'; diff --git a/src/renderer/services/dialog.service.host.ts b/src/renderer/services/dialog.service-host.ts similarity index 99% rename from src/renderer/services/dialog.service.host.ts rename to src/renderer/services/dialog.service-host.ts index d425f4bf0b..9b4a4a00b5 100644 --- a/src/renderer/services/dialog.service.host.ts +++ b/src/renderer/services/dialog.service-host.ts @@ -1,12 +1,12 @@ import { DialogData } from '@shared/models/dialog-options.model'; -import { CATEGORY_DIALOG, DialogService } from '@shared/services/dialog.service.model'; +import { CATEGORY_DIALOG, DialogService } from '@shared/services/dialog.service-model'; import * as networkService from '@shared/services/network.service'; import { aggregateUnsubscriberAsyncs, serializeRequestType } from '@shared/utils/papi-util'; import * as webViewService from '@shared/services/web-view.service'; import { newGuid } from '@shared/utils/util'; import logger from '@shared/services/logger.service'; import SELECT_PROJECT_DIALOG from '@renderer/components/dialogs/select-project.dialog'; -import { DialogTabTypes, DialogTypes } from '@renderer/components/dialogs/dialog.data'; +import { DialogTabTypes, DialogTypes } from '@renderer/components/dialogs/dialog-definition.model'; import { hookUpDialogService } from '@renderer/components/dialogs/dialog-base.data'; /** A live dialog request. Includes the dialog's id and the functions to run on receiving results */ diff --git a/src/renderer/services/papi-frontend.service.ts b/src/renderer/services/papi-frontend.service.ts index 53d382139c..06255fe897 100644 --- a/src/renderer/services/papi-frontend.service.ts +++ b/src/renderer/services/papi-frontend.service.ts @@ -12,7 +12,7 @@ import { papiNetworkService, PapiNetworkService } from '@shared/services/network import { papiWebViewService, PapiWebViewService } from '@shared/services/web-view.service'; import internetService, { InternetService } from '@shared/services/internet.service'; import dataProviderService, { DataProviderService } from '@shared/services/data-provider.service'; -import { ProjectLookupServiceType } from '@shared/services/project-lookup.service.model'; +import { ProjectLookupServiceType } from '@shared/services/project-lookup.service-model'; import projectLookupService from '@shared/services/project-lookup.service'; import { papiFrontendProjectDataProviderService, @@ -22,7 +22,7 @@ import papiContext, { PapiContext } from '@renderer/context/papi-context'; import papiHooks, { PapiHooks } from '@renderer/hooks/papi-hooks'; import settingsService, { SettingsService } from '@shared/services/settings.service'; import dialogService from '@shared/services/dialog.service'; -import { DialogService } from '@shared/services/dialog.service.model'; +import { DialogService } from '@shared/services/dialog.service-model'; // IMPORTANT NOTES: // 1) When adding new services here, consider whether they also belong in papi-backend.service.ts. diff --git a/src/shared/services/dialog.service.model.ts b/src/shared/services/dialog.service-model.ts similarity index 97% rename from src/shared/services/dialog.service.model.ts rename to src/shared/services/dialog.service-model.ts index 24fe72db3a..5759f2be10 100644 --- a/src/shared/services/dialog.service.model.ts +++ b/src/shared/services/dialog.service-model.ts @@ -1,4 +1,4 @@ -import { DialogTabTypes, DialogTypes } from '@renderer/components/dialogs/dialog.data'; +import { DialogTabTypes, DialogTypes } from '@renderer/components/dialogs/dialog-definition.model'; import { DialogOptions } from '@shared/models/dialog-options.model'; /** JSDOC SOURCE dialogService diff --git a/src/shared/services/dialog.service.ts b/src/shared/services/dialog.service.ts index 8896cfd900..93d32e05f3 100644 --- a/src/shared/services/dialog.service.ts +++ b/src/shared/services/dialog.service.ts @@ -1,5 +1,5 @@ import * as networkService from '@shared/services/network.service'; -import { CATEGORY_DIALOG, DialogService } from '@shared/services/dialog.service.model'; +import { CATEGORY_DIALOG, DialogService } from '@shared/services/dialog.service-model'; import { serializeRequestType } from '@shared/utils/papi-util'; let initializationPromise: Promise; diff --git a/src/shared/services/project-lookup.service.model.ts b/src/shared/services/project-lookup.service-model.ts similarity index 100% rename from src/shared/services/project-lookup.service.model.ts rename to src/shared/services/project-lookup.service-model.ts diff --git a/src/shared/services/project-lookup.service.ts b/src/shared/services/project-lookup.service.ts index a2025a94db..dce2105a7d 100644 --- a/src/shared/services/project-lookup.service.ts +++ b/src/shared/services/project-lookup.service.ts @@ -1,7 +1,7 @@ import { projectLookupServiceNetworkObjectName, ProjectLookupServiceType, -} from '@shared/services/project-lookup.service.model'; +} from '@shared/services/project-lookup.service-model'; import networkObjectService from '@shared/services/network-object.service'; let networkObject: ProjectLookupServiceType; diff --git a/src/shared/services/web-view.service.ts b/src/shared/services/web-view.service.ts index c2035d187e..131b1f6f79 100644 --- a/src/shared/services/web-view.service.ts +++ b/src/shared/services/web-view.service.ts @@ -43,7 +43,7 @@ export type OnLayoutChangeRCDock = ( direction?: DropDirection, ) => Promise; -/** Properties related to the dock layout provided by `paranext-dock-layout.component.tsx` */ +/** Properties related to the dock layout provided by `platform-dock-layout.component.tsx` */ type PapiDockLayout = { /** The rc-dock dock layout React element ref. Used to perform operations on the layout */ dockLayout: DockLayout; @@ -80,7 +80,7 @@ type PapiDockLayout = { * * TODO: This should be removed and the `testLayout` imported directly in this file once this * service is refactored to split the code between processes. The only reason this is passed from - * `paranext-dock-layout.component.tsx` is that we cannot import `testLayout` here since this + * `platform-dock-layout.component.tsx` is that we cannot import `testLayout` here since this * service is currently all shared code. Refactor should happen in #203 */ testLayout: LayoutBase; @@ -185,7 +185,7 @@ export const onDidAddWebView = onDidAddWebViewEmitter.event; /** * Variable that will hold the rc-dock dock layout along with a couple other props. This is - * populated by `paranext-dock-layout.component.tsx` registering its dock layout with this service, + * populated by `platform-dock-layout.component.tsx` registering its dock layout with this service, * allowing this service to manage layouts and such. * * WARNING: YOU CAN ONLY USE THIS VARIABLE IN THE RENDERER. Also please do not save this @@ -229,7 +229,7 @@ export function convertWebViewDefinitionToSaved( /** Create a new dock layout promise variable */ function createDockLayoutAsyncVar(): AsyncVariable { return new AsyncVariable( - 'web-view.service.paranextDockLayout', + 'web-view.service.platformDockLayout', // Use default timeout on renderer, but never timeout anywhere else because we will not be // resolving this. One of the serious pains of not having #203 isRenderer() ? undefined : -1,