Bug 154071 - Request: Rename "Square" gradient to "Rectangular" gradient in the UI
Summary: Request: Rename "Square" gradient to "Rectangular" gradient in the UI
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.6.0
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-08 13:10 UTC by Regina Henschel
Modified: 2024-06-03 15:12 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Shapes with gradient, screenshots (55.27 KB, application/vnd.oasis.opendocument.presentation)
2023-03-16 18:03 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2023-03-08 13:10:55 UTC
Draw a shape, set its area fill to a gradient of Type "Square". Use the development tools to see which type is used in the API (FillGradient->Style). You will find "RECT". Save the document and look into the markup (in styles.xml). You will find style="rectangle".

Now do the same with Type "Quadratic". You will find "SQUARE" in the API and style="square" in the markup.

Suggestion:
UI "Square"  ->  "Rectangle"
UI "Quadratic" -> "Quadratic (square)"

The term "quadratic" means mathematically "power 2", e.g. 5^2.
The geometrical term for a form with two pairs of parallel edges with equal length is "square". But immediately renaming "Quadratic" to the correct "Square" might be too confusing for the user. Therefore my suggestion to add it in brackets.
Comment 1 Heiko Tietze 2023-03-09 07:57:13 UTC
I don't like the over-specification of a fairly fuzzy term. Most users (including me) don't understand the difference between Square and Quadratic (and the documentation keeps silent over the types) and rather play with the result than trying to understand the effect from the name.

Switching from "Square" to "Rectangular" sounds good to me but I'd keep "Quadratic". Ultimately I don't see need to align the UI labels with internal variable names. So probably also NAB.


Looking for gradient naming did not return bug insights:

CSS: linear, radial, and conic [1]
Adobe: Linear, Radial, Conic, Diamond, Reflected
Photoshop: Linear, Radial, Angle, Reflected and Diamond
MSO: DiagonalDown, DiagonalUp, FromCenter, FromCorner, FromTitle, Horizontal, Mixed, Vertical
MSO: Linear, Radial, Rectangular, Path

[1] https://css-tricks.com/a-complete-guide-to-css-gradients/
[2] https://xd.adobe.com/ideas/principles/web-design/gradient-color-definition/
[3] https://www.creativebloq.com/computer-arts/how-master-gradients-photoshop-51411514
[4] https://learn.microsoft.com/en-us/office/vba/api/office.msogradientstyle
[5] https://www.officetooltips.com/office_365/tips/fill_and_outline_options_in_microsoft.html
Comment 2 Regina Henschel 2023-03-09 13:27:25 UTC
(In reply to Heiko Tietze from comment #1)
> I don't like the over-specification of a fairly fuzzy term. Most users
> (including me) don't understand the difference between Square and Quadratic

That is because of your German background. In German "quadratisch" is used for the geometric and algebraic context as well. In English you have e.g. "quadratic equation" but a "square" for a shape.

> (and the documentation keeps silent over the types) and rather play with the
> result than trying to understand the effect from the name.

That is exactly the problem which arises from the wrong terms. AOO still has the correct terms "Square" and "Rectangular". The change from "Square"->"Quadratic" and "Rectangular"->"Square" happens somewhere between LO4.0 and LO4.4. I don't know why it was changed. For me that change is a bug. 

> 
> Switching from "Square" to "Rectangular" sounds good to me but I'd keep
> "Quadratic". Ultimately I don't see need to align the UI labels with
> internal variable names. So probably also NAB.

The naming in the UI should reflect the geometry of the gradient.
The names are not "internal" but are published in the API, see enum GradientStyle.

"Quadratic" should be "Square". But changing that immediately might give problems. We would need "Square (previously wrongly called 'Quadratic')".

> 
> 
> Looking for gradient naming did not return bug insights:
> 
> CSS: linear, radial, and conic [1]
> Adobe: Linear, Radial, Conic, Diamond, Reflected
> Photoshop: Linear, Radial, Angle, Reflected and Diamond
> MSO: DiagonalDown, DiagonalUp, FromCenter, FromCorner, FromTitle,
> Horizontal, Mixed, Vertical
> MSO: Linear, Radial, Rectangular, Path

CSS gradients are not yet implemented in LO (bug 48392). They have a different concept and do neither provide "rectangular" nor "square". That is the reason why ODF has both, svg-gradients and draw-gradients.

"reflected" is similar to our "axial".

The gradients of MSO and LO are not compatible in many ways. Especially OOXML has no way to get a "rectangular" gradient. To get something similar you need to use the additional "fillRect" attribute to stretch the focus to a line in OOXML. "fillRect" is not available in the UI of MSO.

The first list "MSO" does not contain gradient types but predefined focus and size definitions. Those correspond to our "X/Y Offset". The second list "MSO" defines the gradient types. "Path" has no corresponding gradient type in LO.
Comment 3 Eyal Rozenberg 2023-03-14 21:11:19 UTC
> The term "quadratic" means mathematically "power 2", e.g. 5^2.

Actually, it means "square-ish" or "square-related". Quadratic equations, while involving powers of 2, are named after squares.

That being said...

* I agree that the changes Regina suggested are a clear improvement over the current choice of names.

* I don't like most of the existing names. They are not sufficiently descriptive; their semantics don't agree ("axial" is not the opposite of "radial") and it's probably not even possible to properly describe the gradiants with just a single word. We also have a lot of drop-down box real-estate for a longer phrase, so maybe that should be considered.
Comment 4 Heiko Tietze 2023-03-16 09:12:36 UTC
We discussed the topic in the design meeting.

Renaming is welcome, "Square" to "Rectangular" sounds good. And the reason to keep "Quadratic" associated with the current Square makes sense too. So we suggest to start with the new term and use "Square (Quadratic)".

But first of all we need to make sure that any renaming wont affect legacy documents.
Comment 5 Regina Henschel 2023-03-16 18:03:42 UTC
Created attachment 186011 [details]
Shapes with gradient, screenshots

(In reply to Heiko Tietze from comment #4)
> We discussed the topic in the design meeting.
> 
> Renaming is welcome, "Square" to "Rectangular" sounds good. And the reason
> to keep "Quadratic" associated with the current Square makes sense too. So
> we suggest to start with the new term and use "Square (Quadratic)".
> 
> But first of all we need to make sure that any renaming wont affect legacy
> documents.

The renaming is in https://gerrit.libreoffice.org/c/core/+/149004

A file to test with old LO versions and gepatched version is attached. It has the two gradients in question together with a screenshot.
Comment 6 Commit Notification 2023-03-20 17:14:42 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/790dc4d759c3a2f7f7fc513d358cc0e116e6f17a

tdf#154071 UI rename gradient back to 'Rectangular'...

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