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: UQI dropdown search issue fixed #39330

Merged
merged 1 commit into from
Feb 18, 2025
Merged

Conversation

sneha122
Copy link
Contributor

@sneha122 sneha122 commented Feb 18, 2025

Description

This PR fixes search issues with dropdown UQI control.

Steps to reproduce:

  1. Create zendesk datasource
  2. Create a query
  3. Check commands dropdown
  4. Try searching for "Create ticket"
  5. It should show the relevant options

Fixes #39164
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/13389048508
Commit: 261eb43
Cypress dashboard.
Tags: @tag.All
Spec:


Tue, 18 Feb 2025 12:17:03 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • New Features
    • Enhanced the dropdown control by introducing a search capability. Users can now type keywords to filter options based on their labels, making it easier and faster to locate the desired option while preserving the existing functionality.

Copy link
Contributor

coderabbitai bot commented Feb 18, 2025

Walkthrough

The changes add a new property (isSearchable) within the dropdown configuration to enable search capabilities and update filtering logic. The dropdown’s behavior now supports a search input field that filters options based on their labels. A corresponding test simulates this behavior, ensuring the filtered options are correctly displayed without affecting the existing functionality.

Changes

File(s) Change Summary
app/client/src/components/formControls/DropDownControl.test.tsx Added the isSearchable property to dropDownPropsSingleSelect and introduced a test case (should filter options when searching) to validate search functionality.
app/client/src/components/formControls/DropDownControl.tsx Added optionFilterProp="label" in the dropdown rendering logic to enable filtering options based on their labels.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant D as Dropdown Component
    participant F as Filter Function
    U->>D: Open dropdown
    D->>U: Display options & search input
    U->>D: Enter search term
    D->>F: Filter options by label
    F-->>D: Return filtered options
    D-->>U: Display filtered results
Loading

Possibly related PRs

Suggested labels

Bug, Enhancement, Frontend, ok-to-test, Query & Widgets Pod, Widgets Product

Suggested reviewers

  • AmanAgarwal041

Poem

In the code's domain, a search light shines bright,
Empowering dropdowns to filter just right.
Options now sway to the rhythm of keys,
Verified by tests with elegance and ease.
Cheers to the updates that set our UI alight! 🚀✨


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 88d3599 and 261eb43.

📒 Files selected for processing (2)
  • app/client/src/components/formControls/DropDownControl.test.tsx (2 hunks)
  • app/client/src/components/formControls/DropDownControl.tsx (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-build / client-build
  • GitHub Check: client-prettier / prettier-check
🔇 Additional comments (3)
app/client/src/components/formControls/DropDownControl.test.tsx (2)

557-557: LGTM!

The isSearchable property is correctly added to the test configuration.


592-620: LGTM!

The test case for search functionality is well-structured and covers the basic search behavior. It follows the Arrange-Act-Assert pattern and verifies that:

  1. The dropdown opens correctly
  2. The search input is accessible
  3. The filtering works as expected
app/client/src/components/formControls/DropDownControl.tsx (1)

469-472: LGTM!

The optionFilterProp="label" addition improves the search functionality by allowing users to search based on human-readable labels instead of internal values. The comment clearly explains the rationale with a practical example.


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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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 generate docstrings to generate docstrings for this PR. (Beta)
  • @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.

@github-actions github-actions bot added Bug Something isn't working Medium Issues that frustrate users due to poor UX Needs Triaging Needs attention from maintainers to triage Production Query & Widgets Pod All issues related to Query, JS, Eval, and Widgets Zendesk integration Issues related to zendesk saas integration labels Feb 18, 2025
@sneha122
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

Copy link

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

@sneha122 sneha122 added the ok-to-test Required label for CI label Feb 18, 2025
Copy link

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

@sneha122 sneha122 merged commit 95e8e37 into release Feb 18, 2025
87 checks passed
@sneha122 sneha122 deleted the fix/uqi-dropdown-search-issue branch February 18, 2025 12:35
@AmanAgarwal041
Copy link
Contributor

I tested this out for Google sheet. It worked great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Medium Issues that frustrate users due to poor UX Needs Triaging Needs attention from maintainers to triage ok-to-test Required label for CI Production Query & Widgets Pod All issues related to Query, JS, Eval, and Widgets Zendesk integration Issues related to zendesk saas integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Search fails for commands with spaces between words
3 participants