Bug 154145 - UI: Vertical or Horizontal Alignment in Calc being set to default, but it's not clear what it does
Summary: UI: Vertical or Horizontal Alignment in Calc being set to default, but it's n...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Calc-Cells
  Show dependency treegraph
 
Reported: 2023-03-12 12:00 UTC by Telesto
Modified: 2023-03-27 08:20 UTC (History)
5 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 Telesto 2023-03-12 12:00:30 UTC
Description:
UI: Vertical or Horizontal Alignment in Calc being set to default, but it's not clear what it does

Steps to Reproduce:
1. Open Calc
2. Go to menu Format -> Cells..
3. Alignment tab -> Text alignment
4. Press the dropdown for Vertical or Horizontal Alignment -> Notice 6 choice. The first default
5. Cancel the dialog
6. Format -> Align Text -> Three options (top/center/bottom) with nothing selected


Actual Results:
There are 6 options. The first one called 'Default' 

The Default Vertical Postion = to bottom (as far I can tell). Which rises the question: Why is there an additional choice default. If the default is equal to 'To Bottom'. It makes no sense. Also you can't tell if default being different from the other 5 choices, nor what it actually does. 

---
Regarding Format -> Align Text. There are only 3 options. No of those activated. Issues:
*it seems as if there is no vertical alignment active.
*you can't go back to 'default' from the Drop down menu. The default is probably the most common choice to 'undo' a different alignment , but not unavailable in the menu

Expected Results:
You could also label as "To Bottom (Default)" or something like that. 


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 8635c9aa8c6f1078a9e220076d5a08daf30077e8
CPU threads: 8; OS: Mac OS X 12.6.3; UI render: Skia/Raster; VCL: osx
Locale: nl-NL (nl_NL.UTF-8); UI: en-US
Calc: threaded
Comment 1 Eyal Rozenberg 2023-03-12 18:06:55 UTC
I also don't understand why there's a "default" if it really is just "bottom".

Perhaps it's sometimes _not_ bottom? Perhaps it's dependent on the locale or some other setting?

Otherwise I don't see why the word "default" is even be mentioned. If you change the Default Cell Style in the template to have valignment of Middle, then your "default" will not be bottom.
Comment 2 Heiko Tietze 2023-03-13 10:00:21 UTC
https://help.libreoffice.org/latest/en-US/text/shared/01/05340300.html

"Default: Aligns numbers to the right, and text to the left."

At least it is documented.
Comment 3 Eyal Rozenberg 2023-03-13 10:22:58 UTC
(In reply to Heiko Tietze from comment #2)
> https://help.libreoffice.org/latest/en-US/text/shared/01/05340300.html
> 
> "Default: Aligns numbers to the right, and text to the left."
> 
> At least it is documented.

1. It's mis-documented for horizontal, as that sentence is incorrect for RTL cells. It should be "Numbers to the right, text to the start of the cell." (and maybe add: left for LTR, right for RTL).

2. I believe "Default" is too vague, and also confusing in the sense that one assumes it's effectively one of the other three options, plus - myself and Telesto were not certain what "Default" means exactly, and we've used Calc a lot.
Comment 4 Heiko Tietze 2023-03-13 10:27:52 UTC
Don't think we find a word that is more catchy than Default. As for the documentation I agree with the improvement need. 

The Default as just 'to the bottom' is a bit surprising for the vertical option. But again, I suggest to not fiddle around with the labels.
Comment 5 ady 2023-03-13 11:09:43 UTC
https://help.libreoffice.org/latest/en-US/text/shared/01/05340300.html

For vertical alignment:

Default
Aligns the cell contents to the bottom of the cell.

Compare with:

Bottom
Aligns the contents of the cell to the lower edge of the cell.


Even when combining several other settings (beware: cell size and amount of text are relevant too) such as auto-wrapping, orientation and others, it might be helpful to be more specific / clear in the difference between those two expressions. Perhaps such documentation expansion should be provided in the wiki, instead of the help files. At any rate, the above two simple sentences seem to be not enough in order to distinguish these two vertical alignment alternatives in Calc.
Comment 6 Eyal Rozenberg 2023-03-13 11:11:05 UTC
(In reply to Heiko Tietze from comment #4)
> As for the documentation I agree with the improvement need. 

Wouldn't that be a separate bug?

> The Default as just 'to the bottom' is a bit surprising for the vertical
> option. 

Given that it's just "to the bottom" - let's remove this entirely. No need for "default".

> Don't think we find a word that is more catchy than Default.
> ...
> But again, I suggest to not fiddle around with the labels.

Why not? We have plenty of drop-down box real-estate to write something longer (if we can find a decent string).

Also, what about some kind of tooltip?
Comment 7 Telesto 2023-03-13 11:22:27 UTC
(In reply to Heiko Tietze from comment #4)
> Don't think we find a word that is more catchy than Default. As for the
> documentation I agree with the improvement need. 
> 
> The Default as just 'to the bottom' is a bit surprising for the vertical
> option. But again, I suggest to not fiddle around with the labels.

It's not semantical debate. Lets take Writer example: you can align text horizontally: left/centered/right/justified. You don't add a category: default. Instead you set left active by default for LTR and right default for RTL. Default isn't a setting by itself, normally.
If the default have unique properties, the default should have a name and set to default.

So in case of Horizontal Alignment Default is apparently lacking a name. In case of Vertical Default is actually the same as to bottom (so a drop down with to option doing exactly the same)

---
I want also to point out another relate issue I mentioned: Menu -> Format -> Align Text has quick options (to prevent going into the dialog).  There are only 3 options. No of those activated. 

Issues:
* it seems as if there is no vertical alignment active.
* you can't go back to 'default' from the Drop down menu. The default is probably the most common choice to 'undo' a different alignment , but not unavailable in the menu


--
Bottom line this whole default approach no as communicative as it can/and should be.
Comment 8 Telesto 2023-03-13 12:25:38 UTC
(In reply to Eyal Rozenberg from comment #3)
> 1. It's mis-documented for horizontal, as that sentence is incorrect for RTL
> cells. It should be "Numbers to the right, text to the start of the cell."
> (and maybe add: left for LTR, right for RTL).

@Eyal
A double check. How are text/ numbers expected to be aligned spreadsheets with  RTL languages with default setting? If I set some Calc cells to RTL text AND numbers are aligned right (in LTR terminology).

-> So in the horizontal case 'default' actually does different things depending on locale.. So actually there are two variants. Which in my perception should be split out the distinct variants (with the default depending on locale)

My simpleminded assumption was: RTL behaves inverse/opposite of LTR, but it's more  advanced (or complicated) than that
Comment 9 ady 2023-03-13 15:07:53 UTC
I could be wrong but there seem to be some misunderstanding and/or inaccurate documentation. In either case, users might be misled regarding this matter.

When the "Default" setting is used, this means (or it should mean) "use the alignment that is set in the cell style that is used in the current cell".

So, if I edit my Default _style_ to use "Top" alignment, then any cell that uses the Default style will use the Top alignment as well, unless I change that particular cell manually with a direct formatting.

If I set a different style for a specific cell, and that style is set to use "Justified" vertical alignment, then the "Default" setting for that cell will be also the "Justified" vertical alignment.

Now assume I take that cell and change its alignment to "Bottom", and then I change it back to "Default" alignment, it will go back to its default setting for its cell style, which is "Justified" for that specific cell, according its style.

So, the first issue is to correct the help file for the "Default" alignment(s), as its current definition is incorrect. It is the usual result, but not the correct definition.

The second issue is the menu entry vs. the toolbar. If I press the "Top" icon, the alignment goes to top. Pressing it again will release the alignment for the relevant (selected) cells to their respective "default" styles. This does not happen to the menu, because the menu does not remain pressed, which means that the second time I press the same alignment, I am not "releasing" it but instead repeating the action (maybe to a different set of cells with mixed alignments). I actually think this behavior makes sense and brings flexibility, between the difference between the icon and the menu: two different outcomes, depending on what exactly I intend to do.

Therefore, this might only need some examples in the wiki, and a correction to the docs for what it means the "default" alignment in each case.
Comment 10 Telesto 2023-03-13 15:20:10 UTC
(In reply to Eyal Rozenberg from comment #6)
> Given that it's just "to the bottom" - let's remove this entirely. No need
> for "default".

That's actually what Excel does. For Horizontal it uses 'Default'. For Vertically it simply sets it 'To top'
Comment 11 ady 2023-03-13 15:27:51 UTC
(In reply to Telesto from comment #10)
> (In reply to Eyal Rozenberg from comment #6)
> > Given that it's just "to the bottom" - let's remove this entirely. No need
> > for "default".

As I explained in comment 9, that is incorrect. Using spreadsheet notation:
bottom <> default
default <> bottom
Comment 12 Eyal Rozenberg 2023-03-13 15:52:30 UTC
(In reply to ady from comment #11)
> As I explained in comment 9, that is incorrect. Using spreadsheet notation:
> bottom <> default
> default <> bottom

> When the "Default" setting is used, this means ...
> "use the alignment that is set in the cell style that is used in 
> the current cell".

That is incorrect. Try changing the cell style's vertical alignment and you'll see.

> (or it should mean)

I don't think so.... the cell formatting dialog does not distinguish between DF properties and properties originating in the style. Same goes for PS and CS in Writer, Page Styles in Writer and Draw etc. If you want _that_ to change - that would be an entirely different bug.
Comment 13 Eyal Rozenberg 2023-03-13 15:57:50 UTC
(In reply to Telesto from comment #8)
> A double check. How are text/ numbers expected to be aligned spreadsheets
> with  RTL languages with default setting? If I set some Calc cells to RTL
> text AND numbers are aligned right (in LTR terminology).

Actually, I over-simplified in my comment. I described RTL languages in which numbers are laid out left-to-right, i.e. least significant digit on the right. That's true for Hebrew, Arabic, probably Farsi - but I'm not sure about all RTL languages (e.g. Fula, Adlam etc.)

Anyway, in RTL cell direction, and for Hebrew/Arabic/Farsi, with the Default h-alignment setting, text is aligned to the right side of the cell, and so are numbers; but as you type in letters, they will appear past the left of the existing text, while with numbers, digits will appear on the right and push the already-typed digits due left.
Comment 14 ady 2023-03-13 16:52:07 UTC
(In reply to Eyal Rozenberg from comment #12)
> (In reply to ady from comment #11)
> Try changing the cell style's vertical alignment and
> you'll see.

I did it just before posting comment 9. It worked as I described.
Comment 15 ady 2023-03-13 17:15:57 UTC
(In reply to ady from comment #14)
> (In reply to Eyal Rozenberg from comment #12)
> > (In reply to ady from comment #11)
> > Try changing the cell style's vertical alignment and
> > you'll see.
> 
> I did it just before posting comment 9. It worked as I described.

And now as Murphy's law, of course I can't do it again. Crap, IDK in which order I did it before.
Comment 16 Stéphane Guillou (stragu) 2023-03-26 21:06:40 UTC
I agree with Eyal, I don't think Ady was correct in that "Default" reverts to the Style alignment setting. At least not in my tests. We might want to "obsolete" some comments here.

What I suggest as solutions to some of the problems described here:

1. Format Cells dialog, Alignment tab:
- Rename horizontal "Default" to "Automatic", which describes the function better: depending on the cell's contents, an alignment setting is automatically picked. It clears the confusion. It is what we use for colours.
- Remove vertical "Default" if it doesn't do anything different to "Bottom", and use "Bottom" as the default selection.
- Rename sections "Text Alignment" and "Text Orientation" to "Alignment" and "Orientation" respectively because they also affect numbers.
- Rename "Wrap text automatically" to "Wrap automatically" for the same reason.
(Alternatively, for the last two points, "text" can be replaced by "contents".)

2. Format menu:
- "Format > Align Text" renamed to "Alignment" because it doesn't just affect text. It can even align shapes!
- "Format > Align Text > Center" (for vertical section) is renamed to "Middle" so it matches the formatting dialog term
- Addition of "Format > Alignment > Automatic" option for the horizontal alignment section (the old "Default"). The other, more obscure alignment options can live exclusively in the Format Cells dialog, as currently.

3. Documentation
- Use the new strings
- Add missing information about RTL

Would that cover it?
Comment 17 Eyal Rozenberg 2023-03-26 21:34:13 UTC
(In reply to Stéphane Guillou (stragu) from comment #16)
 
> 1. Format Cells dialog, Alignment tab:
> - Rename horizontal "Default" to "Automatic", which describes the function
> better: depending on the cell's contents, an alignment setting is
> automatically picked. It clears the confusion. It is what we use for colours.
> - Remove vertical "Default" if it doesn't do anything different to "Bottom",
> and use "Bottom" as the default selection.

Agree that this is an improvement. I still wonder whether "Automatic" isn't too vague.

> - Rename sections "Text Alignment" and "Text Orientation" to "Alignment" and
> "Orientation" respectively because they also affect numbers.
> - Rename "Wrap text automatically" to "Wrap automatically" for the same
> reason.
> (Alternatively, for the last two points, "text" can be replaced by
> "contents".)

Disagree with the motivation, because numbers are also text. Also, out of scope for this bug IMHO.

> 
> 2. Format menu:
> - "Format > Align Text" renamed to "Alignment" because it doesn't just
> affect text. It can even align shapes!
> - "Format > Align Text > Center" (for vertical section) is renamed to
> "Middle" so it matches the formatting dialog term
> - Addition of "Format > Alignment > Automatic" option for the horizontal
> alignment section (the old "Default"). The other, more obscure alignment
> options can live exclusively in the Format Cells dialog, as currently.

Please open a separate bug about this :-(
Comment 18 Stéphane Guillou (stragu) 2023-03-27 07:29:33 UTC
(In reply to Eyal Rozenberg from comment #17)
> (In reply to Stéphane Guillou (stragu) from comment #16)
>  
> > 1. Format Cells dialog, Alignment tab:
> > - Rename horizontal "Default" to "Automatic", which describes the function
> > better: depending on the cell's contents, an alignment setting is
> > automatically picked. It clears the confusion. It is what we use for colours.
> Agree that this is an improvement. I still wonder whether "Automatic" isn't
> too vague.

OK, let's focus on these here then.
Another reason the "Automatic" label is consistent: it is used for Writer's Paragraph > Alignment tab's Text-to-text alignment.
We can use the "Automatic" label for both uno:CommonAlignHorizontalDefault and uno:CommonAlignVerticalDefault

Regarding removing the vertical "Default" from the dropdown: it has its own UNO command, uno:CommonAlignVerticalDefault, and I just realised it is useful when switching Asian layout mode on and off, so that needs to stay.

To summarise the needed changes:
- re-label the two UNO commands from "Default" to "Automatic"
- update documentation accordingly, and include information about RTL and Asian layout mode.
Comment 19 Telesto 2023-03-27 07:54:27 UTC
(In reply to Stéphane Guillou (stragu) from comment #18)
Automatic is surely an big improvement over 'default'. It's still bit vague. However I'm unable to think of a proper label. What automatic entails can be described in the documentation.

+1

> Regarding removing the vertical "Default" from the dropdown: it has its own
> UNO command, uno:CommonAlignVerticalDefault, and I just realised it is
> useful when switching Asian layout mode on and off, so that needs to stay.

Can be useful when switching Asian layout mode on and off.. would you mind to describe this by an example for my understanding. "Can be useful" sounds restricted. And it's not totally clear to me how this is different from ' to bottom'. The uno command suggests it having unique properties.. so you're probably right. In that case Automatic is supported..

FWIW: The description is also relevant for the documentation part. It's not a useless exercise. :-)

-----
FWIW: Are there already bug opened for the other elements in comment 16?
Comment 20 Stéphane Guillou (stragu) 2023-03-27 08:20:44 UTC
(In reply to Telesto from comment #19)
> Can be useful when switching Asian layout mode on and off.. would you mind
> to describe this by an example for my understanding. "Can be useful" sounds
> restricted. And it's not totally clear to me how this is different from ' to
> bottom'. The uno command suggests it having unique properties.. so you're
> probably right. In that case Automatic is supported..

You're right, could have been clearer:
1. Tools > Options > Language settings > Languages > tick "Asian".
2. With some text in a cell, and the cell big enough to observe vertical alignment: right-click > Format cell > Alignment > tick Vertically stacked > tick Asian layout mode

> FWIW: Are there already bug opened for the other elements in comment 16?

Follow-up in bug 154410.