-
Notifications
You must be signed in to change notification settings - Fork 332
feat(router): added router-less logic to VersionsSidebarContainer #4209
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
Conversation
WalkthroughThis update introduces optional internal sidebar navigation to Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant VersionsSidebarContainer
participant InternalNavHandler
participant ReactRouter
User->>VersionsSidebarContainer: Triggers version update (e.g., delete)
alt routerDisabled & internalSidebarNavigationHandler provided
VersionsSidebarContainer->>InternalNavHandler: Call handler with new state
else router enabled
VersionsSidebarContainer->>ReactRouter: history.push(new version route)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🧰 Additional context used🧠 Learnings (6)📓 Common learnings
📚 Learning: `versionsidebarview` intentionally uses the `versionid` field to stay consistent with current url pa...
Applied to files:
📚 Learning: in the box-ui-elements codebase, flow components use .flow.js type definition files, not typescript ...
Applied to files:
📚 Learning: rendering functions (functions that return jsx) are considered anti-patterns in react development be...
Applied to files:
📚 Learning: files with `@flow` or `@flow strict` comments at the top use flow type syntax, not typescript. flow ...
Applied to files:
📚 Learning: the box-ui-elements project uses flow for type annotations in javascript files, as indicated by @flo...
Applied to files:
🧬 Code Graph Analysis (2)src/elements/content-sidebar/versions/__tests__/VersionsSidebarContainer.test.js (5)
src/elements/content-sidebar/versions/VersionsSidebarContainer.js (3)
🪛 Biome (2.1.2)src/elements/content-sidebar/versions/VersionsSidebarContainer.js[error] 29-29: 'import { type x ident }' are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax. TypeScript only syntax (parse) [error] 30-30: 'import { type x ident }' are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax. TypeScript only syntax (parse) [error] 31-31: 'import { type x ident }' are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax. TypeScript only syntax (parse) [error] 279-279: type annotation are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax. TypeScript only syntax (parse) [error] 320-329: Illegal return statement outside of a function (parse) ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (10)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Note Unit test generation is an Early Access feature. Expect some limitations and changes as we gather feedback and continue to improve it. Generating unit tests... This may take up to 20 minutes. |
src/elements/content-sidebar/versions/__tests__/VersionsSidebarContainer.test.js
Outdated
Show resolved
Hide resolved
src/elements/content-sidebar/versions/__tests__/VersionsSidebarContainer.test.js
Show resolved
Hide resolved
src/elements/content-sidebar/versions/__tests__/VersionsSidebarContainer.test.js
Outdated
Show resolved
Hide resolved
src/elements/content-sidebar/versions/__tests__/VersionsSidebarContainer.test.js
Outdated
Show resolved
Hide resolved
src/elements/content-sidebar/versions/__tests__/VersionsSidebarContainer.test.js
Outdated
Show resolved
Hide resolved
src/elements/content-sidebar/versions/__tests__/VersionsSidebarContainer.test.js
Outdated
Show resolved
Hide resolved
src/elements/content-sidebar/versions/__tests__/VersionsSidebarContainer.test.js
Outdated
Show resolved
Hide resolved
src/elements/content-sidebar/versions/__tests__/VersionsSidebarContainer.test.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Making Router optional in VersionsSidebarContainer.
Covered new logic with tests.
Summary by CodeRabbit
New Features
Tests