-
Notifications
You must be signed in to change notification settings - Fork 2
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
link about tab to menu #1060
base: main
Are you sure you want to change the base?
link about tab to menu #1060
Conversation
Now this works. TODOs:
So either keep this pr open until I am back in September or work on those remaining things on your own :-) |
getting error: No tab loader for tabType 'undefined'
31d2460
to
d137dd2
Compare
d137dd2
to
a1a5543
Compare
Also without tabs Platform can be started and new tabs can be added via "Open Scripture Editor" or "Open Resource Viewer" Completely idependent of this change: Throwing away the last tab produces an error, but everything seems to continue to work
|
Note that new dialogs open up each time, that you click the menu entry, but I think this is fine for now - maybe even good for playing with many windows. |
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 for the hard work on this! Looks like a good improvement! Few things to adjust.
Sadly, for some reason, when I delete dock-saved-layout
from localstorage, refresh, open the about tab, then open the scripture editor, the about tab disappears and no scripture editor appears. Things get even weirder after that. I haven't seen this problem before, but I also pretty much haven't ever closed all my tabs since I discovered long ago the problem with not being able to dock things once you close all tabs. Because this seems to make more apparent the unstable situation with no tabs, I think we will need to wait to merge this til after we make the demo branch.
Reviewed 2 of 10 files at r2, 9 of 10 files at r4, 1 of 1 files at r5, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @Sebastian-ubs)
extensions/src/platform-scripture/src/main.ts
line 146 at r5 (raw file):
); const showAboutDialogPromise = papi.commands.registerCommand('platform.about', async () =>
This command belongs in core, not in an extension. Could you maybe move this to the dialog service? Maybe similar to how these web view service commands are registered https://github.com/paranext/paranext-core/blob/link-about-tab-to-menu/src/renderer/services/web-view.service-host.ts#L1344
extensions/src/platform-scripture/src/main.ts
line 147 at r5 (raw file):
const showAboutDialogPromise = papi.commands.registerCommand('platform.about', async () => papi.dialogs.showAboutDialog(),
I believe this needs to be returned in order to make this command function properly wait on the dialog.
extensions/src/platform-scripture/src/types/platform-scripture.d.ts
line 653 at r5 (raw file):
export interface CommandHandlers { 'platform.about': (projectId?: string | undefined) => Promise<string | undefined>;
This would also move to papi-shared-types.ts
when moving the command. Also please add a JSDoc :)
src/shared/services/dialog.service-model.ts
line 37 at r5 (raw file):
* * @param options Various options for configuring the dialog that shows * @returns Returns the user's selected project id or `undefined` if the user cancels
Is anything returned from the about dialog? Should this be changed?
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.
Maybe the disappearing is somehow related to it being a dialog. We should probably adjust things so opening a dialog doesn't change the latest place a tab was opened. That way, new tabs won't open as a tab in the same group as dialogs.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @Sebastian-ubs)
@Sebastian-ubs nudge on this PR. If you aren't finishing this soon then perhaps close it? |
Pull request was converted to draft
Thanks, I wanted to work on it, but has no prio right now. Changes done in here are still valid, but seem not enough. Will wait until https://github.com/paranext/ux/issues/94 gets priority. |
@tjcouch-sil when we have the home screen, could we switch the default "about" tab out with the "home" and finish putting about in a dialog? |
This change is
fixes #977