-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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: hidden page was not being checked for route change #35558
Conversation
WalkthroughThe recent updates improve the Changes
Assessment against linked issues
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 as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
/build-deploy-preview skip-tests=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/10307698939. |
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: 1
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (2)
- app/client/src/pages/AppViewer/index.tsx (2 hunks)
- app/client/src/selectors/editorSelectors.tsx (1 hunks)
Additional context used
Biome
app/client/src/selectors/editorSelectors.tsx
[error] 266-266: Avoid redundant double-negation.
It is not necessary to use double-negation when a value will already be coerced to a boolean.
Unsafe fix: Remove redundant double-negation(lint/complexity/noExtraBooleanCast)
Additional comments not posted (1)
app/client/src/pages/AppViewer/index.tsx (1)
22-22
: Good use of the new selector for page retrieval.The change to use
getViewModePageListWithHiddenPages
ensures hidden pages are included, addressing the navigation issue. This aligns well with the PR objectives.Also applies to: 91-91
const currentPage = pageList.find( | ||
(page) => page.pageId === currentPageId, | ||
); | ||
if (!!currentPage?.isHidden) { |
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.
Remove redundant double-negation.
The double-negation !!
is unnecessary as the condition will already be coerced to a boolean.
- if (!!currentPage?.isHidden) {
+ if (currentPage?.isHidden) {
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
if (!!currentPage?.isHidden) { | |
if (currentPage?.isHidden) { |
Tools
Biome
[error] 266-266: Avoid redundant double-negation.
It is not necessary to use double-negation when a value will already be coerced to a boolean.
Unsafe fix: Remove redundant double-negation(lint/complexity/noExtraBooleanCast)
Deploy-Preview-URL: https://ce-35558.dp.appsmith.com |
/build-deploy-preview skip-tests=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/10308236138. |
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
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- app/client/src/pages/AppViewer/index.tsx (2 hunks)
Files skipped from review as they are similar to previous changes (1)
- app/client/src/pages/AppViewer/index.tsx
Deploy-Preview-URL: https://ce-35558.dp.appsmith.com |
@AmanAgarwal041 - checking back here, is there automation test added for this bug fix so that we don't regress on this in the future? |
@btsgh There is no such automation I think. @nidhi-nair Can you ask the person who was working on this piece to add an automation test for the above scenario ? |
(cherry picked from commit 2ca40ec)
Sorry @AmanAgarwal041 - Probably @rishabhrathod01 is the right person to be adding an automation test for this case? |
@btsgh I think this comes under IDE pod. Maybe anyone from that pod can take that over, if they are occupied we can also pick that up. |
Description
There was a selector which was returning the pages array without hidden pages, that array was being used to update the app viewer component to render the page, since the hidden page object was not present in the array, hence the UI was not updating for the hidden page.
Fixes #35557
or
Fixes
Issue URL
Warning
If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.
Automation
/ok-to-test tags="@tag.All"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/10312684750
Commit: e8064dc
Cypress dashboard.
Tags:
@tag.All
Spec:
Fri, 09 Aug 2024 03:28:11 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
These changes aim to provide users with a more comprehensive view of available content, improving overall user experience.