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

Add additional conditional support to KeywordList filter #2447

Merged

Conversation

laurakwhit
Copy link
Contributor

@laurakwhit laurakwhit commented Nov 27, 2024

Description & motivation 💭

Adds support for Equal to, Not equal to, Is null and Is not null to KeywordList attributes in the filter search.

Screenshots (if applicable) 📸

Before After
Screenshot 2024-11-27 at 2 21 37 PM Screenshot 2024-11-27 at 2 18 57 PM

Design Considerations 🎨

Testing 🧪

How was this tested 👻

  • Manual testing
  • E2E tests added
  • Unit tests added

Steps for others to test: 🚶🏽‍♂️🚶🏽‍♀️

  • Add a KeywordList custom search attribute (e.g. temporal operator search-attribute create --namespace default --name CustomKeywordListField --type KeywordList)
  • Run a workflow with the custom search attribute set (e.g. this one).

  • Go to the Workflows list view
    • Select Filter > CustomKeywordListField > select In > enter multiple values
      • Verify searching works as expected
    • Select the filter that was created
      • Verify editing the filter works as expected (including changing the conditional)
    • Toggle View Search Input
      • Verify filters show up as expected
    • Refresh the page
      • Verify filters still show up and work as expected

Checklists

Draft Checklist

Merge Checklist

Issue(s) closed

DT-2635

Docs

Any docs updates needed?

Copy link

vercel bot commented Nov 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
holocene ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 27, 2024 9:24pm

@Alex-Tideman
Copy link
Contributor

What are the uses of the conditionals that aren't "In"? Like is "Equal to" checking the exact list? "Dog, Cat, Bird" Equal to "Dog, Cat, Bird"?

$: chips = formatListFilterValue(_value);
$: options = [
{ value: 'in', label: 'In' },
{ value: '=', label: translate('common.equal-to') },
Copy link
Contributor Author

Choose a reason for hiding this comment

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

What are the uses of the conditionals that aren't "In"? Like is "Equal to" checking the exact list? "Dog, Cat, Bird" Equal to "Dog, Cat, Bird"?

@Alex-Tideman say a workflow has a CustomKeywordListField with the values keywordA and keywordB. Checking for CustomKeywordListField = keywordA or CustomKeywordListField = keywordB would return the workflow, checking forCustomKeywordListField = keywordC would not. Checking for CustomKeywordListField IN ("keywordA", "keywordB", "keywordC") would also return the workflow even though keywordC is not a defined value for the workflow.

Not sure on usefulness of having both options (CustomKeywordListField = keywordA and CustomKeywordListField In ("keywordA") are essentially the same), but I figure if it's possible to have in the search input we should support it in the filter search.

@laurakwhit laurakwhit merged commit 2b399a5 into main Dec 3, 2024
14 checks passed
@laurakwhit laurakwhit deleted the add-additional-conditional-support-to-keywordlist-filter branch December 3, 2024 16:48
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.

2 participants