feat(theme): add transition isPending UI to Sidebar#2778
Merged
Conversation
✅ Deploy Preview for rspress-v2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
Rsdoctor Bundle Diff Analysis📁 webPath:
Generated by Rsdoctor GitHub Action |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds transition pending UI feedback to the Sidebar component by integrating React's useTransition hook to show visual feedback during navigation.
Key changes:
- Integrated
useTransitionhook in SidebarItem to track navigation pending state - Added pending state styling (opacity and background) to sidebar items
- Refactored
useLinkNavigateto accept an optionalstartTransitionparameter - Fixed function naming issue in
useScrollAfterNav.ts(renamed fromuseSetup)
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
packages/core/src/theme/logic/useSetup.ts |
New empty placeholder function for setup logic |
packages/core/src/theme/logic/useScrollAfterNav.ts |
Fixed incorrect function name from useSetup to useScrollAfterNav |
packages/core/src/theme/layout/Layout/index.tsx |
Reorganized imports to use @theme exports instead of relative paths |
packages/core/src/theme/index.ts |
Updated exports to include type exports and moved useSetup to new location |
packages/core/src/theme/components/Sidebar/SidebarItem.tsx |
Added useTransition hook integration and passed startTransition to Link component |
packages/core/src/theme/components/Sidebar/SidebarItem.scss |
Added pending state styling with reduced opacity and background color |
packages/core/src/theme/components/Link/useLinkNavigate.ts |
Modified to accept optional startTransition parameter for transition support |
packages/core/src/theme/components/Link/index.tsx |
Added startTransition prop and passed it to useLinkNavigate |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
89154b8 to
65eef2e
Compare
Timeless0911
approved these changes
Nov 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
feat(theme): add transition isPending UI to Sidebar
Related Issue
Checklist