Bug 136686 - The "Strong" button when added to a toolbar shows "Strong Emphasis" not Strong
Summary: The "Strong" button when added to a toolbar shows "Strong Emphasis" not Strong
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.0.3 release
Hardware: All All
: lowest trivial
Assignee: sdc.blanco
URL:
Whiteboard: target:7.2.0
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-11 21:30 UTC by David W. Snow
Modified: 2021-01-14 15:01 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
video (1.77 MB, video/mp4)
2020-09-12 20:54 UTC, BogdanB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David W. Snow 2020-09-11 21:30:00 UTC
I customized the Formatting(Styles) toolbar and added "Strong" to the toolbar. It applies the "Strong Emphsis" style not the "Strong" style.
Comment 1 BogdanB 2020-09-12 20:53:53 UTC
Confirm with
Version: 7.0.1.2
Build ID: 7cbcfc562f6eb6708b5ff7d7397325de9e764452
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-US (ro_RO.UTF-8); UI: en-US
Calc: threaded

I created a video showing the problem.
Comment 2 BogdanB 2020-09-12 20:54:19 UTC
Created attachment 165430 [details]
video
Comment 3 BogdanB 2020-09-12 20:59:01 UTC
What I notice:
- In the Customize window it is named STRONG, but in the toolbar is Strong Emphasis
- Strong is different by bold, but strong emphasis include more than just bold.
Comment 4 Timur 2020-09-14 07:01:28 UTC
(In reply to David W. Snow from comment #0)
> "Strong" to the toolbar. It applies the "Strong Emphsis" style not the "Strong"
No. It shows "Strong Emphasis" and applies "Strong" with font Bold. 
I guess style should be just "Strong", because "Strong Emphasis" may both mean Bold or Bold Italic. In MSO it's just Strong. 
I set as Trivial and All OS.
Comment 5 Ming Hua 2020-09-14 07:17:23 UTC
I don't quite understand what the expected behavior is here, by all the different reporter/commenters.

My understanding is that LO's character style has only "Strong Emphasis" and no "Strong", the "Style" menu says so, the "Styles and Formatting" says so, too.

And the default "Strong Emphasis" character style just changes the font to bold, not bold and italic.  Maybe some users prefer bold and italic for their "strong emphasis", but they can easily change the style themselves.

So it seems to me the issue here is just that the toolbar customization UI is using label "Strong" for "Strong Emphasis" character style, and causing confusion or different expectation from the users?
Comment 6 BogdanB 2020-09-14 08:53:53 UTC
(In reply to Ming Hua from comment #5)
> I don't quite understand what the expected behavior is here, by all the
> different reporter/commenters.
> 
> My understanding is that LO's character style has only "Strong Emphasis" and
> no "Strong", the "Style" menu says so, the "Styles and Formatting" says so,
> too.
> 
> And the default "Strong Emphasis" character style just changes the font to
> bold, not bold and italic.  Maybe some users prefer bold and italic for
> their "strong emphasis", but they can easily change the style themselves.
> 
> So it seems to me the issue here is just that the toolbar customization UI
> is using label "Strong" for "Strong Emphasis" character style, and causing
> confusion or different expectation from the users?

Yes, I agree, that this terms here create confusion...
Comment 7 Heiko Tietze 2021-01-04 08:03:40 UTC
I disagree with the short "Strong" instead of "Strong Emphasis". It's a well-known term and more clear with the purpose- emphasizing the selection.

OTOH, we also have just "Emphasis" (making the text italic while Strong is bold). According [1] italic and bold are equally suited for the job. So having the use case in mind we better go with "Faint Emphasis". Or "Bold/Italic Emphasis", although the CS may be changed.

[1] https://practicaltypography.com/bold-or-italic.html
Comment 8 Mike Kaganski 2021-01-04 08:21:07 UTC
We have "Emphasis" and "Strong Emphasis". They are - in the best spirit of style ideology - *semantical* elements, and their names bear the idea of *levels* of emphasizing something. We have "normal" emphasis, and "even stronger" emphasis.

In the best spirit of style usage, they *do not* mean any kind of specific formatting like "italics" or "bold" or anything. The specific formatting is just a detail, the defaults expressing some preferences of those who created original implementation (wherever that happened). No, "Emphasis" is *not* equal to "italics", and "Strong Emphasis" is not equal to "Bold". And proposed "Strong" would also *not* equal to "Bold", for the same reason. Styles are not just different name for those direct formatting buttons, they require different paradigm, different way of thinking. And this tries to establish such a bond between specific direct formatting and specific styles, at the same time breaking semantical bond between two semantically related styles. I disagree with this. I suppose that the .uno command should be renamed to "Strong Emphasis" for consistency, not the style name be broken.
Comment 9 Heiko Tietze 2021-01-07 09:54:14 UTC
We discussed the proposal in the design meeting and agree with Mike. 

The command needs to be in alignment with the CS names. But it's actually not the UNO command but the assignment at the toolbar, which is wrong.

In sw/uiconfig/swriter/toolbar/textstylebar.xml and sw/uiconfig/sglobal/toolbar/textstylebar.xml

<toolbar:toolbaritem xlink:href=".uno:StrongEmphasisCharStyle" toolbar:text="Strong"/>


But if the Strong Emphasis command is manually customized into the toolbar it adds the full string and even when renamed to just "Strong" it never shows the right icon (strongemphasischarstyle.png). Maxim, is this a known issue or am I wrong somehow?


David: "Strong Emphasis" is on the 'Formatting (Styles)' toolbar, no need to add it.
Comment 10 Maxim Monastirsky 2021-01-08 00:35:06 UTC
(In reply to Heiko Tietze from comment #9)
> But if the Strong Emphasis command is manually customized into the toolbar
> ... it never shows the right icon (strongemphasischarstyle.png). Maxim,
> is this a known issue or am I wrong somehow?
It works as designed. Customization will add ".uno:StyleApply?Style:string=Strong Emphasis&amp;FamilyName:string=CharacterStyles", while the icon is associated with ".uno:StrongEmphasisCharStyle". While these two eventually execute the same action, they do have different icon names. The whole idea of linking commands via "TargetURL" was to use different icons and labels for the same underlying command in different places in the UI. So whatever is defined for ".uno:StrongEmphasisCharStyle" is not supposed to affect ".uno:StyleApply..." in any way.

It should be possible to assign an icon to ".uno:StyleApply..." itself, if you can figure out how to properly escape problematic chars (see https://opengrok.libreoffice.org/xref/core/framework/source/uiconfiguration/CommandImageResolver.cxx?r=ae662de2#31). Apparently it was easier to use the "TargetURL" trick instead, to get nicer icon names (except the NB, where "TargetURL" handling wasn't implemented).
Comment 11 Commit Notification 2021-01-13 13:28:24 UTC
Seth Chaiklin committed a patch related to this issue.
It has been pushed to "master":

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

tdf#136686  Improve toolbar label for "Strong Emphasis" character style

It will be available in 7.2.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 12 sdc.blanco 2021-01-14 15:01:04 UTC
(In reply to Commit Notification from comment #11)
> Affected users are encouraged to test the fix and report feedback.
I guess LO saves the toolbar settings in the user profile.  When I tested this version, the "old" labels appeared.  But restart in Safe Mode with Factory settings, then the desired Default Character, Strong Emphasis, and Quotation appear in the Formatting (Styles) toolbar customization (and also "Default Style" for Table was updated to "Default Table Style")