This repository has been archived by the owner on Sep 30, 2024. It is now read-only.
Wildcard: Menu button component has bad performance and glitching #38262
Labels
frontend-platform
Issues related to our frontend platform, owned collectively by our frontend crew.
sourcegraph-refinement-bot
webapp
Background
On the dashboard code insights page we render a lot of insight cards, each card renders a menu button component within the card. This means we render a lot of menu buttons at the same time and since this PR we always render the menu button content elements even if they're not visible (when the menu button isn't open). This increases the number of elements on the page and therefore increases the paint load for the browser.
Screen.Recording.2022-07-05.at.16.30.05.mov
Proposal
We should not render elements that are not visible on the page. As I recall the original fix about rendering elements on the page in order to focus the first available item came from the fact that overwise reach UI does not focus the first available item. I think this is a good sign for us that we should try different components for menu button pattern that doesn't require rendering on the page all time.
The text was updated successfully, but these errors were encountered: