Skip to content

[Controls] Bulk select for options list control #221010

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

cqliu1
Copy link
Contributor

@cqliu1 cqliu1 commented May 20, 2025

Summary

Closes #181694.

This adds Select all and Deselect all buttons to the options list popover to allow users to make bulk selections. Bulk selections will only be available when there are 100 or fewer available options.

Screenshot 2025-05-23 at 3 19 56 PM

Disabled bulk select

Bulk selection is disabled when there are no available options.
Screenshot 2025-05-23 at 2 38 05 PM

Bulk selection is also disabled when total cardinality is over 100.

Screenshot 2025-05-23 at 2 04 43 PM

When showOnlySelected is enabled

Even if the total cardinality is greater than the bulk selection limit, bulk selection is enabled when showOnlySelected is enabled, and the number of selection options is fewer than the bulk selection limit (e.g. fewer than 100 selections).

Screenshot 2025-05-23 at 3 17 17 PM

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines

Identify risks

Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.

@cqliu1 cqliu1 force-pushed the controls/options-list/select-deselect-all branch from d036377 to 812c7ee Compare May 21, 2025 17:30
@kibanamachine
Copy link
Contributor

Cloud deployments require a Github label, please add ci:cloud-deploy or ci:cloud-redeploy and trigger the job through the checkbox again.

Fix select and deselect logic

Fix types

Fetch more options on select/deselect all

Add loadMoreOptions callback

Add const for bulk selection limit

Add i18n

Remove unused import
@cqliu1 cqliu1 force-pushed the controls/options-list/select-deselect-all branch from d0646ff to 263c283 Compare May 23, 2025 19:01
@cqliu1 cqliu1 changed the title [Controls] Select/deselect all for options list control [Controls] Bulk select all for options list control May 23, 2025
@cqliu1 cqliu1 changed the title [Controls] Bulk select all for options list control [Controls] Bulk select for options list control May 23, 2025
@cqliu1 cqliu1 marked this pull request as ready for review May 23, 2025 22:19
@cqliu1 cqliu1 requested a review from a team as a code owner May 23, 2025 22:19
@cqliu1 cqliu1 added Feature:Dashboard Dashboard related features Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas loe:medium Medium Level of Effort impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. Project:Controls v9.1.0 v8.19.0 labels May 23, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@cqliu1 cqliu1 added release_note:feature Makes this part of the condensed release notes release_note:enhancement backport:version Backport to applied version labels and removed release_note:feature Makes this part of the condensed release notes labels May 23, 2025
@elasticmachine
Copy link
Contributor

elasticmachine commented May 23, 2025

💔 Build Failed

Failed CI Steps

History

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels Feature:Dashboard Dashboard related features impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:medium Medium Level of Effort Project:Controls release_note:enhancement Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v8.19.0 v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Dashboard Controls] Include a "Select All" values option in dropdowns
3 participants