Bug 149741 - Confusing icon for adding column in libreoffice writer
Summary: Confusing icon for adding column in libreoffice writer
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
7.3.4.2 release
Hardware: All All
: medium trivial
Assignee: Not Assigned
URL:
Whiteboard: target:7.5.0
Keywords:
Depends on:
Blocks: Icon-Themes-Code RTL-UI
  Show dependency treegraph
 
Reported: 2022-06-27 06:24 UTC by Amin
Modified: 2022-08-30 11:12 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Screenshot of what is the case currently (107.95 KB, image/png)
2022-06-27 06:44 UTC, Amin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Amin 2022-06-27 06:24:36 UTC
Description:
When we are in RTL direction, in tables icon for "Column after" and "Column before" is confusing and should be switch with the other one. Because in RTL direction, "Column after" will add a column to the left of current column and vice versa for "Column before".

Steps to Reproduce:
1. Change direction to RTL
2. Add a table with on row and at least 3 cols
3. Click on Col 2 and click "Columns After" or "Columns Before" buttons

Actual Results:
1. Change direction to RTL
2. Add a table with on row and at least 3 cols
3. Click on Col 2 and click "Columns After" or "Columns Before" buttons

Expected Results:
By clicking on "Columns After" it adds a column in left of current column and vice versa for "Columns Before". The function is true but the icons are wrong.



Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.3.4.2
Build ID: 30(Build:2)
CPU threads: 4; OS: Linux 5.18; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 Amin 2022-06-27 06:44:41 UTC
Created attachment 180978 [details]
Screenshot of what is the case currently
Comment 2 LeroyG 2022-06-28 20:07:14 UTC
Function commands for this icons are .uno:InsertColumnsBefore and .uno:InsertColumnsAfter.

Once you click (and columns are added), does it matter if you later change from LTR to RTL?

If the answer is NO (I know almost nothing about .uno commands, so, do not stone me if I ask something stupid):
Why not change in the commands "Before" to "Leftward", and "After" to "Rightward"? Or add the commands .uno:InsertColumnsLeftward and .uno:InsertColumnsRightward, for macro backward compatibility. This way it works LTR and RTL, and there is no need to switch icons.

(I wrote here yesterday, but it seems that I leaved without saving changes.)

It is interesting to note that Amin wrote ..."Column after" and "Column before"... reflecting the RTL position.
Comment 3 Amin 2022-06-29 10:12:02 UTC
As a user with Persian (Farsi) as native language, most of my documents are in RTL mode. So if I add a table in LTR mode within a RTL document makes a bad UX because all cursor movements will be reversed.

I saw the Microsoft office word and it resolved this with a wise solution:

Name of buttons are "Add to left" and "Add to right"; It handles the left and right wisely according to the direction. Left and Right always are understandable for user. I think this idea can make a better UX than everything else
Comment 4 Heiko Tietze 2022-06-30 10:06:17 UTC
Theoretically, we could mirror the icons horizontally. Is it worth the effort?
Comment 5 Amin 2022-07-03 03:18:08 UTC
It is interesting that we have same problem with indentation buttons:
1. Increase indentation
2. Decrease indentation
Comment 6 Dieter 2022-07-03 04:28:01 UTC
(In reply to Amin from comment #3)
> Name of buttons are "Add to left" and "Add to right"; It handles the left
> and right wisely according to the direction. Left and Right always are
> understandable for user. I think this idea can make a better UX than
> everything else

I support this suggestion.
Comment 7 sdc.blanco 2022-07-03 11:27:42 UTC
Same issue in Calc, Draw, Impress (sometimes with slightly different labels). Changing Component to UI

Note also that same label is used in context menu (e.g., in Writer, put cursor in table cell, right-click, choose Insert) =>  "Column to Left"  for context label.

In Draw/Impress -- Insert is used, but should be dropped in the context label, but maybe still appropriate for Table toolbar.  (and maybe appropriate to add word "Insert" for Writer Table toolbar, and make "column" singular).

Can use ContextLabel and TooltipLabel to get appropriate results.

Calc looks slightly different.
Comment 8 sdc.blanco 2022-07-03 16:07:18 UTC
Here is a proposed patch for Writer. 
https://gerrit.libreoffice.org/c/core/+/134359

Maybe it will give an idea to others for how to approach Draw/Impress 
(/core/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu)

and Calc 
(/core/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu).
Comment 9 Hossein 2022-07-03 19:20:42 UTC
I am marking this issue as "New", as I think this is a valid request, and is important for the users of the RTL languages.

A detailed discussion on the bidirectional UI topic can be found in these links:

Bidirectional Layouts in GTK+
http://behdad.org/download/Presentations/bidi-layouts/

Firefox-Photon-RTL-guidelines Public
https://github.com/5y/Firefox-Photon-RTL-guidelines
Comment 10 Heiko Tietze 2022-07-04 06:38:55 UTC
(In reply to sdc.blanco from comment #7)
> Note also that same label is used...

I'm surprised that we got into the label-changing business when the request was about the icon. The idea of "Column/Row Before/After" was exactly to be independent from the direction. The icons, OTOH, have indicators coming from LTR reading direction. Don't see a generic solution via icon design (Rizal, please prove me wrong!). So it's rather a coding topic.
Comment 11 sdc.blanco 2022-07-04 09:15:48 UTC
(In reply to Heiko Tietze from comment #10)
> I'm surprised that we got into the label-changing business 
See comment 3.

But after further experience, I now agree that "Before/After" should not be changed -- and understand that the solution requires either: 
 (a) a redesign of the Before/After icons themselves so that they are direction-independent (if at all possible) and if not, then
 (b) a coding change to provide the correct icon to the "insert column" commands according to the "text direction" set in the table properties.
Comment 12 Maxim Monastirsky 2022-07-04 23:52:23 UTC
If mirroring is an acceptable solution, then this might work:

https://gerrit.libreoffice.org/c/core/+/136818
Comment 13 Commit Notification 2022-07-05 11:41:46 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b0a3245c63a2f77ce761ebd11820b341969a48b4

tdf#149741 Mirror insert column icons for RTL tables

It will be available in 7.5.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 Rizal Muttaqin 2022-07-07 01:34:30 UTC
Sorry I can not reproduce the issue in 7.3.4 nor 7.5.0 alpha. What's missing here? Could you please write up how to give me a more detailed steps how to "change direction to RTL"? Here's my steps:
1. Create a new Writer document
2. Go to Tools > Options > Language Settings > Language. In the Default Languages for Documents, I set Complex text layout to Arabic (Saudi Arabia)
3. Click Apply > Click OK
4. Click Right-to-Left (Ctrl+Shift+D) to switch to RTL

Are these steps OK?

(In reply to Amin from comment #0)

> Steps to Reproduce:
> 1. Change direction to RTL
Comment 15 Maxim Monastirsky 2022-07-07 07:17:56 UTC
(In reply to Rizal Muttaqin from comment #14)
> Could you please write up how to give me a more detailed steps how to
> "change direction to RTL"?
You need to click Right-to-Left (Ctrl+Shift+D) *before* inserting the table, or for existing table - right click > Table Properties... > Text Direction.
Comment 16 Commit Notification 2022-07-07 09:41:00 UTC
Seth Chaiklin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9030f2aa632633dd4014d41bd81cdb3c1aca4cb2

related: tdf#149741  improve tooltips for adding Table rows and columns

It will be available in 7.5.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 17 Amin 2022-07-07 13:03:50 UTC
The solution is what Maxim said in comment 15:

https://bugs.documentfoundation.org/show_bug.cgi?id=149741#c15


(In reply to Rizal Muttaqin from comment #14)
> Sorry I can not reproduce the issue in 7.3.4 nor 7.5.0 alpha. What's missing
> here? Could you please write up how to give me a more detailed steps how to
> "change direction to RTL"? Here's my steps:
> 1. Create a new Writer document
> 2. Go to Tools > Options > Language Settings > Language. In the Default
> Languages for Documents, I set Complex text layout to Arabic (Saudi Arabia)
> 3. Click Apply > Click OK
> 4. Click Right-to-Left (Ctrl+Shift+D) to switch to RTL
> 
> Are these steps OK?
> 
> (In reply to Amin from comment #0)
> 
> > Steps to Reproduce:
> > 1. Change direction to RTL
Comment 18 Commit Notification 2022-08-30 11:09:25 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4fb8c0d14cb2468f7336438004f699b9eb7e7e4a

tdf#149741 tdf#149956 Make flipping work also in the sidebar

It will be available in 7.5.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.