-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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: Anvil Modal rendering issues when added via property pane. #33161
Conversation
Modal widget is rendered as a skeleton widget until evaluations are returned which causes a glitch. Modal should render its own version of loader when loading until then Modal will not be rendered until evaluations are returned.
WalkthroughThe updates primarily focus on refining URL handling in editor and preview modes, and modifying widget rendering logic in the Anvil system. The changes enhance user experience by maintaining widget selections and improving error handling for different widget types. Changes
Assessment against linked issues
Possibly related 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 Configration File (
|
…o modal-glitch
…o modal-glitch
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
Out of diff range and nitpick comments (1)
app/client/src/layoutSystems/anvil/integrations/modalSelectors.ts (1)
5-12
: Consider adding type annotations for better type safety and clarity.Adding type annotations to the function parameters and return type can help improve the readability and maintainability of the code by making the expected types explicit.
app/client/src/sagas/selectors.tsx
Outdated
export const getAllDetachedWidgetIds = memoize((state: AppState) => { | ||
return Object.values(state.entities.canvasWidgets) | ||
.filter((widget: FlattenedWidgetProps) => !!widget.detachFromLayout) | ||
.map((widget: FlattenedWidgetProps) => widget.widgetId); | ||
}; | ||
}); |
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.
Optimize the memoization of getAllDetachedWidgetIds
to enhance performance.
Consider refining the memoization of getAllDetachedWidgetIds
to ensure that it only recomputes when necessary. This can be achieved by providing a more specific dependency array or by using a more efficient memoization technique.
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.
using only the canvasWidgets state now, instead of the entire state.
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.
@marks0351, your update to use only the canvasWidgets
state for memoization in getAllDetachedWidgetIds
is a solid improvement. By narrowing down the dependency to just the relevant part of the state, you've effectively optimized the function to only recompute when necessary, which should enhance performance. Great job on refining this!
If you have any more areas where you think performance could be improved or need further assistance, feel free to ask!
/build-deploy-preview skip-tests=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/8969512330. |
Deploy-Preview-URL: https://ce-33161.dp.appsmith.com |
…o modal-glitch
Description
Tip
Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team).
Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR.
Fixes #31889
Fixes #33205
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.Anvil"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/8983872645
Commit: a243293
Cypress dashboard url: Click here!
Communication
Should the DevRel and Marketing teams inform users about this change?