-
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: Change the 'eventName' of each template of Custom Widget #37396
base: release
Are you sure you want to change the base?
fix: Change the 'eventName' of each template of Custom Widget #37396
Conversation
WalkthroughThe changes in this pull request involve modifying the JavaScript event handling in three template files: Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (3)
🔇 Additional comments (3)app/client/src/pages/Editor/CustomWidgetBuilder/Editor/Header/CodeTemplates/Templates/react.ts (1)
The change from "onReset" to "onResetClick" aligns with the requirements. Let's verify the consistency of this change across other template files: ✅ Verification successfulEvent name update verified across all template files The change is consistently implemented across all template files (React, Vue, and Vanilla JS), with no remaining instances of the old "onReset" event name. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Check if the event name is consistently updated across all template files
# Expected: All templates should use "onResetClick" instead of "onReset"
echo "Checking for any remaining instances of the old event name..."
rg "onReset[^C]" "app/client/src/pages/Editor/CustomWidgetBuilder/Editor/Header/CodeTemplates/Templates/"
echo "Verifying the new event name is present in all template files..."
rg "onResetClick" "app/client/src/pages/Editor/CustomWidgetBuilder/Editor/Header/CodeTemplates/Templates/"
Length of output: 894 app/client/src/pages/Editor/CustomWidgetBuilder/Editor/Header/CodeTemplates/Templates/vue.ts (1)
The change from "onReset" to "onResetClick" aligns with the requirements and fixes the reported issue #37395. ✅ Verification successfulEvent name change is consistent across all template files All template files (react.ts, vue.ts, and vanillaJs.ts) consistently use "onResetClick" as the event name, confirming the correct implementation of the change. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Verify consistent event name usage across all template files
rg -l "onReset\"|onResetClick\"" app/client/src/pages/Editor/CustomWidgetBuilder/Editor/Header/CodeTemplates/Templates/
Length of output: 406 Script: #!/bin/bash
# Check the actual event name usage in each template file
rg "onReset\"|onResetClick\"" app/client/src/pages/Editor/CustomWidgetBuilder/Editor/Header/CodeTemplates/Templates/
Length of output: 528 app/client/src/pages/Editor/CustomWidgetBuilder/Editor/Header/CodeTemplates/Templates/vanillaJs.ts (1)
The event name change from "onReset" to "onResetClick" aligns with the PR objectives and maintains consistency across templates. Let's verify the consistency of this change across other template files: ✅ Verification successfulEvent name change verified across all template files The search results confirm that "onResetClick" is consistently used across all template files (react.ts, vue.ts, and vanillaJs.ts), and there are no remaining instances of the old "onReset" event name. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Verify event name consistency across template files
# Expected: All templates should use "onResetClick"
# Search for any remaining instances of the old event name
rg '"onReset"' app/client/src/pages/Editor/CustomWidgetBuilder/Editor/Header/CodeTemplates/Templates/
# Verify the new event name is used consistently
rg '"onResetClick"' app/client/src/pages/Editor/CustomWidgetBuilder/Editor/Header/CodeTemplates/Templates/
Length of output: 624 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
Documentation and Community
|
This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected. |
Description
The 'eventName' of each template is incorrect, so I have renamed it.
appsmith.triggerEvent("onReset");
toappsmith.triggerEvent("onResetClick");
Fixes #37395
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.Widget"
🔍 Cypress test results
Caution
If you modify the content in this section, you are likely to disrupt the CI result for your PR.
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
New Features
Bug Fixes
"onReset"
to"onResetClick"
to ensure proper communication with the appsmith framework during reset actions.