Bug 159531 - Comments in Writer's margins should have some padding spacing to avoid text being flush to the edge
Summary: Comments in Writer's margins should have some padding spacing to avoid text b...
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium minor
Assignee: Heiko Tietze
URL:
Whiteboard: target:24.8.0
Keywords: difficultyMedium, easyHack, skillCpp, topicDesign
Depends on:
Blocks: Writer-Comments
  Show dependency treegraph
 
Reported: 2024-02-02 18:07 UTC by Jeff Fortin Tam
Modified: 2024-03-19 14:06 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot and mockup (current vs proposed UX) (51.85 KB, image/png)
2024-02-02 18:14 UTC, Jeff Fortin Tam
Details
Screenshot 2024-02-08 (231.43 KB, image/png)
2024-02-08 12:41 UTC, steve
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Fortin Tam 2024-02-02 18:07:19 UTC
Description:
Please see the attached screenshot+mockup combo.

Steps to Reproduce:
1. Insert a comment in Writer

Actual Results:
Text is flush against the left edge
(presumably against the right edge in RTL languages)

Expected Results:
There should be a small amount of spacing to let it breathe and let the eye distinguish the text from the edge, otherwise you can't benefit from the background color (especially in dark mode).


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 24.2.0.3 (X86_64) / LibreOffice Community
Build ID: da48488a73ddd66ea24cf16bbc4f7b9c08e9bea1
CPU threads: 8; OS: Linux 6.6; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Flatpak
Calc: threaded
Comment 1 Jeff Fortin Tam 2024-02-02 18:14:54 UTC
Created attachment 192357 [details]
Screenshot and mockup (current vs proposed UX)

6 pixels to the edge (as shown in this mockup) would not be intrusive,
yet would make for a noticeable improvement in UX.
Comment 2 Rafael Lima 2024-02-02 22:13:57 UTC
Some padding would be nice indeed. +1 from my side.
Comment 3 Jeff Fortin Tam 2024-02-02 22:22:11 UTC
Slight clarification: while, in the case of this screenshot, my padding simulation was roughly 6 pixels from the left edge, I realize now that from an implementation standpoint this probably needs to be defined as a percentage of the comment widget's width, rather than a hardcoded pixel size, because the comment widget's width scales with the document's based on the view's Zoom Factor; that said, my point overall remains :)
Comment 4 Heiko Tietze 2024-02-05 16:28:27 UTC
With the new comment style it's pretty simple to change on the paragraph style. But I agree that we should add indentation before/after by default.

In sw/source/core/doc/DocumentStylePoolManager.cxx the attribute for RES_POOLCOLL_COMMENT needs to be added. The prototype might come from RES_POOLCOLL_HTML_BLOCKQUOTE leftMargin/rightMargin.
Comment 5 Commit Notification 2024-02-07 12:45:55 UTC
Heiko Tietze committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1dc0c8c8304ebbce0a2e05e89a3b5458d88f3630

Resolves tdf#159531 - Indentation and spacing for comments

It will be available in 24.8.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 6 steve 2024-02-08 12:41:16 UTC
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: aa6d11771d085803cdb811579f47debc30c4d94b
CPU threads: 8; OS: macOS 13.6.4; UI render: Skia/Metal; VCL: osx
Locale: en-US (en_DE.UTF-8); UI: en-US
Calc: threaded

verified, thanks Heiko for handling this so swiftly.
Comment 7 steve 2024-02-08 12:41:30 UTC
Created attachment 192465 [details]
Screenshot 2024-02-08
Comment 8 steve 2024-02-08 12:42:24 UTC
Wondering, if author and timestamp should align and use the same padding space. There really seems no reason not to. Wdyt?
Comment 9 Heiko Tietze 2024-02-08 12:46:50 UTC
(In reply to steve from comment #8)
> Wdyt?
Different code, probably not easy to find. Having the author information drawn differently to the content is not bad (although spacing is our friend).
Comment 10 Charmaine9x 2024-03-19 02:07:46 UTC Comment hidden (spam)
Comment 11 steve 2024-03-19 14:06:24 UTC
Follow-up bug about using same padding for Author and Timestamp info than what is used for Comment Text: https://bugs.documentfoundation.org/show_bug.cgi?id=160276