Bug 122587 - Allow moving objects to a different layer without using drag-and-drop
Summary: Allow moving objects to a different layer without using drag-and-drop
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: inReleaseNotes:24.8
Keywords: accessibility
Depends on:
Blocks: Layers Z-Order
  Show dependency treegraph
 
Reported: 2019-01-08 23:52 UTC by DACBARBOS
Modified: 2024-03-12 02:33 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Set layer of object(s) demo (813.49 KB, video/x-matroska)
2023-11-17 21:45 UTC, Jim Raykowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description DACBARBOS 2019-01-08 23:52:40 UTC
Description:
If UX is short for user experience then please hear my humble request for enhancement. The right side (docked) bar is a common UI element present in many similar GUIs. Working with it should be easy and intuitive. Well, my intuition got a direct hit when I realised there's no Layer section in the Properties side bar. This is really bad for UX. I know how to do this according to /help/en-US/text/simpress/guide/layer_move.html While that procedure is simple enough, it's not intuitive.

Steps to Reproduce:
1.Create layer L1 and L2 (visible, unlocked)
2.Draw one object on each layer (anything)
3.Select first object on L1 - open Properties side bar (to change obj layer)

Actual Results:
There is no Layer section in the Properties side bar as one would expect.

Expected Results:
Find a Layer section along with existing Character, Paragraph, Area, Shadow, Line, Position and Size.


Reproducible: Always


User Profile Reset: No



Additional Info:
I've seen this on latest macOS but is not a bug or some OS related thing.
Comment 1 Regina Henschel 2019-01-09 00:31:04 UTC
valid enhancement request.
Comment 2 V Stuart Foote 2019-01-09 02:35:59 UTC
Handling layers for objects from the overcrowded Properties deck would not be the best UX for working with layers in Draw/Impress, IMHO.

bug 56498 and bug 90244 suggest that rather than a content panel in the Properties deck, handling layers merits its own Deck--or additional controls for a panel resident in the Navigator's deck?
Comment 3 Regina Henschel 2019-01-09 11:08:01 UTC
Or having a context menu item "move to layer ...". It needs indeed discussion, _how_ to improve the UI. But I think, we agree, that improvement of the UI is necessary.
Comment 4 Stéphane Guillou (stragu) 2023-08-28 10:36:55 UTC
Current workarounds for moving layers:
- long-click then drag-and-drop to other layer tab
- cut, change layer, paste

I agree that another "move layer" action should be available elsewhere, in part to make it available without a mouse/trackpad. I could imagine it being in the context menu, but the idea of a "layer view" of the Navigator is appealing (splitting objects by layer instead of page/slide).
Comment 5 Heiko Tietze 2023-08-29 08:36:53 UTC
I would add layers to the Navigator so it looks like

v Page 1
  > Layer 1
    v Group 1
      Shape 1 (Rectangle)
      Shape 2 (Circle)
    > Group 2
  > Layer 2 
> Page 2

with drag 'n drop capabilities so you can move an object from one layer to another, see also bug 90244 "SIDEBAR: Enhancing Navigator in Draw". Question is whether this can be done with grouped objects (not the group itself) and if moving to a different page is possible.

Nevertheless, it would be nice to have alternative workflows. Could imagine a context menu entry "Move to" with sub menus offering the other layers on this page. Or as suggested on bug 56498 "Add Layer manager window / Enhance the Navigator" a dedicated sidebar deck / window for layer management.

What do you think, Jim?
Comment 6 Regina Henschel 2023-08-29 09:11:59 UTC
(In reply to Heiko Tietze from comment #5)
> I would add layers to the Navigator so it looks like
> 
> v Page 1
>   > Layer 1
>     v Group 1
>       Shape 1 (Rectangle)
>       Shape 2 (Circle)
>     > Group 2
>   > Layer 2 
> > Page 2
> 
> with drag 'n drop capabilities so you can move an object from one layer to
> another, see also bug 90244 "SIDEBAR: Enhancing Navigator in Draw". Question
> is whether this can be done with grouped objects (not the group itself) and
> if moving to a different page is possible.

That does not work for groups, because a group can span objects of several layers. Example: You group a shape and a measure line belonging to that shape. Having them grouped allows to resize the shape and the measure line is automatically adapted.
Comment 7 Heiko Tietze 2023-08-30 07:48:18 UTC
(In reply to Regina Henschel from comment #6)
> ...a group can span objects of several layers.
Now I remember the discussion. Two solutions come in mind: sme fancy vertical tree where objects have an assignment to layers and groups:

          Shape 1
Layer 1 /         \ Group 1
        \ Shape 2 / 
Layer 2 - Shape 3 - Group 2
(I guess this has limitations, is not easy to understand, and requires quite some effort to implement)

Or a switch to show only one at a time:

(o) Layer ( ) Groups
 v Page 1
   v Layer 1
     Shape 1 (Rectangle)
     Shape 2 (Circle)
   > Layer 2 
 > Page 2
( ) Layer (o) Groups
 v Page 1
   v Group 1
     Shape 1 (Rectangle)
   v Group 2 
     Shape 2 (Circle)
 > Page 2
(Of course, we could also duplicate the objects and show both views in parallel underneath each other. But I think it bloats the tree too much.)

(In reply to Heiko Tietze from comment #5)
> Nevertheless, it would be nice to have alternative workflows.
Comment 8 Heiko Tietze 2023-09-27 07:08:25 UTC
(In reply to Regina Henschel from comment #3)
> Or having a context menu item "move to layer ...". 

This might be the easiest solution.
Comment 9 Jim Raykowski 2023-11-17 21:45:34 UTC
Created attachment 190894 [details]
Set layer of object(s) demo

(In reply to Heiko Tietze from comment #8)
> (In reply to Regina Henschel from comment #3)
> > Or having a context menu item "move to layer ...". 
> 
> This might be the easiest solution.
How about .uno:SetLayer for the command name, "Move to Layer..." for the context label, and "Open a dialog to change the layer of the object" for the tool tip?
Comment 10 Stéphane Guillou (stragu) 2024-03-08 05:15:24 UTC
(In reply to Jim Raykowski from comment #9)
> Created attachment 190894 [details]
> Set layer of object(s) demo
This looks like a very welcome feature, Jim! And a big improvement in accessibility for keyboard users.
Are you able to submit the patch?

DACBARBOS, Regina, Heiko, Stuart: any comment? In particular regarding the position of the menu item. I think it could be placed next to "Arrange" in the main menu, context menu and Standard toolbar.

The potential Navigator's layer view can be discussed in bug 56498.
Comment 11 Heiko Tietze 2024-03-08 08:52:19 UTC
(In reply to Jim Raykowski from comment #9)
> How about .uno:SetLayer for the command name...
Don't get this part but besides it is what we discussed here. Nice work, as always.
Comment 12 V Stuart Foote 2024-03-08 19:23:51 UTC
(In reply to Jim Raykowski from comment #9)
> Created attachment 190894 [details]

> How about .uno:SetLayer for the command name, "Move to Layer..." for the
> context label, and "Open a dialog to change the layer of the object" for the
> tool tip?

That works for me! Sorry this fell through the cracks Jim--should have pursued when you cobbled it together.

Context menu entry Rresident on the sd Layers bar, but should also make it onto the context menu for shapes on the current SB Navigator deck for Draw.

Still think some mix of UI for Z-order sensitive layering on the SB is needed, would think Navigator--but could replicate the current sd Layers bar in a new deck.  See also bug 56498 and bug 90244
Comment 13 Commit Notification 2024-03-11 16:34:57 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1447900fc5f0d32d8379a95439f524fda9a664c1

tdf#122587 Add uno command to set layer of object(s)

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 14 Jim Raykowski 2024-03-11 16:45:24 UTC
I've left the .uno:SetLayer command placement in menus to be added external to the enhancement patch. I have been poking around with including it in the Navigator context menu.
Comment 15 Stéphane Guillou (stragu) 2024-03-12 02:33:41 UTC
Thanks Jim!

I've added it to the release notes, currently only in the API section: https://wiki.documentfoundation.org/index.php?title=ReleaseNotes%2F24.8&type=revision&diff=744249&oldid=744110
Once we've got the menus, we can add a screenshot in the Draw section.