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

Allow multiple values for string operators in the dashboard #42013

Merged
merged 9 commits into from
May 14, 2024

Conversation

nemanjaglumac
Copy link
Member

@nemanjaglumac nemanjaglumac commented Apr 30, 2024

This PR is a part of the milestone 2 of #41956.

It expands the multi-select filter capabilities for the dashboard filters to the "contains", "does not contain", "starts with" and "ends with" operators. This behavior was previously possible only for "is" and "is not" operators.

Testing

  • Unit tests partial coverage
  • E2E tests (expanded the existing coverage)

Resolves #41956

@nemanjaglumac nemanjaglumac added the no-backport Do not backport this PR to any branch label Apr 30, 2024
@nemanjaglumac nemanjaglumac force-pushed the qc-text-filters-multi-values branch 2 times, most recently from aa1b96f to 22d6d47 Compare May 8, 2024 18:04
@nemanjaglumac nemanjaglumac changed the base branch from master to qp-contains-variadic-params May 8, 2024 18:04
@nemanjaglumac nemanjaglumac marked this pull request as ready for review May 8, 2024 18:04
Copy link

replay-io bot commented May 8, 2024

Status Complete ↗︎
Commit 09b27f9
Results
⚠️ 2 Flaky
2506 Passed

Base automatically changed from qp-contains-variadic-params to master May 10, 2024 17:50
@camsaul camsaul self-requested a review as a code owner May 10, 2024 17:50
@nemanjaglumac nemanjaglumac changed the title Expand the single or multi-selectable string filter choices [WIP] Expand dashboard text filters to support multi-select options May 13, 2024
@nemanjaglumac nemanjaglumac changed the title Expand dashboard text filters to support multi-select options Allow multiple values for string operators in the dashboard May 13, 2024
@nemanjaglumac nemanjaglumac requested a review from a team May 13, 2024 15:07
Comment on lines +34 to +42
cy.createQuestionAndDashboard({
questionDetails: {
query: { "source-table": ORDERS_ID, limit: 5 },
},
cardDetails: {
size_x: 24,
size_y: 8,
},
}).then(({ body: { id, dashboard_id } }) => {
Copy link
Member Author

Choose a reason for hiding this comment

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

Cypress was crashing so badly that I had to ease the load by creating a custom dashboard with the 5 row limit in its only card.

export const DASHBOARD_TEXT_FILTERS = [
{
operator: "Is",
single: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

All operators except Is and Is not have tests for both single: true and single: false.
Any reason for Is and Is not not having tests with single: false?

Copy link
Member Author

Choose a reason for hiding this comment

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

Is and Is not are using a helper that's too rigid and will not work with multiple values.
This is the consequence of trying to abstract too much.

I didn't want to change the underlying logic of that helper since it's very likely that these tests will have to be updated and/or broken down soon.

@kamilmielnik kamilmielnik requested a review from a team May 14, 2024 07:26
Co-authored-by: Kamil Mielnik <[email protected]>
Copy link
Contributor

@kamilmielnik kamilmielnik left a comment

Choose a reason for hiding this comment

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

👍

@kamilmielnik kamilmielnik requested a review from a team May 14, 2024 07:43
@nemanjaglumac nemanjaglumac merged commit 1a44a83 into master May 14, 2024
112 checks passed
@nemanjaglumac nemanjaglumac deleted the qc-text-filters-multi-values branch May 14, 2024 08:46
Copy link

@nemanjaglumac Did you forget to add a milestone to the issue for this PR? When and where should I add a milestone?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-backport Do not backport this PR to any branch .Team/QueryingComponents
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Epic] Selecting multiple values for all text filters
2 participants