-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
feat: change value to label in onItemSelect inside SelectCell of table widget #34743
Conversation
/build-deploy-preview skip-tests=true |
WalkthroughThe recent changes modify the Changes
Sequence Diagram(s)The changes are straightforward and don't involve significant control flow modifications; hence no sequence diagrams are necessary. Assessment against linked issues
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/9805043358. |
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 UI
Review profile: CHILL
Files selected for processing (1)
- app/client/src/widgets/TableWidgetV2/component/cellComponents/SelectCell.tsx (1 hunks)
Files skipped from review due to trivial changes (1)
- app/client/src/widgets/TableWidgetV2/component/cellComponents/SelectCell.tsx
Deploy-Preview-URL: https://ce-34743.dp.appsmith.com |
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.
Unit tests?
@rahulbarwal I was thinking cypress tests? But i can try with a unit test first? |
Whatever you think will be best is fine. Any kind of coverage is good. |
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 UI
Review profile: CHILL
Files selected for processing (1)
- app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/Select1_spec.ts (4 hunks)
Additional context used
Path-based instructions (1)
app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/Select1_spec.ts (1)
Pattern
app/client/cypress/**/**.*
: Follow best practices for Cypress code and e2e automation.
Avoid using cy.wait in code.
Avoid using cy.pause in code.
Use variables for locators, not strings.
Usedata-*
attributes for selectors; avoid Xpaths and CSS attributes.
Avoid selectors like.btn.submit
orbutton[type=submit]
.
Perform logins via API withLoginFromAPI
.
Only interact with controlled sites/servers.
Ensure tests can run withit.only
and are independent.
Usebefore
,beforeEach
,after
,afterEach
correctly; clean state before tests.
Check new specs for flakiness by running them 10 times on CI.
Use multiple assertions; don't treat Cypress as unit tests.
Use constants for strings.
Include datasource operations inbefore
hooks.
Additional comments not posted (1)
app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/Select1_spec.ts (1)
177-207
: LGTM! The test case correctly verifies the use of label as value in select cell.The new test case ensures that the label is used as the value in the select cell, aligning with the PR objectives and fixing the described issue.
Description
Issue
In the table widget, the select column currently displays the value from the dropdown when a user makes a selection, rather than the label. This behaviour is inconsistent with the standalone select widget, which correctly renders the label upon selection.
Fix
This PR addresses the inconsistency by modifying the table widget's select column to display the label of the selected item, ensuring alignment with the behaviour of the standalone select widget.
Fixes #26188
Automation
/ok-to-test tags="@tag.Table, @tag.Binding, @tag.Widget, @tag.Sanity"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/9843945454
Commit: 330d0d3
Cypress dashboard.
Tags:
@tag.Table, @tag.Binding, @tag.Widget, @tag.Sanity
Spec:
Mon, 08 Jul 2024 18:21:02 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
Bug Fixes
SelectCell
component to use theoption.label
instead ofoption.value
for item selection.Tests