Skip to content

revert: change value to label in onItemSelect inside SelectCell of table widget#34872

Merged
rahulbarwal merged 1 commit intoreleasefrom
revert-34743-feat/table-select-widget-display-value
Jul 11, 2024
Merged

revert: change value to label in onItemSelect inside SelectCell of table widget#34872
rahulbarwal merged 1 commit intoreleasefrom
revert-34743-feat/table-select-widget-display-value

Conversation

@jacquesikot
Copy link
Contributor

@jacquesikot jacquesikot commented Jul 11, 2024

Reverts #34743

Automation

/ok-to-test tags="@tag.Table"

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/9888593641
Commit: eec3175
Cypress dashboard.
Tags: @tag.Table
Spec:


Thu, 11 Jul 2024 09:38:04 UTC

Summary by CodeRabbit

  • Refactor
    • Improved test cases for select options in the table widget for better clarity and organization.
    • Updated SelectCell component to use option values instead of labels for item selection.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 11, 2024

Walkthrough

This update focuses on refactoring test cases related to select options within a table widget in the Cypress test suite and updating the SelectCell component to utilize option.value instead of option.label.

Changes

Files Change Summary
.../columnTypes/Select1_spec.ts Reordered test cases, updated descriptions, and altered scenarios involving select options and row operations.
.../component/cellComponents/SelectCell.tsx Modified onItemSelect function to use option.value instead of option.label.

Poem

In tables where selects reside,
Options change, values glide.
Cypress tests, all realigned,
Each case now more refined.
Cells select with value's grace,
Code improvements in their place.
🌟🐇✨


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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits

Files that changed from the base of the PR and between c48aaac and eec3175.

Files selected for processing (2)
  • app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/Select1_spec.ts (4 hunks)
  • app/client/src/widgets/TableWidgetV2/component/cellComponents/SelectCell.tsx (1 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.
Use data-* attributes for selectors; avoid Xpaths and CSS attributes.
Avoid selectors like .btn.submit or button[type=submit].
Perform logins via API with LoginFromAPI.
Only interact with controlled sites/servers.
Ensure tests can run with it.only and are independent.
Use before, 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 in before hooks.
Do not use duplicate filenames.

Additional comments not posted (5)
app/client/src/widgets/TableWidgetV2/component/cellComponents/SelectCell.tsx (1)

152-155: LGTM! The change aligns with the PR objective.

The onSelect function now correctly uses option.value instead of option.label.

app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/Select1_spec.ts (4)

Line range hint 177-201:
Test case description update is accurate.

The test case checks the accessibility of currentRow in the select options.


Line range hint 202-267:
Test case description update is accurate.

The test case checks the functionality of the "same select option in new row" property.


Line range hint 268-332:
Test case description update is accurate.

The test case checks the functionality of the "new row select options" property.


Line range hint 333-358:
Test case description update is accurate.

The test case checks the functionality of server-side filtering.

@jacquesikot jacquesikot added the ok-to-test Required label for CI label Jul 11, 2024
@rahulbarwal rahulbarwal merged commit 34f6e32 into release Jul 11, 2024
@rahulbarwal rahulbarwal deleted the revert-34743-feat/table-select-widget-display-value branch July 11, 2024 09:38
rahulbarwal pushed a commit that referenced this pull request Jul 11, 2024
…ble widget (#34872)

Reverts #34743

## Automation

/ok-to-test tags="@tag.Table"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9888593641>
> Commit: eec3175
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9888593641&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Table`
> Spec:
> <hr>Thu, 11 Jul 2024 09:38:04 UTC
<!-- end of auto-generated comment: Cypress test results  -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Improved test cases for select options in the table widget for better
clarity and organization.
- Updated `SelectCell` component to use option values instead of labels
for item selection.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Required label for CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants