private/printfdebugging/comments backport 25.04#15087
Open
printfdebugging wants to merge 9 commits intodistro/collabora/co-25.04from
Open
private/printfdebugging/comments backport 25.04#15087printfdebugging wants to merge 9 commits intodistro/collabora/co-25.04from
printfdebugging wants to merge 9 commits intodistro/collabora/co-25.04from
Conversation
…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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
make prettier-writeand formatted the code.make checkmake runand manually verified that everything looks okay