CollaboraOnline / online

Collabora Online is a collaborative online office suite based on LibreOffice technology. This is also the source for the Collabora Office apps for iOS and Android.
https://collaboraonline.com
Other
1.78k stars 681 forks source link

Sidebar and Navigator menu entries not checked when the features are activated #10083

Open cosminh11 opened 2 hours ago

cosminh11 commented 2 hours ago

Describe the Bug

When you activate or deactivate the sidebar or the navigator, either from the menu or from the notebook bar, neither do the menu entries get checked or unchecked, nor do the buttons get selected or deselected.

Other features, such as "formatting marks" do show the current state, so for consistency I would expect the sidebar and the navigator to do the same.

Steps to Reproduce

With the compact view

  1. Go to 'View'
  2. See that the 'Sidebar' entry has no check mark
  3. Click on 'Sidebar'
  4. Open the 'View' menu again
  5. See that the 'Sidebar' still has no check mark

With the tabbed view

  1. Go to 'View'
  2. See that 'Sidebar' is not selected
  3. Click on 'Sidebar'
  4. See that 'Sidebar' is still not selected

Expected Behavior

The 'Sidebar' and 'Navigator' menu entries and notebook bar buttons appear as checked and selected, respectively, depending on whether their corresponding feature is shown or hidden.

Actual Behavior

The 'Sidebar' and 'Navigator' menu entries and notebook bar buttons never appear as checked / selected.

Screenshots

sidebar_open_not_selected

Desktop

Additional Context

The status of these buttons and menu entries seems to be determined by the UNO commands that are sent and received.

The difference between these two and 'Formatting Marks' (which works as expected) is that in the case of 'Formatting Marks' the command name is the same both for the request and the response ('.uno:ControlCodes'), while for Sidebar and Navigator they are different:

cosminh11 commented 2 hours ago

I tried to fix this in the frontend by mapping those different request and response values. I have a patch that mostly works. I would open a pull-request (should I?) but there's a problem: sometimes when you open the navigator, the sidebar button gets selected too. That's because we also get a "statechanged" event for it as well (steps to reproduce, below). So I'm not sure: do we want to do this in the frontend (and try to find a solution for this "both-are-selected" issue)? Or should we use different commands, maybe try to send the commands we're receiving (i.e. send .uno:Sidebar instead of .uno:SidebarDeck.PropertyDeck). I would need some advice.

Steps to reproduce the remaining "both-are-selected" issue: