Skip to content
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: remove Select key value selects, fix default #36158

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

znamenskii-ilia
Copy link
Contributor

@znamenskii-ilia znamenskii-ilia commented Sep 6, 2024

Description

https://theappsmith.slack.com/archives/C025SE88KNE/p1725434811592439

Fixes #Issue Number
or
Fixes Issue URL

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.All"

🔍 Cypress test results

Tip

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


Mon, 09 Sep 2024 12:43:13 UTC

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Introduced enhanced validation for options in the WDSComboBoxWidget, ensuring all entries are valid objects with label and value properties.
    • Updated WDSSelectWidget to include validation for the options array, ensuring only valid items are processed.
  • Bug Fixes

    • Removed outdated validation methods and configurations in WDSSelectWidget for a more streamlined approach.
  • Refactor

    • Simplified the configuration and validation logic within the WDSSelectWidget, improving maintainability and clarity.

Copy link
Contributor

coderabbitai bot commented Sep 6, 2024

Walkthrough

The changes enhance the validation logic within the WDSComboBoxWidget and WDSSelectWidget. The optionsCustomValidation function now checks that the options array consists of valid objects with both label and value properties. Several validation functions and property configurations related to WDSSelectWidget have been removed, streamlining its configuration. Additionally, the logic for processing options has been updated to ensure that only valid items are returned.

Changes

Files Change Summary
app/client/src/widgets/wds/WDSComboBoxWidget/config/.../optionsCustomValidation.ts Introduced validation to ensure options array contains objects with label and value properties. Updated function signature to reflect changes.
app/client/src/widgets/wds/WDSSelectWidget/config/.../contentConfig.ts Removed multiple validation functions and property configurations for optionLabel and optionValue, indicating a shift towards a simplified approach.
app/client/src/widgets/wds/WDSSelectWidget/widget/.../index.tsx Modified the logic for processing the options array to include validation checks, ensuring only valid items with defined label and id are returned.

Possibly related PRs

Poem

In the land of code where widgets play,
Validation now leads the way.
Options checked with care and grace,
Ensuring each has its rightful place.
Simplified paths, less cluttered views,
A cleaner codebase, the developers' muse! 🎉

Tip

New features

Walkthrough comment now includes:

  • Possibly related PRs: A list of potentially related PRs to help you recall past context.
  • Suggested labels: CodeRabbit can now suggest labels by learning from your past PRs. You can also provide custom labeling instructions in the UI or configuration file.

Notes:

  • Please share any feedback in the discussion post on our Discord.
  • Possibly related PRs, automatic label suggestions based on past PRs, learnings, and possibly related issues require data opt-in (enabled by default).

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 using 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.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

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.

@znamenskii-ilia znamenskii-ilia changed the title remove Select key value selects, fix default fix: remove Select key value selects, fix default Sep 6, 2024
@znamenskii-ilia
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

@github-actions github-actions bot added the Bug Something isn't working label Sep 6, 2024
Copy link

github-actions bot commented Sep 6, 2024

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/10737042545.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 36158.
recreate: .

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: 4

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 08ec688 and ad0b1ba.

Files selected for processing (5)
  • app/client/src/widgets/wds/WDSComboBoxWidget/config/propertyPaneConfig/validations/optionsCustomValidation.ts (1 hunks)
  • app/client/src/widgets/wds/WDSComboBoxWidget/widget/index.tsx (1 hunks)
  • app/client/src/widgets/wds/WDSSelectWidget/config/propertyPaneConfig/contentConfig.ts (2 hunks)
  • app/client/src/widgets/wds/WDSSelectWidget/config/propertyPaneConfig/validations/optionsCustomValidation.ts (2 hunks)
  • app/client/src/widgets/wds/WDSSelectWidget/widget/index.tsx (1 hunks)
Additional comments not posted (1)
app/client/src/widgets/wds/WDSComboBoxWidget/widget/index.tsx (1)

155-159: Enhance robustness with added validation in optionsToItems.

The addition of a validation step in the optionsToItems method ensures that each item has a defined label and id, enhancing the robustness of the widget. This is a crucial improvement for maintaining data integrity. However, returning an empty array when any item fails the validation could have significant impacts on other parts of the application that depend on this method's output.

Consider adding logging to help trace issues when invalid items are encountered, which would aid in debugging and maintaining the application.

Comment on lines +80 to +94
const isValidKeys = options.every((option) => {
return (
_.isPlainObject(option) &&
_.has(option, "label") &&
_.has(option, "value")
);
});

if (!isValidKeys) {
return createErrorValidationResponse(options, {
name: "ValidationError",
message:
'This value does not evaluate to type Array<{ "label": "string", "value": "string" | number }>',
});
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enhanced Validation Logic in optionsCustomValidation

The addition of the isValidKeys check at lines 80-86 ensures that each option in the array is a valid object with the required properties (label and value). This is a crucial step for maintaining data integrity.

However, there is a potential improvement to consider:

  • Refactor Opportunity: The validation logic is duplicated in the function. It would be more efficient to extract this into a separate utility function that can be reused, reducing code duplication and improving maintainability.
+ function validateOption(option) {
+   return _.isPlainObject(option) && _.has(option, "label") && _.has(option, "value");
+ }

- const isValidKeys = options.every((option) => {
-   return (
-     _.isPlainObject(option) &&
-     _.has(option, "label") &&
-     _.has(option, "value")
-   );
- });
+ const isValidKeys = options.every(validateOption);
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const isValidKeys = options.every((option) => {
return (
_.isPlainObject(option) &&
_.has(option, "label") &&
_.has(option, "value")
);
});
if (!isValidKeys) {
return createErrorValidationResponse(options, {
name: "ValidationError",
message:
'This value does not evaluate to type Array<{ "label": "string", "value": "string" | number }>',
});
}
function validateOption(option) {
return _.isPlainObject(option) && _.has(option, "label") && _.has(option, "value");
}
const isValidKeys = options.every(validateOption);
if (!isValidKeys) {
return createErrorValidationResponse(options, {
name: "ValidationError",
message:
'This value does not evaluate to type Array<{ "label": "string", "value": "string" | number }>',
});
}

Comment on lines +42 to +56
const isValidKeys = options.every((option) => {
return (
_.isPlainObject(option) &&
_.has(option, "label") &&
_.has(option, "value")
);
});

if (!isValidKeys) {
return createErrorValidationResponse(options, {
name: "ValidationError",
message:
'This value does not evaluate to type Array<{ "label": "string", "value": "string" | number }>',
});
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enhanced Validation Logic in optionsCustomValidation

The addition of the isValidKeys check at lines 42-48 ensures that each option in the array is a valid object with the required properties (label and value). This is a crucial step for maintaining data integrity.

However, there is a potential improvement to consider:

  • Refactor Opportunity: The validation logic is duplicated in the function. It would be more efficient to extract this into a separate utility function that can be reused, reducing code duplication and improving maintainability.
+ function validateOption(option) {
+   return _.isPlainObject(option) && _.has(option, "label") && _.has(option, "value");
+ }

- const isValidKeys = options.every((option) => {
-   return (
-     _.isPlainObject(option) &&
-     _.has(option, "label") &&
-     _.has(option, "value")
-   );
- });
+ const isValidKeys = options.every(validateOption);
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const isValidKeys = options.every((option) => {
return (
_.isPlainObject(option) &&
_.has(option, "label") &&
_.has(option, "value")
);
});
if (!isValidKeys) {
return createErrorValidationResponse(options, {
name: "ValidationError",
message:
'This value does not evaluate to type Array<{ "label": "string", "value": "string" | number }>',
});
}
function validateOption(option) {
return _.isPlainObject(option) && _.has(option, "label") && _.has(option, "value");
}
const isValidKeys = options.every(validateOption);
if (!isValidKeys) {
return createErrorValidationResponse(options, {
name: "ValidationError",
message:
'This value does not evaluate to type Array<{ "label": "string", "value": "string" | number }>',
});
}

Comment on lines +140 to +149
const items = options.map((option) => ({
label: option[this.props.optionLabel || "label"] as string,
id: option[this.props.optionValue || "value"] as string,
}));

const isValidItems = items.every(
(item) => item.label !== undefined && item.id !== undefined,
);

return isValidItems ? items : [];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improved Validation in optionsToSelectItems Method

The changes at lines 140-149 introduce a validation step that ensures each item in the items array has both a defined label and id. This is a crucial step for maintaining data integrity and ensuring that only valid items are returned.

However, there is a potential improvement to consider:

  • Error Handling: Currently, if the validation fails, an empty array is returned. It might be beneficial to also log an error or provide feedback to the user when this happens, to aid in debugging and user experience.
+ import { logger } from "utilities/logger";

  const isValidItems = items.every(
    (item) => item.label !== undefined && item.id !== undefined,
  );

- return isValidItems ? items : [];
+ if (isValidItems) {
+   return items;
+ } else {
+   logger.error("Invalid items detected", items);
+   return [];
+ }

Committable suggestion was skipped due to low confidence.

Comment on lines +1 to +10
import { ValidationTypes } from "constants/WidgetValidation";
import { EvaluationSubstitutionType } from "entities/DataTree/dataTreeFactory";
import { EVAL_VALUE_PATH } from "../../../../../utils/DynamicBindingUtils";
import type { PropertyUpdates } from "../../../../../WidgetProvider/constants";
import type { WidgetProps } from "../../../../BaseWidget";
import { AutocompleteDataType } from "utils/autocomplete/AutocompleteDataType";
import type { WDSSelectWidgetProps } from "../../widget/types";
import {
defaultOptionValidation,
optionsCustomValidation,
} from "./validations";
import type { WidgetProps } from "../../../../BaseWidget";
import type { PropertyUpdates } from "../../../../../WidgetProvider/constants";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Significant simplification in configuration.

The removal of several validation functions and property configurations from the WDSSelectWidget represents a significant simplification. This could make the widget easier to configure and maintain but might also reduce its flexibility and robustness in handling diverse data scenarios.

It's important to document the rationale behind these changes to ensure that the simplification aligns with the overall design goals and does not inadvertently introduce limitations or bugs.

Consider adding comments or documentation within the code to explain why these changes were made, especially if they relate to discussions or decisions that are not visible within the codebase itself.

Also applies to: 9-10

Copy link

github-actions bot commented Sep 6, 2024

Deploy-Preview-URL: https://ce-36158.dp.appsmith.com

@appsmithorg appsmithorg deleted a comment from github-actions bot Sep 6, 2024
@znamenskii-ilia znamenskii-ilia force-pushed the fix/select-default-value-3 branch from ad0b1ba to b162d6e Compare September 6, 2024 11:21
@znamenskii-ilia
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

Copy link

github-actions bot commented Sep 6, 2024

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/10737485628.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 36158.
recreate: .

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

Outside diff range, codebase verification and nitpick comments (2)
app/client/src/widgets/wds/WDSSelectWidget/config/propertyPaneConfig/validations/defaultOptionValidation.ts (1)

51-51: Ensure robustness by validating option objects.

The assumption that all option objects have a "value" property is generally valid for UI components, but not universally across all usages in the codebase. To prevent potential runtime errors, consider adding a validation check within the defaultOptionValidation function to ensure that each option object indeed contains a "value" property before accessing it.

  • Consider adding a check like if (option && option.hasOwnProperty("value")) before returning option["value"].

This will help maintain robustness and prevent errors if unexpected options objects are passed to the function.

Analysis chain

Consider verifying the consistency of option objects.

The modification to directly access the "value" property simplifies the code but assumes that all option objects will consistently have this property. This assumption might not hold true in all cases, especially if the structure of options is modified elsewhere in the application.

It's important to ensure that this assumption is valid across all usages of the options object to prevent runtime errors. Consider adding a check to ensure that each option object indeed contains a "value" property before accessing it, or verify that all producers of the options array conform to this structure.


Let's correct the file type and search for options definitions in JavaScript/TypeScript files to verify that each option object includes a "value" property.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that all `option` objects in the application have a "value" property.

# Test: Search for all occurrences where `options` are defined or modified. Expect: Each `option` object should have a "value" property.
rg --type python -A 5 $'options ='

Length of output: 66


Script:

#!/bin/bash
# Description: Verify that all `option` objects in the application have a "value" property.

# Test: Search for all occurrences where `options` are defined or modified in JavaScript/TypeScript files.
rg --type js --type ts -A 5 'options ='

Length of output: 87357

app/client/src/widgets/wds/WDSSelectWidget/config/propertyPaneConfig/contentConfig.ts (1)

1-10: Document the rationale behind significant configuration changes.

The removal of several validation functions and property configurations represents a significant simplification. This could make the widget easier to configure and maintain but might also reduce its flexibility and robustness in handling diverse data scenarios.

It's important to document the rationale behind these changes to ensure that the simplification aligns with the overall design goals and does not inadvertently introduce limitations or bugs.

Consider adding comments or documentation within the code to explain why these changes were made, especially if they relate to discussions or decisions that are not visible within the codebase itself.

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between ad0b1ba and b162d6e.

Files selected for processing (6)
  • app/client/src/widgets/wds/WDSComboBoxWidget/config/propertyPaneConfig/validations/optionsCustomValidation.ts (1 hunks)
  • app/client/src/widgets/wds/WDSComboBoxWidget/widget/index.tsx (1 hunks)
  • app/client/src/widgets/wds/WDSSelectWidget/config/propertyPaneConfig/contentConfig.ts (2 hunks)
  • app/client/src/widgets/wds/WDSSelectWidget/config/propertyPaneConfig/validations/defaultOptionValidation.ts (1 hunks)
  • app/client/src/widgets/wds/WDSSelectWidget/config/propertyPaneConfig/validations/optionsCustomValidation.ts (2 hunks)
  • app/client/src/widgets/wds/WDSSelectWidget/widget/index.tsx (1 hunks)
Files skipped from review as they are similar to previous changes (4)
  • app/client/src/widgets/wds/WDSComboBoxWidget/config/propertyPaneConfig/validations/optionsCustomValidation.ts
  • app/client/src/widgets/wds/WDSComboBoxWidget/widget/index.tsx
  • app/client/src/widgets/wds/WDSSelectWidget/config/propertyPaneConfig/validations/optionsCustomValidation.ts
  • app/client/src/widgets/wds/WDSSelectWidget/widget/index.tsx

Copy link

github-actions bot commented Sep 6, 2024

Deploy-Preview-URL: https://ce-36158.dp.appsmith.com

@znamenskii-ilia znamenskii-ilia added Anvil team issues related to the new layout system anvil ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Sep 6, 2024
@znamenskii-ilia znamenskii-ilia force-pushed the fix/select-default-value-3 branch from b162d6e to 3afce8d Compare September 9, 2024 11:31
@znamenskii-ilia znamenskii-ilia added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Sep 9, 2024
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.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between b162d6e and 3afce8d.

Files selected for processing (6)
  • app/client/src/widgets/wds/WDSComboBoxWidget/config/propertyPaneConfig/validations/optionsCustomValidation.ts (1 hunks)
  • app/client/src/widgets/wds/WDSComboBoxWidget/widget/index.tsx (1 hunks)
  • app/client/src/widgets/wds/WDSSelectWidget/config/propertyPaneConfig/contentConfig.ts (2 hunks)
  • app/client/src/widgets/wds/WDSSelectWidget/config/propertyPaneConfig/validations/defaultOptionValidation.ts (1 hunks)
  • app/client/src/widgets/wds/WDSSelectWidget/config/propertyPaneConfig/validations/optionsCustomValidation.ts (2 hunks)
  • app/client/src/widgets/wds/WDSSelectWidget/widget/index.tsx (1 hunks)
Files skipped from review as they are similar to previous changes (5)
  • app/client/src/widgets/wds/WDSComboBoxWidget/config/propertyPaneConfig/validations/optionsCustomValidation.ts
  • app/client/src/widgets/wds/WDSComboBoxWidget/widget/index.tsx
  • app/client/src/widgets/wds/WDSSelectWidget/config/propertyPaneConfig/validations/defaultOptionValidation.ts
  • app/client/src/widgets/wds/WDSSelectWidget/config/propertyPaneConfig/validations/optionsCustomValidation.ts
  • app/client/src/widgets/wds/WDSSelectWidget/widget/index.tsx
Additional comments not posted (6)
app/client/src/widgets/wds/WDSSelectWidget/config/propertyPaneConfig/contentConfig.ts (6)

1-10: Simplification of Configuration:

The removal of several validation functions and property configurations from the WDSSelectWidget represents a significant simplification. This could make the widget easier to configure and maintain but might also reduce its flexibility and robustness in handling diverse data scenarios.

It's important to document the rationale behind these changes to ensure that the simplification aligns with the overall design goals and does not inadvertently introduce limitations or bugs.

Consider adding comments or documentation within the code to explain why these changes were made, especially if they relate to discussions or decisions that are not visible within the codebase itself.


10-10: Ensure Comprehensive Documentation:

Given the significant changes in the widget's configuration, it is crucial to ensure that all modifications are well-documented. This includes updating any related documentation or help texts within the application to reflect the new configuration options and behaviors.

Documentation is key to helping both current and future developers understand the context and reasoning behind these changes, especially when simplifying complex features.


10-10: Review Dependencies and Validation Logic:

The removal of specific property configurations such as optionLabel and optionValue and their associated validations suggests a shift towards a more streamlined approach. However, this raises concerns about the robustness of the new validation logic, particularly optionsCustomValidation.

Ensure that the new validation logic comprehensively covers all scenarios previously handled by the removed validations. It might be beneficial to include unit tests or examples within the code to demonstrate the effectiveness and coverage of the new validations.


10-10: Potential Impact on Widget Behavior:

The changes in validation logic and property configurations could potentially alter how the widget behaves in certain scenarios, such as handling edge cases or specific data formats. It is important to conduct thorough testing, particularly integration and end-to-end tests, to ensure that the widget continues to function as expected in all supported use cases.

Consider adding automated tests that specifically target the new configurations and validations to ensure they perform correctly across a variety of scenarios.


10-10: Address Test Failures Before Merging:

The placeholder for Cypress test results indicates that some tests have failed. It is crucial to address these failures and ensure that all tests pass before proceeding with merging this PR. Failing tests can be indicative of issues that might affect the stability or functionality of the application.

Review the failed tests to understand their cause and make necessary adjustments to the code or tests to resolve these issues. Ensuring a green test suite is essential for maintaining the quality and reliability of the application.


10-10: Consultation with Stakeholders:

Given the significant changes made to the widget configuration, it is advisable to consult with key stakeholders, including the DevRel and Marketing teams, to determine if these changes should be communicated to the users. Significant changes in functionality or configuration can impact user experience and may require adjustments in user documentation or training materials.

Engage with the relevant teams to assess the need for communication and ensure that any necessary information is accurately and timely conveyed to the users.

@znamenskii-ilia znamenskii-ilia dismissed sagar-qa007’s stale review September 9, 2024 12:48

The reason was explained in Slack DM

@znamenskii-ilia znamenskii-ilia merged commit aac30b6 into release Sep 9, 2024
88 of 90 checks passed
@znamenskii-ilia znamenskii-ilia deleted the fix/select-default-value-3 branch September 9, 2024 12:48
Shivam-z pushed a commit to Shivam-z/appsmith that referenced this pull request Sep 26, 2024
## Description
https://theappsmith.slack.com/archives/C025SE88KNE/p1725434811592439


Fixes #`Issue Number`  
_or_  
Fixes `Issue URL`
> [!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.All"

### 🔍 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/10772310432>
> Commit: 3afce8d
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10772310432&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Mon, 09 Sep 2024 12:43:13 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


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

## Summary by CodeRabbit

- **New Features**
- Introduced enhanced validation for options in the WDSComboBoxWidget,
ensuring all entries are valid objects with `label` and `value`
properties.
- Updated WDSSelectWidget to include validation for the options array,
ensuring only valid items are processed.

- **Bug Fixes**
- Removed outdated validation methods and configurations in
WDSSelectWidget for a more streamlined approach.

- **Refactor**
- Simplified the configuration and validation logic within the
WDSSelectWidget, improving maintainability and clarity.
<!-- 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
Anvil team issues related to the new layout system anvil Bug Something isn't working ok-to-test Required label for CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants