feat: add permissionKey support to NavigationNavbar#1741
Conversation
…avigationNavbar Signed-off-by: Rishi Raj <rishiraj438gt@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughNavigationNavbar now supports permission-key and action-based gating for top-level and nested items while retaining legacy boolean permissions. NavigationItem and NavigationNavbar are re-exported through package entry points. ChangesPermission-aware navigation
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/base/Checkbox/index.tsx`:
- Line 4: Propagate the new public symbols through every required barrel: update
src/base/Checkbox/index.tsx, src/base/Select/index.tsx, and
src/base/TextField/index.tsx for CheckboxProps, SelectProps, and TextFieldProps
respectively, then re-export those symbols from the base-domain barrel and
src/index.tsx; also re-export NavigationItem from src/custom/index.tsx and the
root barrel. Ensure each symbol is available through its feature-local, domain,
and root exports.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: c4c2722f-3cdf-4505-b60d-f8f2e64464d4
📒 Files selected for processing (9)
src/base/Checkbox/Checkbox.tsxsrc/base/Checkbox/index.tsxsrc/base/Select/Select.tsxsrc/base/Select/index.tsxsrc/base/TextField/TextField.tsxsrc/base/TextField/index.tsxsrc/custom/NavigationNavbar/index.tsxsrc/custom/NavigationNavbar/navigationNavbar.tsxsrc/custom/index.tsx
…kbox Signed-off-by: Rishi Raj <rishiraj438gt@gmail.com>
|
@coderabbitai review |
✅ Action performedReview finished.
|
NavigationItem (and NavigationNavbar's own declaration) reached the root
barrel only through `export * from './custom'`, which rollup-plugin-dts
drops from the bundled d.ts - so `import { type NavigationItem } from
'@sistent/sistent'` failed type-checking downstream despite the runtime
export existing. Add an explicit root re-export following the established
FeedbackButton pattern to force both declarations into the published bundle.
Signed-off-by: marblom007 <158522975+marblom007@users.noreply.github.com>
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
CodeRabbit, you're a lazy bastard. |
Document the rollup-plugin-dts nested-barrel declaration-drop quirk that this PR's NavigationItem/NavigationNavbar fix addresses, so future maintainers adding custom exports know to add an explicit re-export in src/index.tsx and verify against the built dist/index.d.ts. Signed-off-by: marblom007 <158522975+marblom007@users.noreply.github.com>
Description
This PR enhances Sistent components (
NavigationNavbar) by adding nativepermissionKeyandpermissionActionsupport, seamlessly integrating them into Sistent'sPermissionShieldauthorization system.Key Changes
NavigationNavbarComponent: AddedpermissionKey?: KeytoNavigationIteminterface and passed through toMenuItemfor automatic PermissionShield tooltips.NavigationItemtype from root barrel exports.WhatsApp.Video.2026-07-24.at.02.00.30.mp4
Signed commits
Summary by CodeRabbit
New Features
permissionKey+permissionAction.NavigationItemtype for consumers.Bug Fixes
NavigationNavbarandNavigationItemcan be imported reliably.Documentation
disttype declarations.