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

UiManager: default to notebookbar by default #9017

Merged

Conversation

meven
Copy link
Contributor

@meven meven commented May 9, 2024

In case of misconfiguration (missing userInterfaceMode), deprecated "classic" or "default" userInterfaceMode, which is the default, use notebookbar.

Users can still use "compact" as documented to use the classic style.

Change-Id: I00ee65edb21fcf80724bc83f947341dfdc5c8ed6

@meven meven force-pushed the meven/default-notebookbar branch 2 times, most recently from 75eefd3 to 5eddd9c Compare May 9, 2024 16:51
@pedropintosilva pedropintosilva self-requested a review May 17, 2024 12:34
Copy link
Contributor

@pedropintosilva pedropintosilva left a comment

Choose a reason for hiding this comment

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

Tested it works, thanks

@pedropintosilva pedropintosilva self-requested a review May 17, 2024 13:03
Copy link
Contributor

@pedropintosilva pedropintosilva left a comment

Choose a reason for hiding this comment

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

I have tested and it seems to work. Nevertheless when debugging both
the new (window.userInterfaceMode === 'classic' && forceCompact == null) || forceCompact === true; and the previous (window.userInterfaceMode === 'notebookbar' && forceCompact === null) || forceCompact === false I get similar results when testing with classic string in the xml or even removing the whole sub mode node from xml and xml.in

I wonder if it wouldn't be better to use notebookbar when classic is passed (when window.userInterfaceMode === 'classic' is true)... 🤔 this way we ensure that old value - that might have been forgotten in the sysadmin backed xml - is never user and instead we default to Notebookbar. If they really want that they can always change it to compact in the xml

@meven
Copy link
Contributor Author

meven commented May 27, 2024

I wonder if it wouldn't be better to use notebookbar when classic is passed (when window.userInterfaceMode === 'classic' is true)... 🤔 this way we ensure that old value - that might have been forgotten in the sysadmin backed xml - is never user and instead we default to Notebookbar. If they really want that they can always change it to compact in the xml

I think that's a good option, fixing another notebookbar-not-by-default issue.

@meven
Copy link
Contributor Author

meven commented May 27, 2024

I wonder if it wouldn't be better to use notebookbar when classic is passed (when window.userInterfaceMode === 'classic' is true)... 🤔 this way we ensure that old value - that might have been forgotten in the sysadmin backed xml - is never user and instead we default to Notebookbar. If they really want that they can always change it to compact in the xml

I think that's a good option, fixing another notebookbar-not-by-default issue.

We might want to update the documentation then:
https://sdk.collaboraonline.com/docs/theming.html?highlight=compact
https://sdk.collaboraonline.com/docs/installation/Configuration.html?highlight=compact

@meven meven force-pushed the meven/default-notebookbar branch from 5eddd9c to a465322 Compare May 27, 2024 08:38
@meven meven force-pushed the meven/default-notebookbar branch from a465322 to 239a662 Compare May 27, 2024 11:43
@meven meven enabled auto-merge (rebase) May 27, 2024 14:25
@meven
Copy link
Contributor Author

meven commented May 28, 2024

There is a cypress test failing: impress/apply_font_shape_spec.js 00:48 12 10 1 1

The assertion failing is:

      cy:command ✔  cGet	.leaflet-pane.leaflet-overlay-pane g.Page .TextPosition
      cy:command ✘  assert	expected **<tspan.TextPosition>** to have attribute **y** with the value **'3286'**, but the value was **'3285'**
      cy:command ✔  fail:	
                    Test failed: integration_tests/mobile/impress/apply_font_shape_spec.js / Apply font on selected shape. / Apply superscript on text shape.
                    
                    Timed out retrying after 10000ms: expected '<tspan.TextPosition>' to have attribute 'y' with the value '3286', but the value was '3285'
                    
                    /home/collabora/jenkins/workspace/github_online_master_debug_vs_co-24.04_cypress_mobile/cypress_test/integration_tests/mobile/impress/apply_font_shape_spec.js:100:14
                       98 |         triggerNewSVG();
                       99 |         cy.cGet('.leaflet-pane.leaflet-overlay-pane g.Page .TextPosition')
                    > 100 |             .should('have.attr', 'y', '3286');
                          |              ^
                      101 |         cy.cGet('.leaflet-pane.leaflet-overlay-pane g.Page .TextParagraph .TextPosition tspan')
                      102 |             .should('have.attr', 'font-size', ...
          cy:log ✱  Finishing test: integration_tests/mobile/impress/apply_font_shape_spec.js / Apply font on selected shape. / Apply superscript on text shape.

https://cpci.cbg.collabora.co.uk:8080/job/github_online_master_debug_vs_co-24.04_cypress_mobile/987/consoleFull

It could be that this MR, changed the ui mode used in tests.
Looking into it.

@pedropintosilva
Copy link
Contributor

I think there is probably another problem in the test cypress_test/integration_tests/mobile/impress/apply_font_shape_spec.js that is unrelated to this. I think there is a fix already: cypress: quick fix for rounding error #9167

@meven meven disabled auto-merge May 28, 2024 10:11
@eszkadev
Copy link
Contributor

please rebase now, it should work

In case of misconfiguration (missing userInterfaceMode), deprecated "classic" or "default" userInterfaceMode, which is the default, use notebookbar.

Users can still use "compact" as documented to use the compact style
(formerly called classic).

Signed-off-by: Méven Car <[email protected]>
Change-Id: I00ee65edb21fcf80724bc83f947341dfdc5c8ed6
@meven meven force-pushed the meven/default-notebookbar branch from 239a662 to bac5fdb Compare May 28, 2024 12:41
@pedropintosilva pedropintosilva merged commit b784919 into CollaboraOnline:master May 28, 2024
13 checks passed
@meven meven deleted the meven/default-notebookbar branch May 29, 2024 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants