Bug 134560 - Styles Inspector should show attribute names in human readable form
Summary: Styles Inspector should show attribute names in human readable form
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Shivam Kumar Singh
URL:
Whiteboard: target:7.1.0
Keywords:
Depends on:
Blocks: Style-Inspector
  Show dependency treegraph
 
Reported: 2020-07-06 11:36 UTC by Heiko Tietze
Modified: 2020-08-04 07:37 UTC (History)
3 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 Heiko Tietze 2020-07-06 11:36:38 UTC
Currently we list internal names such as CharPosture (italic for PS Citation) or ParaTopMargin (212) while users understand Font > Western > Style and Indents & Spacing > Above Paragraph > 0.21cm (0.39 line).

If we can pick the labels from the properties dialog I suggest to only use the actual label and show the tab name in tooltip.
Comment 1 Shivam Kumar Singh 2020-08-01 18:28:50 UTC
What can be a way to implement this ?
There is a way in my mind. To have an unordered map and store all the properties with their correct display name something like :-
{ {"DisplayName", "Display Name"},
  {"CharHeight", "Char Height"}
  ....
}

I think it would be a good plan to implement this before making strings localisable.
Comment 2 Shivam Kumar Singh 2020-08-01 19:00:51 UTC
... or in most of the cases, we need to add a space in the property name whenever we get a Capital letter, so just insert space in before all the capital letters(except first).
I implemented this and it works pretty well.
https://imgur.com/a/C8MFCru
Comment 3 Mike Kaganski 2020-08-02 06:20:02 UTC
We need to use the map of API names to RID_ defines, which should be defined as en-US names in a dedicated .hrc.

IMO we still need to also provide API name in SI, too. It should be either as a tooltip, or in third column. That would be useful for those who are creating macros. The same way as we added tooltips with UNO names to the entries in customization dialog.

Inserting spaces before capitals is not a solution. It is not translatable. It does not allow to come with a good name for things like "ContinueingPreviousSubTree" (a property name that has a typo - Continu*e*ing, that we cannot change because of API breakage) or like "UsePP" (will you output it as "Use P P"? that's wrong, it should be "Use pp", because it 'determines if following page numbers are displayed using a "pp."').
Comment 4 Commit Notification 2020-08-03 19:27:52 UTC
Shivam Kumar Singh committed a patch related to this issue.
It has been pushed to "master":

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

tdf#134560 tdf#135107 make inspector contents human readable

It will be available in 7.1.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 5 Shivam Kumar Singh 2020-08-04 06:05:46 UTC
"Para Hyphenation Max Leading Chars"
is too big, and gets trimmed towards the end when displayed in the panel.
Can we change "Hyphenation" -> "Hyphen" or increase the column width, perhaps ?
Comment 6 Shivam Kumar Singh 2020-08-04 06:07:42 UTC
Heiko had suggested at gerrit "Can we show ellipsis when the column is too small?"
Comment 7 Heiko Tietze 2020-08-04 07:37:23 UTC
(In reply to Shivam Kumar Singh from comment #6)
> Heiko had suggested at gerrit "Can we show ellipsis when the column is too
> small?"

inspectorpanel.ui: cellrendertext1 > ellipsis = end
(initial column width for value is minimized in case of very long strings and ellipsis show from the beginning, so no additional max-width setting needed)