Bug 145673 - UI: comment box doesn't expand while typing (scrollbar instead)
Summary: UI: comment box doesn't expand while typing (scrollbar instead)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.7.2 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Writer-Comments
  Show dependency treegraph
 
Reported: 2021-11-14 08:18 UTC by Telesto
Modified: 2024-05-21 07:04 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Screencast (234.57 KB, video/mp4)
2021-11-14 08:29 UTC, Telesto
Details
Sample document demonstrates behavior (8.86 KB, application/vnd.oasis.opendocument.text)
2021-11-15 07:01 UTC, Rainer Bielefeld Retired
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2021-11-14 08:18:01 UTC
Description:
UI: comment box doesn't expand while typing

Steps to Reproduce:
1. Open attachment 176216 [details]
2. Place cursor inside the comment box hello world 
3. Press CTRL+A
4. Type: "1"
5. press Enter
6. Type "2"
7. Press Enter -> Scrollbar appears.. comment box isn't expanding

Not sure what's so special about this file.. I can't reproduce it from scratch

Actual Results:
Comment box not expanding

Expected Results:
Should be the case


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.3.0.0.alpha1+ (x64) / LibreOffice Community
Build ID: 73334560b2dd2d60ac58d2cc2b1a5295490b03e1
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 1 Telesto 2021-11-14 08:20:10 UTC
Sorry it actually is reproducible from scratch, if you create the same setup as in the document with 2 comment boxes
Comment 2 Telesto 2021-11-14 08:28:09 UTC
Also in
LibreOffice 3.5.0rc3 
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735
Comment 3 Telesto 2021-11-14 08:29:39 UTC
Created attachment 176241 [details]
Screencast
Comment 4 Telesto 2021-11-14 08:37:52 UTC
@Caolan
Have a number of fixes recently related to weld annotation window. The bug here is unrelated to welding. However you're knowledge of the annotate stuff is likely still fresh; so this might be easy solvable. If you're interested of course

Not even totally sure if this being a bug or by design for performance reasons. Live updating comment size boxes could be pretty expensive in large documents with plenty of comments?
Comment 5 Rainer Bielefeld Retired 2021-11-15 07:01:20 UTC
Created attachment 176255 [details]
Sample document demonstrates behavior

My observation with newly created WRITER document amd Installation of Version:7.2.1.2 (x64); Build ID: 87b77fad49947c1441b67c559c339af8f3517e22; CPU threads: 12; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win; Locale: de-DE (de_DE); UI: de-DE; Calc: threaded  |  my default User Profile:

When I type text Comment Box will expand if there is room enough.
As soon as it is going to touch Comment Box below the box will not go on to expand, but vertical scroll bar appears.

I think that is a useful and probably the intended behavior.

For your own tests simply type some nonsense strings into comment boxes. Always when room for expansion is spent Comment Box will no longer expand, but vertical scroll bar appears.
Comment 6 Telesto 2021-11-15 08:34:23 UTC
(In reply to Rainer Bielefeld Retired from comment #5)
> When I type text Comment Box will expand if there is room enough.
> As soon as it is going to touch Comment Box below the box will not go on to
> expand, but vertical scroll bar appears.
> 
> I think that is a useful and probably the intended behavior.

If you exit the comment box with scrollbar, so placing the cursor outside the comment box, the comment box will expand as long as enough room available on 'margin' of the page 

I'm slightly "allergic" for scrollbar, because it's hiding the text you typed previously. I would prefer see it expand immediately, if this would happen anyhow (after exit of comment box it does adapt). This is more WYSIWYG and prevents masking text & the flawing after leaving the comment box.

* automatic expanding probably somewhat expansive (and there are already pre-existing perf issues; Noel has done some investigations what needs to be done, however needs funding before getting fixed)
* It would mean that bottom document comment boxes would expand at the top side (don't think this would be an issue)
* At the point the margin being filled with comment boxes all of those would get scroll bars. Advantage: you don't have to type in a 2 row comment box, but it's equal distributed for the start (with adaptive size). 
* I would even go the opposite saying when entering a comment box with a hugh text, shrink all other comment boxes even more, so you can see the full text until exit. Would make reading a comment more comfortable, I estimate. Instead of having a 30 lines of text and only lines visible (yes those document with tremendous amount of comments exist).
Comment 7 Heiko Tietze 2021-11-15 08:55:08 UTC
Guess it's just a tricky implementation to expand while typing if there is sufficient space. It would improve UX but is not crucial.
Comment 8 QA Administrators 2023-11-16 03:12:52 UTC Comment hidden (obsolete)
Comment 9 Mohit Marathe 2024-05-20 05:18:30 UTC
(In reply to Heiko Tietze from comment #7)
> Guess it's just a tricky implementation to expand while typing if there is
> sufficient space. It would improve UX but is not crucial.

Hello,

Currently, I'm working on this and am curious as to what is the consensus on this? Should we stick to scrollbar? I think expanding the comment box (as required) will surely improve the UX (although I still have to figure out how will I do that).

Thanks,
Mohit
Comment 10 Heiko Tietze 2024-05-21 07:04:45 UTC
The comments box has a fix height of 100px (just a random number). If the content height exceeds this number, the control should grow but only if a) the remaining space in the sidebar is sufficient and b) a reasonable maximum.

For a) I think it requires adjustment to all controls if, for example, two or three very large comment boxes are in the sidebar, but the control must not resize if the sidebar is filled with small comments.

For b) I suggest to make it easy to change and start with some 500px.

Ultimately a workaround for this issue is to use the planned comments sidebar.