Bug Hunting Session
Bug 88241 - Sidebar: Undocked sidebar opened by call to Styles and Formatting is not dismissed with another call
Summary: Sidebar: Undocked sidebar opened by call to Styles and Formatting is not dism...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.5.2 release
Hardware: All All
: low minor
Assignee: Not Assigned
URL:
Whiteboard: target:4.5.0 target:4.4.1
Keywords:
: 88321 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-01-09 16:14 UTC by tmacalp
Modified: 2015-12-22 21:26 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tmacalp 2015-01-09 16:14:36 UTC
Description:
Summoning the "Styles and Formatting" dialog when the sidebar is in undocked mode opens the floating sidebar pointed to "Styles and Formatting" as it should.  (Well, mostly as it should, since you'll run into bug 83546.)  Attempting to call the "Styles and Formatting" dialog again should dismiss the sidebar.  This would make it behave exactly like the old "Styles and Formatting" dialog.  Unfortunately, 

Steps to reproduce:
1. Start new writer document
2. Make sure the sidebar is undocked (sidebar menu -> undock)
3. Fully close sidebar if it's up (view -> uncheck sidebar)  Note that you currently can't close the sidebar using the "X" in the window decorations as this will tickle bug 87217 and simply reenable the normal sidebar.
4. Summon "Styles and Formatting"  (Press the F11 key, or Format->Styles and Formatting)
5. Attempt to dismiss "Styles and Formatting" sidebar (Press the F11 key, or Format->Styles and Formatting)

Expected:
This second calling of "Styles and Formatting" should dismiss the current floating sidebar and behave exactly like the old dialog in 4.3 and below.

Actual:
The floating sidebar stays activated and pointed to "Styles and Formatting."  This is probably due to undocked sidebars are not able to minimize down to just a strip of activator buttons like a normal docked sidebar.  

Notes:
Of course, if we had another sidebar component activated, another call to "Styles and Formatting" should simply switch to the "Styles and Formatting" component instead of dismissing the sidebar.  I think this would be the most intuitive behavior.

This same behavior should also be applied to opening/dismissing the gallery, navigator, and any other sidebar categories.

I tested this under LibreOffice 4.4.0.1 rc1 using 32bit Fedora17.
Comment 1 Joel Madero 2015-01-10 03:19:58 UTC
Ubuntu 14.04 x64
LibreOffice 4.4.0.2 rc
LibreOffice 4.3.5.2 release

Confirmed on both, updating version to reflect oldest version tested on.

Marking as:

New
Minor - can slow down professional quality work a little (maybe?)
Low - default seems fine, workaround is easy (just click the x on the dialog)

Interestingly though - when you close the dialog, the sidebar comes back :-/ Perhaps another bug report is needed for this (and ux-advise to figure out if that's expected).
Comment 2 tmacalp 2015-01-10 04:24:38 UTC
(In reply to Joel Madero from comment #1)

> Interestingly though - when you close the dialog, the sidebar comes back :-/
> Perhaps another bug report is needed for this (and ux-advise to figure out
> if that's expected).

Yep, in step 3, I linked to bug 87217, which is the bug that describes that behavior--closing a floating sidebar by using the "X" window decoration reenables the normal sidebar instead of turning it off.  IMO, that bug is MUCH more annoying.  I can't see any justification for that being the expected behavior.

Thanks for confirming/modifying.  This one is rather minor, but would go a long way towards smoothing LO 4.4.0's transition to being forced to use the sidebar for Styles and Formatting.
Comment 3 tmacalp 2015-01-18 20:20:34 UTC
I've submitted a patch to gerrit for this issue:
https://gerrit.libreoffice.org/#/c/13980/

My implementation tickles bug 87217 because I'm closing the undocked window the same way as clicking the X in the window decorations.  Until that bug's behavior changes, my commit will simply reenable the docked sidebar when you attempt to dismiss the sidebar with another call to an item.

Maybe it'd be more elegant if I could figure out how to toggle the sidebar the same way as either view->sidebar or sidebar_menu->close sidebar.

Also, my patch is simply looking for a second call to an open category.  As a side-effect, it will close the sidebar if you click on the same category button that's currently open.  Ultimately, I should check to detect if the user clicked a category button or opened through other means, but I couldn't figure out how to elegantly implement it.
Comment 4 Commit Notification 2015-01-19 09:05:22 UTC
Trent MacAlpine committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=592984cea1a9cc545358b8d6077113a658834aa5

fdo#88241 Floating sidebar second call to same item should dismiss it

It will be available in 4.5.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2015-01-20 13:57:56 UTC
Trent MacAlpine committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7bb81cd93ad3a8d24cc69bc32ad22a5cbe1ec955&h=libreoffice-4-4

fdo#88241 Floating sidebar second call to same item should dismiss it

It will be available in 4.4.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 6 tmacalp 2015-03-03 14:15:42 UTC
*** Bug 88321 has been marked as a duplicate of this bug. ***
Comment 7 Harald Koester 2015-12-22 11:15:54 UTC
I checked the behaviour with version 5.0.3. To my opinion the bug still exists when using F11. It works for me when the menu item "Styles and Formating" is used.

What is the right action in this case if the bug has not been verified: Set status to REOPENED according lifecycle diagram [2] or writing a new bug report according ([1], How to reopen Bugs)?

[1] https://wiki.documentfoundation.org/QA/BSA/BugReport_Details
[2] https://wiki.documentfoundation.org/File:BzLifecycleold.png
Comment 8 tmacalp 2015-12-22 21:26:38 UTC
(In reply to Harald Koester from comment #7)
> I checked the behaviour with version 5.0.3. To my opinion the bug still
> exists when using F11. It works for me when the menu item "Styles and
> Formating" is used.

I guess it depends on what behavior you expect.  F11 has always been associated with showing/hiding the "styles and formatting" dialog.  As far as I can tell, it does exactly what it is supposed to do if you define the behavior as show/hide the styles and formatting dialog.  When the sidebar is on another pane, F11 will switch to the styles and formatting pane.

What you seem to be describing is pretty much the change to map it instead to enable/disable sidebar.  You can actually make this change already by Tools->Customize->Keyboard and binding View->Sidebar to F11.

Of course, what you've described is a combination of the above behaviors?  You want F11 to always dismiss the sidebar, but always spawn it up opened to Styles and Formatting?

> What is the right action in this case if the bug has not been verified: Set
> status to REOPENED according lifecycle diagram [2] or writing a new bug
> report according ([1], How to reopen Bugs)?
> 
> [1] https://wiki.documentfoundation.org/QA/BSA/BugReport_Details
> [2] https://wiki.documentfoundation.org/File:BzLifecycleold.png

If you still feel this is worthy of reporting, I would open a new report.  You can then link to this one with a "see also."  Again, as I understand it, this is not a bug, but a change in behavior, so it'd probably be labelled as an enhancement request.