Bug 99457 - Ability to move rows, columns using one hand and preserving all existing content
Summary: Ability to move rows, columns using one hand and preserving all existing content
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: accessibility, needsDevEval, topicUI
Depends on:
Blocks: UNO-Command-New Cell-Management
  Show dependency treegraph
 
Reported: 2016-04-22 16:05 UTC by MarjaE
Modified: 2024-03-21 01:00 UTC (History)
10 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 MarjaE 2016-04-22 16:05:31 UTC
In 5.1.1.3 on the Mac, trying to drag rows and drop them overwrites other rows, instead of displacing them.

If you can use the keyboard and mouse at the same time, there are workarounds, but these aren't universally accessible, and they have their own bugs, such as #58440.
Comment 1 Heiko Tietze 2016-05-03 07:24:12 UTC
You mean that the drag operation should remains as it is in the middle of the cell but becomes an insert feature when between two cells (either row or column)? This behavior is known from lists but not spreadsheets. Probably because insert means to move cols or rows up or down resp. left/right. And how should that be done if only a few cells are being dragged and not the complete row/col?

Excel also overrides the target - after confirmation, however (with ctrl pressed the source is copied and the target is overridden, with shift the intended insertion is done). Sounds reasonable to me, but if this feature should improve accessibility only, I'd rather keep the current behavior.

An alternative workflow could be to ask how to insert the drag object (override, cancel, insert above/below | left/right) in case the target contains data.
Comment 2 Joel Madero 2016-05-06 15:24:12 UTC
Moving this out of UNCONFIRMED as it's a UX issue. UX team can close as WONTFIX if they so choose.
Comment 3 Heiko Tietze 2016-05-09 11:43:08 UTC
NEEDINFO from OP
Comment 4 MarjaE 2016-05-09 12:56:19 UTC
I'm not an expert on Calc, or programming, or Excel either, or why LibreOffice should copy Excel. But I know that this currently requires two hands, and LibreOffice should be accessible regardless of whether we can use two hands. And I don't know why other users would have trouble reproducing this. So what more info do you need, and why?
Comment 5 Heiko Tietze 2016-05-09 14:06:02 UTC
(In reply to MarjaE from comment #4)
> So what more info do you need, and why?

You wrote "trying to drag rows and drop them overwrites other rows, instead of displacing them.", and that's not a question of accessibility because Cut/Copy > Insert (row above/below) > Paste works fine. What's your goal?
Comment 6 MarjaE 2016-05-09 14:30:45 UTC
*looks through Insert menu*

I suppose it's possible to use Edit > Copy, Edit > Cut, and Edit > Paste Special, but it's not obvious. I always thought drag-and-drop was the obvious way to reorder lines. Even if it's not Excel's way, I've never used Excel.
Comment 7 Yousuf Philips (jay) (retired) 2016-05-13 14:12:59 UTC
This is a feature i previously saw and used in Google Sheets and hadnt submitted an enhancement for it. Excel also has the same functionality, though different in its implementation.

In Google Sheets, you select the rows/columns you want to move and then the mouse pointer changes to a move hand when you are over any of those rows/column headings, and then drag and drop moves the selection.

https://youtu.be/ILMBGzJ-1nM?t=3m54s

In Excel, you select the rows/columns and then the mouse cursor appears as a move cursor when the mouse is on any of the four borders of the selection, and then drag and drop moves the selection.

https://www.youtube.com/watch?v=lFfwB2DzUMY

This moving mode could also be initialized through an entry in the heading context menu for those unaware of the functionality and also having a shortcut key for keyboard shortcut users who are selecting columns and rows with Shift + Spacebar and Ctrl + Spacebar.
Comment 8 Cor Nouws 2016-05-28 15:09:01 UTC
IIRC there is some key Ctrl+Alt drag&drop that helps with this?
I cannot test it, because Ubuntu uses Ctrl+Alt for Navigation too.
Comment 9 MarjaE 2016-05-28 15:34:58 UTC
My original bug was "One handed drag and drop?"

That would require mapping certain mouse buttons to the control+alt or command+alt combination.
Comment 10 Yousuf Philips (jay) (retired) 2016-05-31 12:50:06 UTC
(In reply to Cor Nouws from comment #8)
> IIRC there is some key Ctrl+Alt drag&drop that helps with this?
> I cannot test it, because Ubuntu uses Ctrl+Alt for Navigation too.

Tried on Mate and on Windows 7 and no key combination worked for me.

Eike: Any idea if this functionality is implemented with a particular key combination?
Comment 11 Heiko Tietze 2016-05-31 13:20:44 UTC
(In reply to Yousuf (Jay) Philips from comment #10)
> Tried on Mate and on Windows 7 and no key combination worked for me.

Press shift and use the frame to drag the selected cells.

https://youtu.be/dIBU-LVDjD0

The vertical indicator means that the copied cells would be inserted between cell A1 and A2, for instance.

Again, my suggestion is to insert when the position is a few pixels away from the cell edge and override otherwise (as today). And not to copy Excel.
Comment 12 MarjaE 2016-05-31 13:23:28 UTC
I can't watch video, but pressing shift and then dragging one line overwrites the existing lines. pressing shift and simultaneously dragging requires the use of two hands.
Comment 13 Yousuf Philips (jay) (retired) 2016-05-31 14:37:34 UTC
(In reply to Heiko Tietze from comment #11)
> Press shift and use the frame to drag the selected cells.
> 
> https://youtu.be/dIBU-LVDjD0
> 
> The vertical indicator means that the copied cells would be inserted between
> cell A1 and A2, for instance.
> 
> Again, my suggestion is to insert when the position is a few pixels away
> from the cell edge and override otherwise (as today). And not to copy Excel.

Yes this is works in excel, but is different in LO and we are focusing on the moving of rows or columns and not cells, but thanks to it, i was able to figure out who its done in LO.

So in LO, we can drag the selected rows or columns by dragging on the selected cells. Dragging by itself is cut and paste, dragging plus ctrl is copy and paste, and dragging plus alt is move (aka cut, paste and delete). I can understand why we use cut and paste as the default for dragging selected cells, but think move should be the default when dragging rows and columns.
Comment 14 Dan Dascalescu 2016-06-14 19:21:34 UTC
Bug 58440, bug 65841 and bug 39936 (not fixed in 5 years) indicate what a clusterfuck (sorry) moving rows in LibreOffice is.

What is so hard about implementing the "Insert cut rows" command from Excel?
Comment 15 Dan Dascalescu 2016-06-14 19:33:57 UTC
> IIRC there is some key Ctrl+Alt drag&drop that helps with this?

I use LibreCalc on Ubuntu as well, and you must press alt after you've dragged the cells, but before you drop them. Caveats:

1. Don't drag cells by the header, but by one of the cells
2. Don't hold Alt while dragging, or Ubuntu will interpret that as the "Move window" command.

This way of moving cells is not intuitive, and there are multiple questions about moving cells on SuperUser and similar sites:

http://superuser.com/questions/124487/in-openoffice-calc-how-do-i-drag-and-drop-cells-to-insert-rather-than-replace-t

http://superuser.com/questions/663629/move-rows-with-the-keyboard-in-calc
Comment 16 Cor Nouws 2016-06-14 19:49:40 UTC
(In reply to Dan Dascalescu from comment #14)

> What is so hard about implementing the "Insert cut rows" command from Excel?

Nothing of course. Please go ahead: https://wiki.documentfoundation.org/Development
Comment 17 Thomas Lendo 2018-06-05 20:02:40 UTC
This seems to be a duplicate of bug 39936  UI: Right Click on Row/Column -> Insert Copied Cells... (paste + shift cells in one click).
Comment 18 Cor Nouws 2018-06-05 21:50:10 UTC
Paste special does have a Shifty setting too. But this has nothing to do with the mouse, of course.
Comment 19 Heiko Tietze 2018-06-06 19:33:35 UTC
Design team discussed the topic:

+ Option 1: NAB/WFM because rarely used and dangerous action
+ Option 2: one-hand mode activated by a shortcut, e.g. ctr+foo, 
            which makes cursor moving rows/cols
   + vi'ish solution
 Option 3: ordinary shortcuts, but not simply ctrl+cursor rather 
           ctrl+alt+cursor
  + ctrl+alt+cursor is used in Gnome shell for workspace

=> no good solution; but option 2 sounds easier to implement and most flexible

 + after switchting into movement mode we can act on row/col independently 
   from selection (left/right select the col, top/down the row) 
   making both possible at once
 + alternatively the movement could be done based on the selection
 + as a compromise do the second if there is a selection but otherwise the first
Comment 20 dumblob 2019-08-09 08:39:17 UTC
Does the solution (2) address also the web interface (LibreOffice Online) requirements (i.e. is it compatible)?
Comment 21 Eyal Rozenberg 2023-03-06 10:53:29 UTC
Rephrased the title, hopefully clarifying it slightly (if you disapprove, feel free to change it again.)

About the options mentioned in the design team discussion:

> Option 1: NAB/WFM because rarely used and dangerous action

First, it's the _opposite_ of dangerous. Rather, it's the default behavior - of deleting the target column - that's dangerous.

Also, This is not rarely used - it's very commonly used!

Two scenarios:

* You open a CSV file or ODS file someone else created. You are mostly concerned with some of the columns, and want them to be closer to the beginning of the sheet, for easier browsing / filtering. So, you drag them towards the sheet start. You could drag destructively, but - deleting data is risky, so typically you avoid it, in case you'll need that information later. Or maybe you even _know_ you need it, but it's less important.

* You start entering data into a sheet, with certain columns. But as you enter your data, you notice that the interesting changes happen in different columns than those you'd imagined. So, you want to reorder.


About solutions:

I would seriously consider replacing the default drag behavior to be non-destructive, and have users only delete columns by explicitly saying they want to.

> + Option 2: one-hand mode activated by a shortcut, e.g. ctr+foo, 
>            which makes cursor moving rows/cols
>   + vi'ish solution
>

Why not have _that_ used for destructive drag (If anything)?

>
> Option 3: ordinary shortcuts, but not simply ctrl+cursor rather 
>           ctrl+alt+cursor
>  + ctrl+alt+cursor is used in Gnome shell for workspace

Don't like this much.
Comment 22 MarjaE 2023-03-06 22:04:48 UTC
ctrl+alt+cursor is a 2-handed move, isn't it?