Skip to content

Conversation

jayne-s
Copy link
Contributor

@jayne-s jayne-s commented Jun 20, 2025

Adding Autocomplete feature to Query Input. Query bar provides helpful suggestions as you type and guides in building queries without needing to memorize specific attribute names. Leads to fewer errors and makes the process of filtering workflows quicker and efficient. Performed local testing using development environment, ensuring styling of component was maintained.

@jayne-s jayne-s requested a review from timl3136 June 24, 2025 20:57
Copy link
Member

@adhityamamallan adhityamamallan left a comment

Choose a reason for hiding this comment

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

Hey, I had some comments regarding the code; but could you also share some screenshots of this new input?

@adhityamamallan adhityamamallan requested a review from Copilot June 25, 2025 10:43
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the query input component by adding autocomplete suggestions to help users build queries faster and with fewer errors.

  • Integrates react-autosuggest into the query input component.
  • Adds a new autocompletes module with preset suggestions for attributes, operators, and statuses.
  • Updates tests and package dependencies to support the new autocomplete functionality.

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

File Description
src/views/shared/workflows-header/workflows-query-input/workflows-query-input.tsx Integrated react-autosuggest, added suggestion fetching/selection, and updated input rendering logic.
src/views/shared/workflows-header/workflows-query-input/autocompletes.tsx Introduced a new module that defines autocomplete suggestions.
src/views/shared/workflows-header/workflows-query-input/tests/workflows-query-input.test.tsx Adjusted tests to account for the new behavior (with some tests skipped due to jsdom limitations).
package.json Added react-autosuggest dependency and its TypeScript definitions.
Comments suppressed due to low confidence (2)

src/views/shared/workflows-header/workflows-query-input/workflows-query-input.tsx:294

  • The onSubmit function is referenced in the form submission handler but is not defined or passed as a prop. Consider either adding onSubmit to the component's props or using an existing prop like refetchQuery if that was the intended behavior.
        onSubmit();

src/views/shared/workflows-header/workflows-query-input/workflows-query-input.tsx:250

  • [nitpick] The conversion and deletion of 'max', 'min', and 'step' properties is performed twice in renderInputComponent. Consolidating this logic could improve maintainability.
    });

@jayne-s jayne-s requested a review from adhityamamallan June 25, 2025 23:31
@adhityamamallan adhityamamallan merged commit d373034 into cadence-workflow:master Jun 30, 2025
1 check passed
adhityamamallan added a commit to adhityamamallan/cadence-web that referenced this pull request Jun 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants