-
Notifications
You must be signed in to change notification settings - Fork 4.1k
fix: Avoid having mismatched data in Plugin Action form #40264
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
Conversation
WalkthroughA guard clause was introduced in the Changes
Sequence Diagram(s)sequenceDiagram
participant UI as UQIEditorForm
participant Hook as useFormData
participant Ctx as usePluginActionContext
UI->>Hook: Call useFormData()
Hook->>Ctx: Get current action
Hook->>Hook: Select form data for action.id
alt Form data missing or mismatched
Hook->>UI: Return { data: null, evaluationState: {} }
UI->>UI: Return null (do not render)
else Form data valid
Hook->>UI: Return { data, evaluationState }
UI->>UI: Render form
end
Assessment against linked issues
Suggested labels
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (2)
🧰 Additional context used🧬 Code Graph Analysis (1)app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/hooks/useFormData.ts (2)
⏰ Context from checks skipped due to timeout of 90000ms (6)
🔇 Additional comments (7)
✨ Finishing Touches
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. 🪧 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
Documentation and Community
|
Description
It was seen that when switching between actions, the form data and the action data is not in sync through all the render cycles. This causes the old form data to be rendered using the new (switched to) editor config.
By verifying this and handling the render, we are ensuring that during switches, the form data is accurate while rendering
Fixes #40183
Automation
/ok-to-test tags="@tag.Datasource"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/14485144512
Commit: 195a03e
Cypress dashboard.
Tags:
@tag.Datasource
Spec:
Wed, 16 Apr 2025 05:56:10 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit