-
Notifications
You must be signed in to change notification settings - Fork 75
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
refactor(pages-api): implement new page re-ordering on frontend #14717
base: spr/main/1a231f84
Are you sure you want to change the base?
Conversation
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 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 (
|
3dd2f72
to
bde0916
Compare
b951e77
to
a9fa3e6
Compare
commit-id:d90419ee
a9fa3e6
to
cb47f31
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## spr/main/1a231f84 #14717 +/- ##
=====================================================
- Coverage 95.78% 95.77% -0.01%
=====================================================
Files 1927 1927
Lines 25126 25127 +1
Branches 2868 2865 -3
=====================================================
Hits 24066 24066
- Misses 800 801 +1
Partials 260 260 ☔ 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.
Well done 💪
const pageIndex = pagesModel.pages.findIndex((page) => page.id === pageName); | ||
const disableUp = pageIndex === 0; | ||
const disableDown = pageIndex === pagesModel.pages.length - 1; |
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 adjustments on the disable logic, easier to read :)
|
||
const { mutate: updateLayoutOrder } = useUpdateLayoutOrderMutation( |
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.
It seems like this hook was only used here. Perhaps we can fully remove the hook as well? 🙂
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 catch, removed 👍
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.
🎉
Fantastic job! 🤩 I tested in DEV and noticed a few issues : When I add a new page :
add-pages.movWhen I edit or delete a page name, the selected page remains the old one (url + config panel)edit-pages.movdelete-pages.movAn error occurs when double-clicking the
|
This will configure a page layout and allow optional additions to be made through a builder pattern.
@mlqn
But i was unable to reproduce the double click issue, maybe it was solved by the changes done. Please take a look. |
Description
Stack:
Related Issue(s)
Verification
Documentation