-
Notifications
You must be signed in to change notification settings - Fork 950
Refactor About dialog to remove HTML template and use centralized server info #13933
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
Conversation
|
Todo
|
af2619c to
d26bde0
Compare
d26bde0 to
8c74743
Compare
8c74743 to
6b2fdf0
Compare
6b2fdf0 to
13720c4
Compare
13720c4 to
7e357c6
Compare
|
A note: if this PR gets merged as it is we will have the feedback dialog broken on master branch, at least temporarily until a follow up PR comes. |
good catch, it's used here https://github.com/CollaboraOnline/online/blob/main/browser/src/map/handler/Map.Feedback.js#L100 we can use new window.xxx values instead |
|
please remember to rebase, there is a conflict with |
This adds centralized storage for: - COOLWSD version and git hash (from 'coolserver') - LOKit (LibreOffice) version and git hash (from 'lokitversion') - OS info (from 'osinfo') This provides a single source of truth for server identification data, making it globally available for the About dialog and future UI components, without relying on DOM cloning or hidden HTML template. - Add data-wopi-host-id, data-vendor, and data-copyright-year attributes to #initial-variables Signed-off-by: Banobe Pascal <banobe.pascal@collabora.com> Change-Id: I7308db0b3fec7ea335d62108614fe4574af0d1c2
- Dynamically create the UI structure in JavaScript - Populate all content from window.app.serverInfo - Eliminate cloning from hidden HTML template - Separate structure creation from content population and show - Improve copy-to-clipboard to use serverInfo directly and include all fields (versions, hashes, served-by, server ID) - Use window.wopiHostId, window.copyrightYear, and window.vendor for accurate WOPI host, current year, and vendor name display - Preserve all other existing functionality Signed-off-by: Banobe Pascal <banobe.pascal@collabora.com> Change-Id: I1efadd2d106150dd8b1c973c82d3d2c12ae0762d
The About dialog is now fully created and filled in JavaScript using: - createAboutDialogContent() to build the structure - window.app.serverInfo to provide version and server details - populateAboutDialog() to insert all content and branding - This removes the need for duplicated HTML in the template file and makes the dialog easier to maintain. - A minimal empty <div id=\"about-dialog\" tabIndex=\"0\"></div> is kept in the HTML to preserve Notebookbar About tab detection Signed-off-by: Banobe Pascal <banobe.pascal@collabora.com> Change-Id: Id0bea4b6892b62fe4a9396c8d941f79ee5e39b97
…ection only - Restored dialog header and logos in the template - Restored lokit-version element since its used to create lokit-extra - Remove dynamic creation of the dialog header, product name, and logos from JavaScript, limiting JS to populating about-dialog-info Signed-off-by: Banobe Pascal <banobe.pascal@collabora.com> Change-Id: Ic64639177bb0292c9be407c5e05e3fc362765444
- Switch feedback dialog parameters to read lokitHash and wopiHostId from the window state, as these values are no longer available in the template after the About dialog template info is now dynamically created. Signed-off-by: Banobe Pascal <banobe.pascal@collabora.com> Change-Id: Ibf946cae20b5eb8d9b3179e9b94e2ac545b1617a
7e357c6 to
319a395
Compare
| data-canvas-slideshow-enabled = "%CANVAS_SLIDESHOW_ENABLED%" | ||
| data-wopi-setting-base-url = "%WOPI_SETTING_BASE_URL%" | ||
| data-wopi-host-id = "%WOPI_HOST_ID%" | ||
| data-vendor = VENDOR |
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.
We should put it inside " " as other strings I think.
Also the YEAR
| info.lokitHash.substring(0, 10), | ||
| ); | ||
|
|
||
| // Update lokit-extra position if exists |
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.
this comment is a bit useless, looking at code you see it shuffles nodes but you don't know what is the result - what would be more useful information :)
eszkadev
left a comment
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.
looks good now :)
Summary
TODO
Checklist
make prettier-writeand formatted the code.make checkmake runand manually verified that everything looks okay