Skip to content

private/printfdebugging/comments backport 25.04#15087

Open
printfdebugging wants to merge 9 commits intodistro/collabora/co-25.04from
private/printfdebugging/comments-backport-25.04
Open

private/printfdebugging/comments backport 25.04#15087
printfdebugging wants to merge 9 commits intodistro/collabora/co-25.04from
private/printfdebugging/comments-backport-25.04

Conversation

@printfdebugging
Copy link
Contributor

  • Resolves: #
  • Target version: main

Summary

this is a backport PR. the commits in this PR fix the "comments cut off in writer" issue where when the window width was reduced, the comments would collapse and then expand such that half of the comment was cut off. here we disable collapsed comments in writer and get an early "we have comments" acknowledgement from core based on which we leave extra space so that comments become visible.

this requires a core change https://gerrit.libreoffice.org/c/core/+/201994 (bacport)

TODO

  • ...

Checklist

  • I have run make prettier-write and formatted the code.
  • All commits have Change-Id
  • I have run tests with make check
  • I have issued make run and manually verified that everything looks okay
  • Documentation (manuals or wiki) has been updated or is not required

…ility

Signed-off-by: Sahil Gautam <sahil.gautam@collabora.com>
Change-Id: I619c553e2034ac51cdef084470549edc1f6e7b58
(cherry picked from commit e94048f)
Signed-off-by: Sahil Gautam <sahil.gautam@collabora.com>
Change-Id: I248d0641372c5349220eea3a37d09fb4c02ef35b
(cherry picked from commit 3d2f18b)
The comments collapsed when the window width was reduced to a point
where there wasn't enough space to show full comments. And when
the window width was reduced further, they would expand to go into
overflow. To be specific, they expanded when the available space was
less than the collapsed comment width.

When the collapsed comment expanded, it was put in a weird spot, some
part of it visible while other hidden behind the x-overflow of the
canvas. A simple solution for this is to just not expand the comment
till we are sure that the whole of it would end up behind the canvas
overflow.

But this has some issues. Like if the window size is reduced just
enough that the overflow isn't triggered, there's no way to see
those comments on the right side. This will later be fixed in the
follow-ups. Once we know that there are comments in the document early
on, we can open the document at a zoom where the comments are visible,
either collapsed (or in full width).

Signed-off-by: Sahil Gautam <sahil.gautam@collabora.com>
Change-Id: Id82b38c4ce6c0519b24fca862f82d5a56630ab35
(cherry picked from commit edb9d04)
There were some issues with how the collapsed comments re-expanded,
like they used to re-expanded and be in a half-visible
half-behind-overflow state. So to deal with that we decided to not
re-expand them until they were fully visible or fully hidden. But
in that case, if the window width is reduced to a point where the
collapsed comments hid behind the overflow and the scrollbar isn't
activated, there's no way to access the collapsed comments.

So we decided to get rid of the collapsed comments (only for writer)
to see how that works out.

Signed-off-by: Sahil Gautam <sahil.gautam@collabora.com>
Change-Id: I01686ced558d8df8e902b0a52a0359ca1a2d84b6
(cherry picked from commit c9501d2)
It's not really fixing those tests, but rather breaking them to ignore
the missing collapsed comments. It would require a larger refactor in
the future.

Signed-off-by: Sahil Gautam <sahil.gautam@collabora.com>
Change-Id: I6ca91f3dbd1bed5649ed418394cc69f4033f99ae
(cherry picked from commit d282118)
Signed-off-by: Sahil Gautam <sahil.gautam@collabora.com>
Change-Id: I33c239feae541cc55058165be1a3df61e447436f
(cherry picked from commit 49eaa60)
This is an early flag which we can use at various places like for
setting the initial zoom level, for making some space for comments
etc.

Signed-off-by: Sahil Gautam <sahil.gautam@collabora.com>
Change-Id: Ia6de0ae3fda1fd701d9a0e2e6dc796842a923eae
(cherry picked from commit 8fdfeaa)
We disabled collapsed comments in writer a few commits back. This
means that dynamic zoom would put the full width comments partially
out of the view by default. That would look bad/broken.

To fix that, we use the `partHasComments` flag to check if the part
(whole document in case of writer & the individual slide in case of
impress) has any comments, and if it does, we consider their width
before setting the dynamic zoom. This way there's enough space left
for the comments to be fully in view.

We also consider that the status might arrive after the
`_fitWidthZoom` function has been called, so we call it again when the
`partHasComments` value changes in `_onStatusMsg`.

Signed-off-by: Sahil Gautam <sahil.gautam@collabora.com>
Change-Id: I74bd51afa514423d10941d99d9757f049707dc92
(cherry picked from commit d7715bb)
After a point, the more we zoom into the document, the less content is
visible, therefore it makes sense to have an upper limit.

Signed-off-by: Sahil Gautam <sahil.gautam@collabora.com>
Change-Id: I08856c29ec285bd8bacaa7b8bef92f2f9e0a67bc
(cherry picked from commit 793f5ba)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To Review

Development

Successfully merging this pull request may close these issues.

1 participant