Skip to content
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

[v10.0.x] Navigation: Fix toolbar actions flickering on mobile #70564

Merged
merged 1 commit into from
Jun 23, 2023

Conversation

grafana-delivery-bot[bot]
Copy link
Contributor

Backport ff429c9 from #70524


What is this feature?

  • stops toolbar actions flickering on small screens
    • does this by setting the visibility to false initially and only setting to true once the intersection observer has ran
    • upside: no flickering! 🥳
    • downside: toolbar actions won't render at all until the intersection observer has ran, which will be on the next trip round the event loop. i don't think this is noticeable

before

Screenshare.-.2023-06-22.4_01_46.PM.mp4

after

Screenshare.-.2023-06-22.4_00_33.PM.mp4

Why do we need this feature?

  • the flickering is ugly 🤮

Who is this feature for?

  • everyone! but mostly people on smaller browser screens (e.g. mobile)

Which issue(s) does this PR fix?:

Fixes #

Special notes for your reviewer:

at some point i'm going to try and extract this logic out from this component into a custom hook, but that's not for this PR 😅

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.

* fix flickering overflow

* set everything to hidden by default

* extend intersectionobserver mock

(cherry picked from commit ff429c9)
@grafana-delivery-bot grafana-delivery-bot bot requested a review from a team as a code owner June 23, 2023 07:52
@grafana-delivery-bot grafana-delivery-bot bot requested review from tskarhed and eledobleefe and removed request for a team June 23, 2023 07:52
@grafana-delivery-bot grafana-delivery-bot bot added this to the 10.0.x milestone Jun 23, 2023
@grafanabot grafanabot added the pr/external This PR is from external contributor label Jun 23, 2023
Copy link
Contributor

@ashharrison90 ashharrison90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm bot 🤖

@ashharrison90 ashharrison90 enabled auto-merge (squash) June 23, 2023 07:53
@ashharrison90 ashharrison90 merged commit 5a11b45 into v10.0.x Jun 23, 2023
16 of 17 checks passed
@ashharrison90 ashharrison90 deleted the backport-70524-to-v10.0.x branch June 23, 2023 08:01
@zerok zerok modified the milestones: 10.0.x, 10.0.2 Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants