From 11ca5b6eae62465ba1656b5ea0c6c6c9f3b02a55 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 12 Sep 2023 07:40:38 -0400 Subject: [PATCH] docs(spelling): Add codespell config + github action, run and fix a good number of typos (#3645) --- .codespellrc | 6 +++++ .github/workflows/codespell.yml | 22 +++++++++++++++++++ extensions/cornerstone-dicom-sr/src/index.tsx | 2 +- .../utils/findMostRecentStructuredReport.js | 2 +- .../src/Viewport/Overlays/utils.ts | 2 +- extensions/cornerstone/src/state.ts | 2 +- .../src/utils/getInterleavedFrames.js | 2 +- .../ContextMenuController.tsx | 4 ++-- .../src/CustomizableContextMenu/types.ts | 4 ++-- .../default/src/DicomWebDataSource/index.js | 2 +- .../retrieveStudyMetadata.js | 2 +- .../src/Panels/PanelMeasurementTable.tsx | 4 ++-- extensions/default/src/commandsModule.ts | 2 +- .../default/src/findViewportsByPosition.ts | 2 +- .../src/DicomMicroscopySRSopClassHandler.js | 2 +- .../src/components/ViewportOverlay/utils.ts | 2 +- .../src/services/MicroscopyService.ts | 4 ++-- .../src/tools/viewerManager.js | 4 ++-- .../src/utils/RoiAnnotation.js | 2 +- .../dicom-microscopy/src/utils/loadSR.js | 2 +- .../study-list/OHIFStudyList.spec.js | 2 +- platform/app/cypress/support/aliases.js | 2 +- platform/app/public/_redirects | 2 +- platform/app/src/__tests__/globalSetup.js | 2 +- platform/app/src/appInit.js | 2 +- platform/core/README.md | 2 +- platform/core/src/classes/MetadataProvider.js | 2 +- .../HangingProtocolService.ts | 2 +- .../MeasurementService/MeasurementService.ts | 2 +- .../StateSyncService/StateSyncService.ts | 2 +- .../services/ToolBarService/ToolbarService.ts | 2 +- platform/core/src/types/HangingProtocol.ts | 2 +- platform/core/src/utils/Queue.js | 2 +- .../core/src/utils/hierarchicalListUtils.js | 4 ++-- platform/core/src/utils/objectPath.js | 2 +- .../core/src/utils/progressTrackingUtils.js | 6 ++--- platform/core/src/utils/splitComma.ts | 2 +- platform/docs/docs/README.md | 2 +- .../docs/configuration/configurationFiles.md | 4 ++-- platform/docs/docs/configuration/url.md | 2 +- platform/docs/docs/deployment/docker.md | 2 +- platform/docs/docs/deployment/index.md | 4 ++-- ...tegration.md => continuous-integration.md} | 0 platform/docs/docs/development/our-process.md | 2 +- platform/docs/docs/migration-guide.md | 2 +- .../docs/docs/platform/extensions/index.md | 6 ++--- .../extensions/modules/layout-template.md | 2 +- .../docs/platform/internationalization.md | 4 ++-- platform/docs/docs/platform/modes/index.md | 2 +- .../services/data/HangingProtocolService.md | 6 ++--- .../services/data/StateSyncService.md | 2 +- .../services/ui/customization-service.md | 6 ++--- platform/docs/docs/release-notes.md | 4 ++-- platform/docs/docs/resources.md | 2 +- platform/docs/src/pages/help.md | 2 +- .../essentials/meteor-packages.md | 2 +- .../version-1.0-deprecated/faq/technical.md | 2 +- .../version-2.0-deprecated/Architecture.md | 2 +- .../deployment/index.md | 4 ++-- .../recipes/build-for-production.md | 2 +- .../recipes/nginx--image-archive.md | 6 ++--- .../deployment/recipes/static-assets.md | 2 +- .../recipes/user-account-control.md | 2 +- ...tegration.md => continuous-integration.md} | 6 ++--- .../development/getting-started.md | 2 +- .../development/testing.md | 2 +- .../extensions/index.md | 2 +- .../extensions/modules/commands.md | 4 ++-- .../extensions/modules/toolbar.md | 2 +- .../faq/browser-support.md | 2 +- .../faq/scope-of-project.md | 6 ++--- .../version-2.0-deprecated/help.md | 2 +- .../version-2.0-deprecated/our-process.md | 2 +- .../viewer/internationalization.md | 4 ++-- .../ui/src/components/TableCell/TableCell.tsx | 2 +- .../src/contextProviders/DialogProvider.tsx | 2 +- 76 files changed, 128 insertions(+), 100 deletions(-) create mode 100644 .codespellrc create mode 100644 .github/workflows/codespell.yml rename platform/docs/docs/development/{continous-integration.md => continuous-integration.md} (100%) rename platform/docs/versioned_docs/version-2.0-deprecated/development/{continous-integration.md => continuous-integration.md} (97%) diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 00000000000..ab57ad157a0 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,6 @@ +[codespell] +skip = .git,*.pdf,*.svg,yarn.lock,*.min.js,locales +# ignore words ending with … and some camelcased variables and names +ignore-regex = \b\S+…\S*|\b(doubleClick|afterAll|PostgresSQL)\b|\bWee, L\.|.*te.*Telugu.* +# some odd variables +ignore-words-list = datea,ser,childrens diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 00000000000..7373affc383 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,22 @@ +--- +name: Codespell + +on: + push: + branches: [master] + pull_request: + branches: [master] + +permissions: + contents: read + +jobs: + codespell: + name: Check for spelling errors + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Codespell + uses: codespell-project/actions-codespell@v2 diff --git a/extensions/cornerstone-dicom-sr/src/index.tsx b/extensions/cornerstone-dicom-sr/src/index.tsx index 72829f2b75a..9b0700481ed 100644 --- a/extensions/cornerstone-dicom-sr/src/index.tsx +++ b/extensions/cornerstone-dicom-sr/src/index.tsx @@ -54,7 +54,7 @@ const dicomSRExtension = { }, getCommandsModule, getSopClassHandlerModule, - // Include dynmically computed values such as toolNames not known till instantiation + // Include dynamically computed values such as toolNames not known till instantiation getUtilityModule({ servicesManager }) { return [ { diff --git a/extensions/cornerstone-dicom-sr/src/utils/findMostRecentStructuredReport.js b/extensions/cornerstone-dicom-sr/src/utils/findMostRecentStructuredReport.js index 7b860c84c74..138d72df983 100644 --- a/extensions/cornerstone-dicom-sr/src/utils/findMostRecentStructuredReport.js +++ b/extensions/cornerstone-dicom-sr/src/utils/findMostRecentStructuredReport.js @@ -44,7 +44,7 @@ const isStructuredReportSeries = series => { }; /** - * Checkes if series1 is newer than series2 + * Checks if series1 is newer than series2 * * @param {Object} series1 - Series Metadata 1 * @param {Object} series2 - Series Metadata 2 diff --git a/extensions/cornerstone/src/Viewport/Overlays/utils.ts b/extensions/cornerstone/src/Viewport/Overlays/utils.ts index dece879c6a1..54f164add35 100644 --- a/extensions/cornerstone/src/Viewport/Overlays/utils.ts +++ b/extensions/cornerstone/src/Viewport/Overlays/utils.ts @@ -75,7 +75,7 @@ export function formatPN(name) { * Gets compression type * * @param {number} imageId - * @returns {string} comrpession type. + * @returns {string} compression type. */ export function getCompression(imageId) { const generalImageModule = metaData.get('generalImageModule', imageId) || {}; diff --git a/extensions/cornerstone/src/state.ts b/extensions/cornerstone/src/state.ts index 4af81e7de8e..76afcdbb8d6 100644 --- a/extensions/cornerstone/src/state.ts +++ b/extensions/cornerstone/src/state.ts @@ -19,7 +19,7 @@ const setEnabledElement = (viewportId: string, element: HTMLElement, context?: s }; /** - * Grabs the enabled element `dom` reference of an ative viewport. + * Grabs the enabled element `dom` reference of an active viewport. * * @return {HTMLElement} Active viewport element. */ diff --git a/extensions/cornerstone/src/utils/getInterleavedFrames.js b/extensions/cornerstone/src/utils/getInterleavedFrames.js index d8eae131a21..b380a9350b3 100644 --- a/extensions/cornerstone/src/utils/getInterleavedFrames.js +++ b/extensions/cornerstone/src/utils/getInterleavedFrames.js @@ -30,7 +30,7 @@ export default function getInterleavedFrames(imageIds) { !prefetchQueuedFilled.currentPositionUpToMaximum ) { if (!prefetchQueuedFilled.currentPositionDownToMinimum) { - // Add imageId bellow + // Add imageId below lowerImageIdIndex--; imageIdsToPrefetch.push({ imageId: imageIds[lowerImageIdIndex], diff --git a/extensions/default/src/CustomizableContextMenu/ContextMenuController.tsx b/extensions/default/src/CustomizableContextMenu/ContextMenuController.tsx index 0fdb2f88ba0..9d65b971d87 100644 --- a/extensions/default/src/CustomizableContextMenu/ContextMenuController.tsx +++ b/extensions/default/src/CustomizableContextMenu/ContextMenuController.tsx @@ -69,8 +69,8 @@ export default class ContextMenuController { event, content: ContextMenu, - // This naming is part of hte uiDialogService convention - // Clicking outside simpy closes the dialog box. + // This naming is part of the uiDialogService convention + // Clicking outside simply closes the dialog box. onClickOutside: () => this.services.uiDialogService.dismiss({ id: 'context-menu' }), contentProps: { diff --git a/extensions/default/src/CustomizableContextMenu/types.ts b/extensions/default/src/CustomizableContextMenu/types.ts index 23075d05787..c251fd33d79 100644 --- a/extensions/default/src/CustomizableContextMenu/types.ts +++ b/extensions/default/src/CustomizableContextMenu/types.ts @@ -5,7 +5,7 @@ import { Types } from '@ohif/core'; * menu item for display. * An instance of SelectorProps is provided to the selector functions, which * return true to include the item or false to exclude it. - * The point of this is to allow more specific conext menus which hide + * The point of this is to allow more specific context menus which hide * non-relevant menu options, optimizing the speed of selection of menus */ export interface SelectorProps { @@ -69,7 +69,7 @@ export interface MenuItem { // or more importantly, if the delegating subMenu will be included. selector?: (props: SelectorProps) => boolean; - /** Adapts the item by filling in additional properties as requried */ + /** Adapts the item by filling in additional properties as required */ adaptItem?: (item: MenuItem, props: ContextMenuProps) => UIMenuItem; /** List of commands to run when this item's action is taken. */ diff --git a/extensions/default/src/DicomWebDataSource/index.js b/extensions/default/src/DicomWebDataSource/index.js index 650e29f38f9..688aa4f0037 100644 --- a/extensions/default/src/DicomWebDataSource/index.js +++ b/extensions/default/src/DicomWebDataSource/index.js @@ -343,7 +343,7 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) { const addRetrieveBulkData = instance => { const naturalized = naturalizeDataset(instance); - // if we konw the server doesn't use bulkDataURI, then don't + // if we know the server doesn't use bulkDataURI, then don't if (!dicomWebConfig.bulkDataURI?.enabled) { return naturalized; } diff --git a/extensions/default/src/DicomWebDataSource/retrieveStudyMetadata.js b/extensions/default/src/DicomWebDataSource/retrieveStudyMetadata.js index 86baecb4dd5..e4882d05e84 100644 --- a/extensions/default/src/DicomWebDataSource/retrieveStudyMetadata.js +++ b/extensions/default/src/DicomWebDataSource/retrieveStudyMetadata.js @@ -9,7 +9,7 @@ const StudyMetaDataPromises = new Map(); * * @param {Object} server Object with server configuration parameters * @param {string} StudyInstanceUID The UID of the Study to be retrieved - * @param {boolean} enabledStudyLazyLoad Whether the study metadata should be loaded asynchronusly. + * @param {boolean} enabledStudyLazyLoad Whether the study metadata should be loaded asynchronously. * @param {function} storeInstancesCallback A callback used to store the retrieved instance metadata. * @param {Object} [filters] - Object containing filters to be applied on retrieve metadata process * @param {string} [filter.seriesInstanceUID] - series instance uid to filter results against diff --git a/extensions/default/src/Panels/PanelMeasurementTable.tsx b/extensions/default/src/Panels/PanelMeasurementTable.tsx index 2ff2414fe96..65b37018154 100644 --- a/extensions/default/src/Panels/PanelMeasurementTable.tsx +++ b/extensions/default/src/Panels/PanelMeasurementTable.tsx @@ -99,7 +99,7 @@ export default function PanelMeasurementTable({ ? 'Research Derived Series' // default : promptResult.value; // provided value - // Re-use an existing series having the same series description to avoid + // Reuse an existing series having the same series description to avoid // creating too many series instances. const options = findSRWithSameSeriesDescription(SeriesDescription, displaySetService); @@ -236,7 +236,7 @@ function _getMappedMeasurements(measurementService) { /** * Map the measurements to the display text. - * Adds finding and site inforamtion to the displayText and/or label, + * Adds finding and site information to the displayText and/or label, * and provides as 'displayText' and 'label', while providing the original * values as baseDisplayText and baseLabel */ diff --git a/extensions/default/src/commandsModule.ts b/extensions/default/src/commandsModule.ts index 3325ad99c02..280f540c455 100644 --- a/extensions/default/src/commandsModule.ts +++ b/extensions/default/src/commandsModule.ts @@ -182,7 +182,7 @@ const commandsModule = ({ stateSyncReduce; if (!protocolId) { - // Re-use the previous protocol id, and optionally stage + // Reuse the previous protocol id, and optionally stage protocolId = hpInfo.protocolId; if (stageId === undefined && stageIndex === undefined) { stageIndex = hpInfo.stageIndex; diff --git a/extensions/default/src/findViewportsByPosition.ts b/extensions/default/src/findViewportsByPosition.ts index 984a80e4c2e..6b8b54ab7bd 100644 --- a/extensions/default/src/findViewportsByPosition.ts +++ b/extensions/default/src/findViewportsByPosition.ts @@ -3,7 +3,7 @@ import { StateSyncService } from '@ohif/core'; /** * This find or create viewport is paired with the reduce results from * below, and the action of this viewport is to look for previously filled - * viewports, and to re-use by position id. If there is no filled viewport, + * viewports, and to reuse by position id. If there is no filled viewport, * then one can be re-used from the display set if it isn't going to be displayed. * @param hangingProtocolService - bound parameter supplied before using this * @param viewportsByPosition - bound parameter supplied before using this diff --git a/extensions/dicom-microscopy/src/DicomMicroscopySRSopClassHandler.js b/extensions/dicom-microscopy/src/DicomMicroscopySRSopClassHandler.js index 5d05e533574..a195a801e8a 100644 --- a/extensions/dicom-microscopy/src/DicomMicroscopySRSopClassHandler.js +++ b/extensions/dicom-microscopy/src/DicomMicroscopySRSopClassHandler.js @@ -42,7 +42,7 @@ function _getDisplaySetsFromSeries(instances, servicesManager, extensionManager) const instance = instances[0]; // TODO ! Consumption of DICOMMicroscopySRSOPClassHandler to a derived dataset or normal dataset? - // TOOD -> Easy to swap this to a "non-derived" displaySet, but unfortunately need to put it in a different extension. + // TODO -> Easy to swap this to a "non-derived" displaySet, but unfortunately need to put it in a different extension. const naturalizedDataset = DicomMetadataStore.getSeries( instance.StudyInstanceUID, instance.SeriesInstanceUID diff --git a/extensions/dicom-microscopy/src/components/ViewportOverlay/utils.ts b/extensions/dicom-microscopy/src/components/ViewportOverlay/utils.ts index 8a467ed2b20..9dfa63aeff6 100644 --- a/extensions/dicom-microscopy/src/components/ViewportOverlay/utils.ts +++ b/extensions/dicom-microscopy/src/components/ViewportOverlay/utils.ts @@ -78,7 +78,7 @@ export function formatPN(name) { * Gets compression type * * @param {number} imageId - * @returns {string} comrpession type. + * @returns {string} compression type. */ export function getCompression(imageId) { const generalImageModule = cornerstone.metaData.get('generalImageModule', imageId) || {}; diff --git a/extensions/dicom-microscopy/src/services/MicroscopyService.ts b/extensions/dicom-microscopy/src/services/MicroscopyService.ts index cc761f30498..78ba545c2e9 100644 --- a/extensions/dicom-microscopy/src/services/MicroscopyService.ts +++ b/extensions/dicom-microscopy/src/services/MicroscopyService.ts @@ -48,7 +48,7 @@ export default class MicroscopyService extends PubSubService { } /** - * Cleares all the annotations and managed viewers, setting the manager state + * Clears all the annotations and managed viewers, setting the manager state * to its initial state */ clear() { @@ -357,7 +357,7 @@ export default class MicroscopyService extends PubSubService { /** * Removes the given third-party viewer API's object from the managed viewers - * and cleares all its event subscriptions + * and clears all its event subscriptions * * @param {Object} viewer Third-party viewer API's object to be removed */ diff --git a/extensions/dicom-microscopy/src/tools/viewerManager.js b/extensions/dicom-microscopy/src/tools/viewerManager.js index 6e9a1183466..b7f3dac8a18 100644 --- a/extensions/dicom-microscopy/src/tools/viewerManager.js +++ b/extensions/dicom-microscopy/src/tools/viewerManager.js @@ -109,7 +109,7 @@ class ViewerManager extends PubSubService { } /** - * Cleares all the relevant event handlers for the third-party API + * Clears all the relevant event handlers for the third-party API */ unregisterEvents() { this.container.removeEventListener(ApiEvents.ROI_ADDED, this.onRoiAdded); @@ -205,7 +205,7 @@ class ViewerManager extends PubSubService { * @param {String} label The label of the annotation. */ addRoiGraphicWithLabel(roiGraphic, label) { - // NOTE: Dicom Microscopy Viewer will override styles for "Text" evalutations + // NOTE: Dicom Microscopy Viewer will override styles for "Text" evaluations // to hide all other geometries, we are not going to use its label. // if (label) { // if (!roiGraphic.properties) roiGraphic.properties = {}; diff --git a/extensions/dicom-microscopy/src/utils/RoiAnnotation.js b/extensions/dicom-microscopy/src/utils/RoiAnnotation.js index 879f18b6d29..550a791008b 100644 --- a/extensions/dicom-microscopy/src/utils/RoiAnnotation.js +++ b/extensions/dicom-microscopy/src/utils/RoiAnnotation.js @@ -151,7 +151,7 @@ class RoiAnnotation extends PubSubService { /** * Returns the geometry type of the annotation concatenated with the label * defined for the annotation. - * Difference with getDetailedLabel() is that this will return empty string for empy + * Difference with getDetailedLabel() is that this will return empty string for empty * label. * * @returns {String} Text with geometry type and label diff --git a/extensions/dicom-microscopy/src/utils/loadSR.js b/extensions/dicom-microscopy/src/utils/loadSR.js index 9866cbb87e0..cf9509b8181 100644 --- a/extensions/dicom-microscopy/src/utils/loadSR.js +++ b/extensions/dicom-microscopy/src/utils/loadSR.js @@ -31,7 +31,7 @@ export default async function loadSR( // NOTE: When saving Microscopy SR, we are attaching identifier property // to each ROI, and when read for display, it is coming in as "TEXT" // evaluation. - // As the Dicom Microscopy Viewer will override styles for "Text" evalutations + // As the Dicom Microscopy Viewer will override styles for "Text" evaluations // to hide all other geometries, we are going to manually remove that // evaluation item. const roi = rois[i]; diff --git a/platform/app/cypress/integration/study-list/OHIFStudyList.spec.js b/platform/app/cypress/integration/study-list/OHIFStudyList.spec.js index 9f429f92065..9809a1b7c51 100644 --- a/platform/app/cypress/integration/study-list/OHIFStudyList.spec.js +++ b/platform/app/cypress/integration/study-list/OHIFStudyList.spec.js @@ -1,5 +1,5 @@ //We are keeping the hardcoded results values for the study list tests -//this is intended to be running in a controled docker environment with test data. +//this is intended to be running in a controlled docker environment with test data. describe('OHIF Study List', function () { context('Desktop resolution', function () { beforeEach(function () { diff --git a/platform/app/cypress/support/aliases.js b/platform/app/cypress/support/aliases.js index 1bee68c4665..1bda29b36a2 100644 --- a/platform/app/cypress/support/aliases.js +++ b/platform/app/cypress/support/aliases.js @@ -61,7 +61,7 @@ export function initStudyListAliasesOnDesktop() { cy.get('[data-cy="study-list-results"] > tr').as('searchResult2'); // We can't use data attributes (e.g. data--cy) for these since - // they are using third party libraires (i.e. react-dates, react-select) + // they are using third party libraries (i.e. react-dates, react-select) cy.get('#date-range-studyDate-start-date').as('studyListStartDate'); cy.get('#date-range-studyDate-end-date').as('studyListEndDate'); cy.get('#input-modalities').as('modalities'); diff --git a/platform/app/public/_redirects b/platform/app/public/_redirects index 9730bd0d3c5..c3f7726c347 100644 --- a/platform/app/public/_redirects +++ b/platform/app/public/_redirects @@ -1,6 +1,6 @@ # Specific to our deploy-preview # Our docs are published using CircleCI + GitBook -# Confgure redirects using netlify.toml +# Configure redirects using netlify.toml # Spa /* /index.html 200 diff --git a/platform/app/src/__tests__/globalSetup.js b/platform/app/src/__tests__/globalSetup.js index bda26ab1a6c..0aae7f58464 100644 --- a/platform/app/src/__tests__/globalSetup.js +++ b/platform/app/src/__tests__/globalSetup.js @@ -2,7 +2,7 @@ const _ = require('lodash'); const originalConsoleError = console.error; // JSDom's CSS Parser has limited support for certain features -// This supresses error warnings caused by it +// This suppresses error warnings caused by it console.error = function (msg) { if (_.startsWith(msg, 'Error: Could not parse CSS stylesheet')) { return; diff --git a/platform/app/src/appInit.js b/platform/app/src/appInit.js index 540dae83ecd..168d05a045c 100644 --- a/platform/app/src/appInit.js +++ b/platform/app/src/appInit.js @@ -89,7 +89,7 @@ async function appInit(appConfigOrFunc, defaultExtensions, defaultModes) { const loadedModes = await loadModules([...(appConfig.modes || []), ...defaultModes]); - // This is the name for the loaded istance object + // This is the name for the loaded instance object appConfig.loadedModes = []; const modesById = new Set(); for (let i = 0; i < loadedModes.length; i++) { diff --git a/platform/core/README.md b/platform/core/README.md index ac3b6c6bd91..ff8f555467d 100644 --- a/platform/core/README.md +++ b/platform/core/README.md @@ -42,7 +42,7 @@ implementation][react-viewer]. ### Install -> This library is pre- v1.0. All realeases until a v1.0 have the possibility of +> This library is pre- v1.0. All releases until a v1.0 have the possibility of > introducing breaking changes. Please depend on an "exact" version in your > projects to prevent issues caused by loose versioning. diff --git a/platform/core/src/classes/MetadataProvider.js b/platform/core/src/classes/MetadataProvider.js index 58933f8c9e7..41e6cdbc6db 100644 --- a/platform/core/src/classes/MetadataProvider.js +++ b/platform/core/src/classes/MetadataProvider.js @@ -498,7 +498,7 @@ const WADO_IMAGE_LOADER_TAGS = { OVERLAY_PLANE_MODULE: 'overlayPlaneModule', PATIENT_DEMOGRAPHIC_MODULE: 'patientDemographicModule', - // react-cornerstone-viewport specifc + // react-cornerstone-viewport specific PATIENT_MODULE: 'patientModule', GENERAL_IMAGE_MODULE: 'generalImageModule', GENERAL_STUDY_MODULE: 'generalStudyModule', diff --git a/platform/core/src/services/HangingProtocolService/HangingProtocolService.ts b/platform/core/src/services/HangingProtocolService/HangingProtocolService.ts index ddbd836631c..06e2e2c6743 100644 --- a/platform/core/src/services/HangingProtocolService/HangingProtocolService.ts +++ b/platform/core/src/services/HangingProtocolService/HangingProtocolService.ts @@ -362,7 +362,7 @@ export default class HangingProtocolService extends PubSubService { * @param params is the dataset to run the hanging protocol on. * @param params.activeStudy is the "primary" study to hang This may or may * not be displayed by the actual viewports. - * @param params.studies is the list of studies to hang. If absent, will re-use the previous set. + * @param params.studies is the list of studies to hang. If absent, will reuse the previous set. * @param params.displaySets is the list of display sets associated with * the studies to display in viewports. * @param protocol is a specific protocol to apply. diff --git a/platform/core/src/services/MeasurementService/MeasurementService.ts b/platform/core/src/services/MeasurementService/MeasurementService.ts index 9671d220072..dde9ff4d217 100644 --- a/platform/core/src/services/MeasurementService/MeasurementService.ts +++ b/platform/core/src/services/MeasurementService/MeasurementService.ts @@ -517,7 +517,7 @@ class MeasurementService extends PubSubService { }; if (oldMeasurement) { - // TODO: Ultimately, each annotation should have a selected flag right from the soure. + // TODO: Ultimately, each annotation should have a selected flag right from the source. // For now, it is just added in OHIF here and in setMeasurementSelected. this.measurements.set(internalUID, newMeasurement); if (isUpdate) { diff --git a/platform/core/src/services/StateSyncService/StateSyncService.ts b/platform/core/src/services/StateSyncService/StateSyncService.ts index aead030eb4d..ef0d6a3624a 100644 --- a/platform/core/src/services/StateSyncService/StateSyncService.ts +++ b/platform/core/src/services/StateSyncService/StateSyncService.ts @@ -6,7 +6,7 @@ const EVENTS = {}; type Obj = Record; type StateConfig = { - /** clearOnModeExit defines state configuraion that is cleared automatically on + /** clearOnModeExit defines state configuration that is cleared automatically on * exiting a mode. This clearing occurs after the mode onModeExit, * so it is possible to preserve desired state during exit to be restored * later. diff --git a/platform/core/src/services/ToolBarService/ToolbarService.ts b/platform/core/src/services/ToolBarService/ToolbarService.ts index 9684c2a00c0..e79808296fa 100644 --- a/platform/core/src/services/ToolBarService/ToolbarService.ts +++ b/platform/core/src/services/ToolBarService/ToolbarService.ts @@ -152,7 +152,7 @@ export default class ToolbarService extends PubSubService { // unsubscribe = commandsManager.runCommand(commandName, commandOptions); // } - // // Storing the unsubscribe for later reseting + // // Storing the unsubscribe for later resetting // if (unsubscribe && typeof unsubscribe === 'function') { // if (this.unsubscriptions.indexOf(unsubscribe) === -1) { // this.unsubscriptions.push(unsubscribe); diff --git a/platform/core/src/types/HangingProtocol.ts b/platform/core/src/types/HangingProtocol.ts index 73ae88ff2ee..797028f3815 100644 --- a/platform/core/src/types/HangingProtocol.ts +++ b/platform/core/src/types/HangingProtocol.ts @@ -257,7 +257,7 @@ export type ProtocolNotifications = { * It is a set of rules about when the protocol can be applied at all, * as well as a set of stages that represent indivividual views. * Additionally, the display set selectors are used to choose from the existing - * display sets. The hanging protcol definition here does NOT allow + * display sets. The hanging protocol definition here does NOT allow * redefining the display sets to use, but only selects the views to show. */ export type Protocol = { diff --git a/platform/core/src/utils/Queue.js b/platform/core/src/utils/Queue.js index afe64cc00a8..34149bcfce3 100644 --- a/platform/core/src/utils/Queue.js +++ b/platform/core/src/utils/Queue.js @@ -8,7 +8,7 @@ export default class Queue { /** * Creates a new "proxy" function associated with the current execution queue * instance. When the returned function is invoked, the queue limit is checked - * to make sure the limit of scheduled tasks is repected (throwing an + * to make sure the limit of scheduled tasks is respected (throwing an * exception when the limit has been reached and before calling the original * function). The original function is only invoked after all the previously * scheduled tasks have finished executing (their returned promises have diff --git a/platform/core/src/utils/hierarchicalListUtils.js b/platform/core/src/utils/hierarchicalListUtils.js index 06623f69f07..ca12c7752c4 100644 --- a/platform/core/src/utils/hierarchicalListUtils.js +++ b/platform/core/src/utils/hierarchicalListUtils.js @@ -36,11 +36,11 @@ function addToList(list, ...values) { * once for each leaf-node of the tree. The ancestors of the leaf-node being * visited are passed to the callback function along with the leaf-node in * the exact same order they appear on the tree (from root to leaf); - * @ For example, if the hierachy `a > b > c` appears on the tree ("a" being + * @ For example, if the hierarchy `a > b > c` appears on the tree ("a" being * the root and "c" being the leaf) the callback function will be called as: * callback('a', 'b', 'c'); * @param {Array} list The hierarchical list to be iterated - * @param {function} callback The callback which will be exected once for + * @param {function} callback The callback which will be executed once for * each leaf-node of the hierarchical list; * @returns {Array} Returns the provided list or null for bad arguments; */ diff --git a/platform/core/src/utils/objectPath.js b/platform/core/src/utils/objectPath.js index a35936fb98a..feae26db21e 100644 --- a/platform/core/src/utils/objectPath.js +++ b/platform/core/src/utils/objectPath.js @@ -6,7 +6,7 @@ export class ObjectPath { * @param path {String} A string representing the property to be set, e.g. "user.study.series.timepoint". * @param value {Any} The value of the property that will be set. * @return {Boolean} Returns "true" on success, "false" if any intermediate component of the supplied path - * ... is not a valid Object, in which case the property cannot be set. No excpetions are thrown. + * ... is not a valid Object, in which case the property cannot be set. No exceptions are thrown. */ static set(object, path, value) { let components = ObjectPath.getPathComponents(path), diff --git a/platform/core/src/utils/progressTrackingUtils.js b/platform/core/src/utils/progressTrackingUtils.js index 9d25ac02fc0..7ff2f826188 100644 --- a/platform/core/src/utils/progressTrackingUtils.js +++ b/platform/core/src/utils/progressTrackingUtils.js @@ -114,7 +114,7 @@ function finish(task) { /** * Generate a summarized snapshot of the current status of the given task List * @param {Object} list The List instance to be scanned - * @returns {Object} An obeject representing the summarized status of the list + * @returns {Object} An object representing the summarized status of the list */ function getOverallProgress(list) { const status = createStatus(); @@ -223,7 +223,7 @@ function getTaskByName(list, name) { * @param {Object} list The List instance to which the observer will be appended * @param {Function} observer The observer (function) that will be executed * every time a change happens within the list - * @returns {boolean} Returns true on success and false otherewise + * @returns {boolean} Returns true on success and false otherwise */ function addObserver(list, observer) { if (isList(list) && Array.isArray(list.observers) && typeof observer === 'function') { @@ -237,7 +237,7 @@ function addObserver(list, observer) { * Removes an observer (callback function) from a given List instance * @param {Object} list The instance List from which the observer will removed * @param {Function} observer The observer function to be removed - * @returns {boolean} Returns true on success and false otherewise + * @returns {boolean} Returns true on success and false otherwise */ function removeObserver(list, observer) { if (isList(list) && Array.isArray(list.observers) && list.observers.length > 0) { diff --git a/platform/core/src/utils/splitComma.ts b/platform/core/src/utils/splitComma.ts index 8140f9147b6..922a944e1bd 100644 --- a/platform/core/src/utils/splitComma.ts +++ b/platform/core/src/utils/splitComma.ts @@ -1,4 +1,4 @@ -/** Splits a list of stirngs by commas within the strings */ +/** Splits a list of strings by commas within the strings */ const splitComma = (strings: string[]): string[] => { if (!strings) { return null; diff --git a/platform/docs/docs/README.md b/platform/docs/docs/README.md index bcfd90047c9..3f6446dd13c 100644 --- a/platform/docs/docs/README.md +++ b/platform/docs/docs/README.md @@ -18,7 +18,7 @@ Key features: Offers a Data Source API for communicating with archives over proprietary API formats. - Provides a plugin framework for creating task-based workflow modes which can - re-use core functionality. + reuse core functionality. - Beautiful user interface (UI) designed with extensibility in mind. UI components available in a reusable component library built with React.js and Tailwind CSS diff --git a/platform/docs/docs/configuration/configurationFiles.md b/platform/docs/docs/configuration/configurationFiles.md index 238260e464c..f33ecd671fe 100644 --- a/platform/docs/docs/configuration/configurationFiles.md +++ b/platform/docs/docs/configuration/configurationFiles.md @@ -117,7 +117,7 @@ Here are a list of some options available: decoding. Defaults to minimum of `navigator.hardwareConcurrency` and what is specified by `maxNumberOfWebWorkers`. Some windows machines require smaller values. - `acceptHeader` : accept header to request specific dicom transfer syntax ex : [ 'multipart/related; type=image/jls; q=1', 'multipart/related; type=application/octet-stream; q=0.1' ] -- `requestTransferSyntaxUID` : Request a specific Tansfer syntax from dicom web server ex: 1.2.840.10008.1.2.4.80 (applyed only if acceptHeader is not set) +- `requestTransferSyntaxUID` : Request a specific Tansfer syntax from dicom web server ex: 1.2.840.10008.1.2.4.80 (applied only if acceptHeader is not set) - `omitQuotationForMultipartRequest`: Some servers (e.g., .NET) require the `multipart/related` request to be sent without quotation marks. Defaults to `false`. If your server doesn't require this, then setting this flag to `true` might improve performance (by removing the need for preflight requests). Also note that if auth headers are used, a preflight request is required. - `maxNumRequests`: The maximum number of requests to allow in parallel. It is an object with keys of `interaction`, `thumbnail`, and `prefetch`. You can specify a specific number for each type. @@ -178,7 +178,7 @@ if auth headers are used, a preflight request is required. - `dangerouslyUseDynamicConfig`: Dynamic config allows user to pass `configUrl` query string. This allows to load config without recompiling application. If the `configUrl` query string is passed, the worklist and modes will load from the referenced json rather than the default .env config. If there is no `configUrl` path provided, the default behaviour is used and there should not be any deviation from current user experience.
Points to consider while using `dangerouslyUseDynamicConfig`:
- User have to enable this feature by setting `dangerouslyUseDynamicConfig.enabled:true`. By default it is `false`. - - Regex helps to avoid easy exploit. Dafault is `/.*/`. Setup your own regex to choose a specific source of configuration only. + - Regex helps to avoid easy exploit. Default is `/.*/`. Setup your own regex to choose a specific source of configuration only. - System administrators can return `cross-origin: same-origin` with OHIF files to disallow any loading from other origin. It will block read access to resources loaded from a different origin to avoid potential attack vector. - Example config: ```js diff --git a/platform/docs/docs/configuration/url.md b/platform/docs/docs/configuration/url.md index 444146a198a..4382bd04aa5 100644 --- a/platform/docs/docs/configuration/url.md +++ b/platform/docs/docs/configuration/url.md @@ -109,7 +109,7 @@ You can open more than one study in the Viewer by adding the `StudyInstanceUIDs` :::tip -You can ues this feature to open a current and prior study in the Viewer. +You can use this feature to open a current and prior study in the Viewer. Read more in the [Hanging Protocol Module](../platform/extensions/modules/hpModule.md#matching-on-prior-study-with-uid) section. You can also use commas to separate values. diff --git a/platform/docs/docs/deployment/docker.md b/platform/docs/docs/deployment/docker.md index c5a26cd7b88..addfeaa9047 100644 --- a/platform/docs/docs/deployment/docker.md +++ b/platform/docs/docs/deployment/docker.md @@ -239,7 +239,7 @@ To create a self-signed certificate: |Country Name (2 letter code) [AU]| |State or Province Name (full name) [Some-State]| |Locality Name (eg, city) []| - |Organization Name (eg, company) [Internet Widgits Pty Ltd]| + |Organization Name (eg, company) [Internet Widgets Pty Ltd]| |Organizational Unit Name (eg, section) []| |Common Name (e.g. server FQDN or YOUR name) []| |Email Address []| diff --git a/platform/docs/docs/deployment/index.md b/platform/docs/docs/deployment/index.md index ba016800c22..6698c607fe6 100644 --- a/platform/docs/docs/deployment/index.md +++ b/platform/docs/docs/deployment/index.md @@ -93,7 +93,7 @@ support it yet, but it is gaining wider adoption. If you have an existing archive and intend to host the OHIF Viewer at the same domain name as your archive, then connecting the two is as simple as following -the steps layed out in our +the steps laid out in our [Configuration Essentials Guide](./../configuration/configurationFiles.md). #### What if I don't have an imaging archive? @@ -297,7 +297,7 @@ You can find an example of this setup in our In general, we recommend using the "Authorization Code Flow" ( [see `response_type=code` here][code-flows]); however, the "Implicit Flow" ( [see -`response_type=token` here][code-flows]) can work if additonal precautions are +`response_type=token` here][code-flows]) can work if additional precautions are taken. If the flow you've chosen produces a JWT Token, it's validity can be used to secure access to your Image Archive as well. diff --git a/platform/docs/docs/development/continous-integration.md b/platform/docs/docs/development/continuous-integration.md similarity index 100% rename from platform/docs/docs/development/continous-integration.md rename to platform/docs/docs/development/continuous-integration.md diff --git a/platform/docs/docs/development/our-process.md b/platform/docs/docs/development/our-process.md index d8b8ed86217..aaac77533d2 100644 --- a/platform/docs/docs/development/our-process.md +++ b/platform/docs/docs/development/our-process.md @@ -101,7 +101,7 @@ quality and test coverage must not be changed by a significant margin. For some repositories, visual screenshot-based tests are also included, and video recordings of end-to-end tests are stored for later review. -[You can read more about our continous integration efforts here](/development/continous-integration.md) +[You can read more about our continuous integration efforts here](/development/continuous-integration.md) ## Releases diff --git a/platform/docs/docs/migration-guide.md b/platform/docs/docs/migration-guide.md index af87a0296ee..fcf45aadd3a 100644 --- a/platform/docs/docs/migration-guide.md +++ b/platform/docs/docs/migration-guide.md @@ -935,7 +935,7 @@ We have gone through extensive re-design of each part of the UI, and we have als
-I have a huge complex styles using native CSS, how can I re-use them? +I have a huge complex styles using native CSS, how can I reuse them? You can leverage the power of Tailwind CSS (https://TailwindCSS.com/) in OHIF v3 to reuse your existing styles. Tailwind CSS is a utility-first approach, allowing you to create reusable CSS classes by composing utility classes together. You can migrate your existing styles to Tailwind CSS by breaking them down into utility classes and utilizing the extensive set of predefined utilities provided by Tailwind CSS. diff --git a/platform/docs/docs/platform/extensions/index.md b/platform/docs/docs/platform/extensions/index.md index cf60ca5fef6..ec8f48d18c2 100644 --- a/platform/docs/docs/platform/extensions/index.md +++ b/platform/docs/docs/platform/extensions/index.md @@ -51,7 +51,7 @@ export default { */ id, - // Lifecyle + // Lifecycle preRegistration() { /* */ }, onModeEnter() { /* */ }, onModeExit() { /* */ }, @@ -182,7 +182,7 @@ Use the provided `cli` to add/remove/install/uninstall extensions. Read more [he The final registration and import of the extensions happen inside a non-tracked file `pluginImport.js` (this file is also for internal use only). -After an extension gets registered withing the `viewer`, +After an extension gets registered within the `viewer`, each [module](#modules) defined by the extension becomes available to the modes via the `ExtensionManager` by requesting it via its id. [Read more about Extension Manager](#extension-manager) @@ -206,7 +206,7 @@ used to initialize data. [`onModeExit`](./lifecycle#onModeExit): Similarly to onModeEnter, this hook is called when navigating away from a mode, or before a mode’s data or datasource -is changed. This can be used to cache data for re-use later, but since it +is changed. This can be used to cache data for reuse later, but since it isn't known which mode will be entered next, the state after exiting should be clean, that is, the same as the state on a clean start. This is called BEFORE service clean up, and after mode specific onModeExit handling. diff --git a/platform/docs/docs/platform/extensions/modules/layout-template.md b/platform/docs/docs/platform/extensions/modules/layout-template.md index 66c839dae1b..821444975b8 100644 --- a/platform/docs/docs/platform/extensions/modules/layout-template.md +++ b/platform/docs/docs/platform/extensions/modules/layout-template.md @@ -120,7 +120,7 @@ function ViewerLayout({ commandsManager={commandsManager} /> - {/* Rigth SIDEPANELS */} + {/* Right SIDEPANELS */} A dumb client is software that fully depends on a connection to a server or @@ -12,7 +12,7 @@ as a ["Dumb Client"][simplicable] > software offers nothing useful. - [simplicable.com][simplicable] While the Viewer persists some data, it's scope is limited to caching things -like user preferences and previous query paramaters. Because of this, the Viewer +like user preferences and previous query parameters. Because of this, the Viewer has been built to be highly configurable to work with almost any web accessible data source. @@ -56,7 +56,7 @@ the OHIF Viewer as a desktop application. _Does the OHIF Viewer work with the local filesystem?_ It is possible to accomplish this through extensions; however, for an user -experience that accomodates a large number of studies, you would likely need to +experience that accommodates a large number of studies, you would likely need to package the OHIF Viewer as an [Electron app][electron].