Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Rounding issue when translating toolbar and updating vertical clipping #10668

Closed
Mugurell opened this issue Jul 22, 2021 · 2 comments
Closed
Assignees

Comments

@Mugurell
Copy link
Contributor

Mugurell commented Jul 22, 2021

Seen on mozilla-mobile/fenix#16386.
Following Hiro's hint about vertical clipping from Bugzilla I added some indicators on screen to easily verify the vertical clipping value and saw that the Float.toInt() from here which floors the value everytime leads to a bug in which we might set an off by 1 vertical clipping value.

ToolbarTranslationAndVerticalClipping1.mp4

In the above video it's seen that

  • when we set vertical clipping to be 154 the dynamic website element is shown at the very bottom
  • when we set vertical clipping to be 153 (although the toolbar translation is >153.5) the dynamic website element is shown above the normal height of the toolbar.

The solution here seems to be using Float.rountToInt which would give us

ToolbarTranslationAndVerticalClipping2.mp4

┆Issue is synchronized with this Jira Task

@Mugurell Mugurell self-assigned this Jul 22, 2021
Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 22, 2021
…on and vertical clipping

Just for debugging.
The values are set as close to where they're used as possible and allow us to
follow them in real time based on the on-screen gestures or to verify the end
value is the expected one.
@Mugurell
Copy link
Contributor Author

My code for the visual indicators can be seen in #10669

Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 22, 2021
grigoryk pushed a commit to gabrielluong/android-components that referenced this issue Sep 11, 2021
@Mugurell
Copy link
Contributor Author

The Fenix issue was verified as fixed
mozilla-mobile/fenix#16386 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant