Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Allow the mode setup/creation to be async, and provide a few more values to extension/app config/mode setup. #4016

Open
wants to merge 45 commits into
base: master
Choose a base branch
from

Conversation

wayfarer3130
Copy link
Contributor

Context

Adds the extension/mode loader to the app config setup so that things listed in the loader can be provided/used.

Changes & Results

Testing

Checklist

PR

  • [] My Pull Request title is descriptive, accurate and follows the
    semantic-release format and guidelines.

Code

  • [] My code has been well-documented (function documentation, inline comments,
    etc.)

Public Documentation Updates

  • [] The documentation page has been updated as necessary for any public API
    additions or removals.

Tested Environment

  • [] OS:
  • [] Node version:
  • [] Browser:

Copy link

netlify bot commented Apr 5, 2024

Deploy Preview for ohif-platform-docs ready!

Name Link
🔨 Latest commit 165a896
🔍 Latest deploy log https://app.netlify.com/sites/ohif-platform-docs/deploys/6659fc257df83100086faad7
😎 Deploy Preview https://deploy-preview-4016--ohif-platform-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Apr 5, 2024

Deploy Preview for ohif-dev canceled.

Name Link
🔨 Latest commit 165a896
🔍 Latest deploy log https://app.netlify.com/sites/ohif-dev/deploys/6659fc251fa45600084a826d

@@ -40,7 +40,7 @@ async function appInit(appConfigOrFunc, defaultExtensions, defaultModes) {

const appConfig = {
...(typeof appConfigOrFunc === 'function'
? await appConfigOrFunc({ servicesManager })
? await appConfigOrFunc({ servicesManager, loadModules })
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The load modules is added here so that the app config can use modules listed in the loadModules.

@@ -111,7 +111,7 @@ async function appInit(appConfigOrFunc, defaultExtensions, defaultModes) {
? appConfig.modesConfiguration[id]
: {};

mode = mode.modeFactory({ modeConfiguration });
mode = await mode.modeFactory({ modeConfiguration, loadModules });
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And the modeFactory is made async capable so that it can wait for files to load/modules internal to load.

Copy link

codecov bot commented Apr 5, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 44.37%. Comparing base (41a8d10) to head (7ff16c2).

Files Patch % Lines
platform/app/src/appInit.js 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4016   +/-   ##
=======================================
  Coverage   44.37%   44.37%           
=======================================
  Files          80       80           
  Lines        1334     1334           
  Branches      327      327           
=======================================
  Hits          592      592           
  Misses        589      589           
  Partials      153      153           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

cypress bot commented Apr 5, 2024

Passing run #4028 ↗︎

0 44 2 0 Flakiness 0

Details:

Fix docs build
Project: Viewers Commit: 165a8964e4
Status: Passed Duration: 05:26 💡
Started: May 31, 2024 4:55 PM Ended: May 31, 2024 5:00 PM

Review all test suite changes for PR #4016 ↗︎

@sedghi
Copy link
Member

sedghi commented May 29, 2024

I understand your intention. I asked Ibrahim to initiate a similar effort for dev dependencies like percy, cypress, docusaurus, etc. Here is his PR: https://github.com/OHIF/Viewers/pull/4188/files

I prefer his approach. What are your thoughts, @wayfarer3130?

@@ -57,6 +57,6 @@
"eslint-loader": "^2.0.0",
"webpack": "^5.50.0",
"webpack-merge": "^5.7.3",
"webpack-cli": "^4.7.2"
"webpack-cli": "^5.0.2"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we are using another version elsewhere

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating that overall, so leaving this one.

package.json Outdated Show resolved Hide resolved
postinstall.js Outdated Show resolved Hide resolved
externals/README.md Outdated Show resolved Hide resolved
externals/README.md Outdated Show resolved Hide resolved
.circleci/config.yml Outdated Show resolved Hide resolved
@wayfarer3130 wayfarer3130 requested a review from sedghi May 31, 2024 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants