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

perf: optimize scrolling and navigation perf #133

Merged
merged 3 commits into from
May 10, 2022
Merged

Conversation

grgbkr
Copy link
Contributor

@grgbkr grgbkr commented May 10, 2022

Optimize scrolling and navigation perf

  1. optimize back from detail navigation by continuing to render the IssueList/IssueBoard, just hidden. This also helps to maintain scoll position in the list on back
  2. optimize scrolling and nav rendering by updating StatusMenu and PriorityMenu (which are on every IssueRow) to only render a component contain usePopper when the menu is open. usePopper uses context and was causing unnecessary re-renders of StatusMenu and PriorityMenu.
  3. remove useQueryState for detailIssueID from IssueItem and IssueRow. useQueryState uses context, and so all of the IssueItems/IssueRows rerendered when 'iss' query param changed, even though IssueItem and IssueRow only used the setDetailIssueID api. Instead thread down a onOpenDetail callback.
  4. judiciously add React.memo at various layers.

Fixed #53

@grgbkr grgbkr requested a review from cesara May 10, 2022 08:33
@vercel
Copy link

vercel bot commented May 10, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
repliear ✅ Ready (Inspect) Visit Preview May 10, 2022 at 8:39AM (UTC)

@grgbkr grgbkr requested a review from aboodman May 10, 2022 08:33
@grgbkr grgbkr merged commit 26da286 into main May 10, 2022
@grgbkr grgbkr deleted the grgbkr/optimize-back branch May 10, 2022 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restore scroll position when going back from detail
1 participant