Conversation
📝 WalkthroughWalkthroughA new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/features/navigation/AppNavigation.test.tsx (1)
440-448: Consider adding a test for dynamic expressions in the navigationTitle component tests.The current tests only validate static string values. Since
navigationTitlesupports dynamic expressions throughuseEvalExpression(as seen in the implementation), a test case that validates expression evaluation at the component level would complement the unit tests inshared-functions.test.tsx. For example, testing an expression that evaluates to a different heading value based on data model context.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/features/navigation/AppNavigation.test.tsx` around lines 440 - 448, Add a test in AppNavigation.test.tsx that verifies dynamic expressions in navigationTitle are evaluated: create a new it(...) that calls renderHeading with a navigationTitle containing an expression (e.g. a template/expression string) and either provide the needed data model/context or mock useEvalExpression to return the evaluated string, then assert the heading text (getByRole('heading', { level: 2 })) matches the evaluated result; reference renderHeading, navigationTitle, and useEvalExpression and mirror the pattern used in shared-functions.test.tsx for expression evaluation.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/features/navigation/AppNavigation.test.tsx`:
- Around line 440-448: Add a test in AppNavigation.test.tsx that verifies
dynamic expressions in navigationTitle are evaluated: create a new it(...) that
calls renderHeading with a navigationTitle containing an expression (e.g. a
template/expression string) and either provide the needed data model/context or
mock useEvalExpression to return the evaluated string, then assert the heading
text (getByRole('heading', { level: 2 })) matches the evaluated result;
reference renderHeading, navigationTitle, and useEvalExpression and mirror the
pattern used in shared-functions.test.tsx for expression evaluation.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3e064bdf-413e-4e80-9212-36fb9b025ba4
📒 Files selected for processing (6)
src/codegen/Common.tssrc/features/form/layoutSettings/LayoutSettingsContext.tsxsrc/features/navigation/AppNavigation.test.tsxsrc/features/navigation/AppNavigation.tsxsrc/features/navigation/PopoverNavigation.tsxsrc/utils/layout/generator/useEvalExpression.ts
|
Magnusrm
left a comment
There was a problem hiding this comment.
Nice work, just a nitpick on typing 😊
| export const usePageSettings = (): Omit<Required<GlobalPageSettings>, 'navigationTitle'> & | ||
| Pick<GlobalPageSettings, 'navigationTitle'> => { | ||
| const globalUISettings = useLaxGlobalUISettings(); | ||
| const layoutSettings = useLaxCtx(); |
There was a problem hiding this comment.
It seems like you could just use Required<GlobalPageSettings> here.



Description
Added dynamic header
navigationTitleinsettings.jsonfor each layout set, allowing customized side navigation headers.isValidOrScalarreturned true whenexprwas undefined. I therefore added a check inuseEvalExpressionto ensure thatdefaultValueis set whenexpris undefined.dynamisk_header.mp4
Related Issue(s)
Verification/QA
kind/*andbackport*label to this PR for proper release notes groupingSummary by CodeRabbit
New Features
Tests