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

New Desktop ID #614

Merged

Conversation

1000TurquoisePogs
Copy link
Member

This PR changes some of the bootstrapping code so that we can load the new desktop with distinct ID.
This PR also allows the old desktop to be switched to via query parameter "?use-v2-desktop=1"

…desktop. Allow ?use-v2-desktop=1 to launch v2 desktop

Signed-off-by: 1000TurquoisePogs <[email protected]>
@1000TurquoisePogs 1000TurquoisePogs changed the base branch from v2.x/staging to v3.x/staging August 19, 2024 13:43
if (desktops.length == 0) {
console.error("ZWED5012E - No desktops available to bootstrap.");
} else if (useV2Desktop) {
console.error("ZWED5324I - The requested Desktop version (V2) is in maintenance mode. To use the newest Desktop version instead, remove the query parameter 'use-v2-desktop'.");
Copy link
Member Author

Choose a reason for hiding this comment

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

i should leave a code comment here: i want this to be colored, but its not really an error.
also change to console.warn

Copy link
Member

Choose a reason for hiding this comment

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

So like we touched about on Friday's call, there's utility functions for this @1000TurquoisePogs. The window.location.search stuff is not important enough for duplication but here it is if you want better organization:
getAllApp2AppArgsFromURL( ) in
zlux-app-manager\virtual-desktop\src\app\start-url-manager\start-url-manager.service.ts

What is relatively important is there's a registration process for stuff like this that should be followed, see:
zlux-app-manager\bootstrap\src\main.ts
processApp2AppArgs( )

URL query params get assigned values in window global object and then those get checked for future reference

Copy link
Member

@DivergentEuropeans DivergentEuropeans left a comment

Choose a reason for hiding this comment

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

At the least identifier needs to be changed in some other places. But some parts of code should be moved around

if (desktops.length == 0) {
console.error("ZWED5012E - No desktops available to bootstrap.");
} else if (useV2Desktop) {
console.error("ZWED5324I - The requested Desktop version (V2) is in maintenance mode. To use the newest Desktop version instead, remove the query parameter 'use-v2-desktop'.");
Copy link
Member

Choose a reason for hiding this comment

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

So like we touched about on Friday's call, there's utility functions for this @1000TurquoisePogs. The window.location.search stuff is not important enough for duplication but here it is if you want better organization:
getAllApp2AppArgsFromURL( ) in
zlux-app-manager\virtual-desktop\src\app\start-url-manager\start-url-manager.service.ts

What is relatively important is there's a registration process for stuff like this that should be followed, see:
zlux-app-manager\bootstrap\src\main.ts
processApp2AppArgs( )

URL query params get assigned values in window global object and then those get checked for future reference

@@ -1,5 +1,5 @@
{
"identifier": "org.zowe.zlux.ng2desktop",
"identifier": "org.zowe.zlux.ivydesktop",
Copy link
Member

Choose a reason for hiding this comment

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

There is a lot of places we now need to change this:
zlux-app-manager\virtual-desktop\src\app\shared\logger.ts
zlux-app-manager\virtual-desktop\src\app\start-url-manager\start-url-manager.service.ts
zlux-app-manager\virtual-desktop\src\app\window-manager\mvd-window-manager\personalization-panel\personalization-panel.component.ts possibly?
probably others

so do a text search & see if it makes sense to change there too

Copy link
Member Author

Choose a reason for hiding this comment

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

logger & start-url-manager = done
others = no, they seem to have different ids. "org.zowe.zlux.ng2desktop.settings" is not "org.zowe.zlux.ng2desktop". Changing it could have consequences like breaking saved settings.
That may be desirable at some point in the future but I don't see the case for it now.

Signed-off-by: 1000TurquoisePogs <[email protected]>
Signed-off-by: 1000TurquoisePogs <[email protected]>
Signed-off-by: 1000TurquoisePogs <[email protected]>
@1000TurquoisePogs
Copy link
Member Author

@DivergentEuropeans when you suggested using getAllApp2AppArgsFromURL( ), it can't be done.
This is bootstrapping code. That is post-bootstrapping code.

I understand that boostrap interprets query params in a certain way and assigns globals. Let's talk about: why add onto that?

Signed-off-by: 1000TurquoisePogs <[email protected]>
@1000TurquoisePogs 1000TurquoisePogs changed the base branch from v3.x/staging to feature/v3/new-desktop-with-changes August 27, 2024 19:24
@DivergentEuropeans DivergentEuropeans merged commit 96720b4 into feature/v3/new-desktop-with-changes Aug 28, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

2 participants