-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[WIP] feat: Multi monitor launch page #3872
Conversation
✅ Deploy Preview for ohif-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for ohif-platform-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
return newValue; | ||
} | ||
|
||
return mergeWith(oldValue || {}, newValue, mergeCustomizer.bind(null, mergeType)); |
Check warning
Code scanning / CodeQL
Prototype-polluting assignment Medium
library input
This assignment may alter Object.prototype if a malicious '__proto__' string is injected from
library input
This assignment may alter Object.prototype if a malicious '__proto__' string is injected from
library input
This assignment may alter Object.prototype if a malicious '__proto__' string is injected from
library input
This assignment may alter Object.prototype if a malicious '__proto__' string is injected from
library input
This assignment may alter Object.prototype if a malicious '__proto__' string is injected from
library input
This assignment may alter Object.prototype if a malicious '__proto__' string is injected from
library input
This assignment may alter Object.prototype if a malicious '__proto__' string is injected from
library input
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3872 +/- ##
==========================================
- Coverage 46.23% 44.44% -1.80%
==========================================
Files 78 80 +2
Lines 1276 1332 +56
Branches 312 327 +15
==========================================
+ Hits 590 592 +2
- Misses 548 587 +39
- Partials 138 153 +15
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
@@ -37,7 +37,7 @@ | |||
"@ohif/ui": "3.8.0-beta.36", | |||
"classnames": "^2.3.2", | |||
"dcmjs": "^0.29.12", | |||
"lodash.debounce": "^4.17.21", | |||
"lodash.debounce": "^4.0.8", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we are going back? it doesn't have any effect actually because of ^
@@ -0,0 +1,31 @@ | |||
import { ServicesManager, CommandsManager, ExtensionManager } from '@ohif/core'; | |||
|
|||
import applyMultiMonitor from './MultiMonitor'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a fan of applyMultiMonitor
import from a folder called MultiMonitor
which only has a index.tsx
} | ||
} | ||
|
||
export default MultiMonitor; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need tsx for this file, ts would do the job
@@ -0,0 +1,28 @@ | |||
function MultiMonitor() { | |||
const { href } = window.location; | |||
console.log('multiMonitor', href); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove log please
if (screenDetailsPromise) { | ||
screenDetailsPromise.then(screenDetails => { | ||
const { screens } = screenDetails; | ||
const baseURL = href.replace('/multimonitor', '/basic-test'); | ||
console.log('Hello multi-monitor', ...screens); | ||
const newScreen = screens.find(screen => screen.isPrimary === true); | ||
const width = Math.floor(newScreen.availWidth / 2) - 2; | ||
const height = newScreen.availHeight; | ||
const window1 = window.open( | ||
`${baseURL}&hangingProtocolId=@ohif/hpMultiMonitor2&screen=0-0.5`, | ||
'ohifScreen1', | ||
`screenX=${width + 1},top=0,width=${width},height=${height}` | ||
); | ||
console.log('Opened', window1); | ||
window.window1 = window1; | ||
window.moveTo(0, 0); | ||
}); | ||
} else { | ||
console.log('Not multi monitor', screenDetailsPromise); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer
if (!screenDetailsPromise) {
console.log('Not multi monitor', screenDetailsPromise);
return
}
screenDetailsPromise.then(screenDetails => {
const { screens } = screenDetails;
const baseURL = href.replace('/multimonitor', '/basic-test');
console.log('Hello multi-monitor', ...screens);
const newScreen = screens.find(screen => screen.isPrimary === true);
const width = Math.floor(newScreen.availWidth / 2) - 2;
const height = newScreen.availHeight;
const window1 = window.open(
`${baseURL}&hangingProtocolId=@ohif/hpMultiMonitor2&screen=0-0.5`,
'ohifScreen1',
`screenX=${width + 1},top=0,width=${width},height=${height}`
);
console.log('Opened', window1);
window.window1 = window1;
window.moveTo(0, 0);
});
Less indentation, more readable IMO
@@ -0,0 +1,28 @@ | |||
function MultiMonitor() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
documentation please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
I tried it, it opens a second window on my other monitor only half (right half) and shows blank at the moment.
Passing run #3726 ↗︎
Details:
Review all test suite changes for PR #3872 ↗︎ |
Redoing this in a cleaner fashion. |
Context
Users should be able to launch OHIF in a multi-monitor mode. This change adds a worklist on the initial launch page, and automatically launches additional windows when a study is viewed. This may need to be moved to a custom mode/extension design, but right now is just a WIP.
Changes & Results
Testing
Checklist
PR
semantic-release format and guidelines.
Code
etc.)
Public Documentation Updates
additions or removals.
Tested Environment