-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX] renderer: Fix Box rendering #5400
base: 16.0
Are you sure you want to change the base?
Conversation
f89ead2
to
f40408e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -222,7 +222,7 @@ export class InternalViewport { | |||
* @param zone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typos in commit msg "dimensio", "taht"
"context.rect(0, 0, 952, 974)", | ||
"context.clip()", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would probably do a test that we clip what we dran on the frozen panes. It shouldn't be too annoying
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added some tests related to the renderer and he new getter 'getRect'. Not sure about the naming but 'getRenderingRect' was definitely wrong. it's more used as a computational tool.
f40408e
to
963a33d
Compare
When we implemented the frozen panes, we accidently destroyed the distinction between the actual size of a cell/merge and its visual dimension in the viewport. i.e. the dimension of the part that we be rendered. However, the rest of the rendering process was relying on the box size to compute several things (button , text positions for instance) This means that all computations that relied on the actual size of a cell/merge are now false. A good example is the merge. Create a merge with some text inside of it and make sure it spans over several columns. The text is aligned at the center of the merge. Now scroll a bit and the text will stay centered in the VISIBLE part of the merge but not the merge itself. On another hand, we did not account for some text formatting, specifically text aligned on the right can overflow outside of their pane. This revision fixes the two issues: - Reintroduce a getter `getRect` to properly compute the positiontioning of text/icons of a box - Change the rendering process of the grid by splitting the rendering one pane at a time. Task: 4448426
963a33d
to
1695ab3
Compare
When we implemented the frozen panes, we accidently destroyed the
distinction between the actual size of a cell/merge and its visual
dimensio in the viewport. i.e. the dimension of the part that we be
rendered.
However, the rest of the rendering process was relying on the box size
to compute several things (button , text positions for instance)
This means that all computations taht relied on the actual size of a
cell/merge are now false.
A good example is the merge. Create a merge with some text inside of it
and make sure it spans over several columns.
The text is aligned at the center of the merge. Now scroll a bit and the
text will stay centered in the VISIBLE part of the merge but not the
merge itself.
On another hand, we did not account for some text formatting, specifically
text aligned on the right can overflow outside of their pane.
This revision fixes the two issues:
getRect
to properly compute thepositiontioning of text/icons of a box
one pane at a time and work in reverse such that a frozen pane takes
precedence on the main viewport.
The second part of the approach is not the panacea as the mobile mode
will push the concept of frozen pane further but as a fix it suits well.
Task: 4448426
review checklist