-
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
chore: fix prop name in options control #37130
Conversation
WalkthroughThe Changes
Poem
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
|
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
🧹 Outside diff range and nitpick comments (1)
app/client/src/components/propertyControls/OptionControl.tsx (1)
Line range hint 31-32
: TODO comment needs attention
There's a TODO comment about fixing the eslint-disable directive. This should be addressed to maintain code quality.
Would you like me to help create a GitHub issue to track the TODO and propose a fix for the eslint configuration?
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (1)
- app/client/src/components/propertyControls/OptionControl.tsx (1 hunks)
🔇 Additional comments (1)
app/client/src/components/propertyControls/OptionControl.tsx (1)
23-23
: LGTM! The fix correctly uses the dynamic property name.
The change from hardcoded "options" to this.props.propertyName
resolves the property name mismatch issue.
Let's verify that propertyName is always provided:
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
🧹 Outside diff range and nitpick comments (1)
app/client/src/components/propertyControls/OptionControl.tsx (1)
Line range hint 28-29
: Consider addressing the TODO comment.
There's a TODO comment about fixing the eslint-disable. This technical debt should be addressed in a future PR.
Would you like me to help create a GitHub issue to track this technical debt?
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (1)
- app/client/src/components/propertyControls/OptionControl.tsx (1 hunks)
🔇 Additional comments (1)
app/client/src/components/propertyControls/OptionControl.tsx (1)
23-23
: LGTM! This fixes the property name inconsistency.
The change correctly uses the dynamic property name from props instead of the hardcoded "options" string.
/ok-to-test tags="@tag.Widget" The options control was using `options` as the property name for the options array even when thee prop name was not `options`. This was causing issues when the property name was different. <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/11590623056> > Commit: 1e16edb > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11590623056&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Widget` > Spec: > <hr>Wed, 30 Oct 2024 11:11:49 UTC <!-- end of auto-generated comment: Cypress test results --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced the `OptionControl` component to support dynamic property updates based on component props. - **Bug Fixes** - Improved the handling of property updates, allowing for more flexible and accurate updates. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
/ok-to-test tags="@tag.Widget"
The options control was using
options
as the property name for the options array even when thee prop name was notoptions
. This was causing issues when the property name was different.Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/11590623056
Commit: 1e16edb
Cypress dashboard.
Tags:
@tag.Widget
Spec:
Wed, 30 Oct 2024 11:11:49 UTC
Summary by CodeRabbit
New Features
OptionControl
component to support dynamic property updates based on component props.Bug Fixes