-
Notifications
You must be signed in to change notification settings - Fork 76
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
fix: case error page id #14665
fix: case error page id #14665
Conversation
📝 WalkthroughWalkthroughThis pull request modifies the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (3)
🔇 Additional comments (4)
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
frontend/packages/ux-editor/src/utils/designViewUtils/designViewUtils.test.ts (1)
36-43
: LGTM! Good test coverage for case-insensitive behavior.The test case effectively verifies the fix for uppercase letters in page IDs. Consider adding another test case for mixed case variations to ensure comprehensive coverage.
+ it('return null when new name is the same as old name but with mixed case', () => { + const mixedCaseName = mockOldName.split('').map((c, i) => + i % 2 === 0 ? c.toUpperCase() : c.toLowerCase() + ).join(''); + const nameErrorkey = getPageNameErrorKey( + mixedCaseName, + mockOldName, + mockLayoutOrder, + ); + expect(nameErrorkey).toEqual(null); + });
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
frontend/packages/ux-editor/src/utils/designViewUtils/designViewUtils.test.ts
(1 hunks)frontend/packages/ux-editor/src/utils/designViewUtils/designViewUtils.ts
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: Build environment and run e2e test
- GitHub Check: CodeQL
- GitHub Check: Testing
🔇 Additional comments (1)
frontend/packages/ux-editor/src/utils/designViewUtils/designViewUtils.ts (1)
24-27
: LGTM! Consistent case-insensitive comparison.The implementation correctly uses case-insensitive comparison and aligns well with the existing
pageNameExists
function which already uses the same approach. This change effectively fixes the issue with uppercase letters in page IDs.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #14665 +/- ##
==========================================
- Coverage 95.76% 95.76% -0.01%
==========================================
Files 1914 1914
Lines 24950 24949 -1
Branches 2857 2857
==========================================
- Hits 23893 23892 -1
Misses 798 798
Partials 259 259 ☔ View full report in Codecov by Sentry. |
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.
Nice work! 💯
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.
Tested ok in dev 👍
Description
Users will no longer receive an error when updating the page ID with different case letters
Replaced the
formLayoutSettings.pages.order
to get the page names, as the new Navigation structure will likely change this logic.Related Issue(s)
Verification
Documentation
Summary by CodeRabbit
Summary by CodeRabbit
Bug Fixes
Tests