Skip to content

Comments

[Controls] Hide Select All checkbox from single select controls#226311

Merged
Zacqary merged 2 commits intoelastic:mainfrom
Zacqary:single-select-fix
Jul 3, 2025
Merged

[Controls] Hide Select All checkbox from single select controls#226311
Zacqary merged 2 commits intoelastic:mainfrom
Zacqary:single-select-fix

Conversation

@Zacqary
Copy link
Contributor

@Zacqary Zacqary commented Jul 2, 2025

Summary

Controls configured to only allow a single selection
Screenshot 2025-07-02 at 3 55 32 PM

Would still display a Select All checkbox and allow the user to select multiple options this way
Screenshot 2025-07-02 at 3 53 32 PM

This PR hides Select All if the single selection option is chosen:
Screenshot 2025-07-02 at 3 53 42 PM

Checklist

@Zacqary Zacqary requested a review from a team as a code owner July 2, 2025 21:04
@Zacqary Zacqary added Feature:Dashboard Dashboard related features release_note:fix Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// loe:small Small Level of Effort impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. backport:version Backport to applied version labels v8.19.0 v9.2.0 labels Jul 2, 2025
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #54 / serverless observability UI - feature flags ES Query rule - consumers both logs and infrastructure privileges should open the rule creation flyout

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
controls 477.7KB 477.7KB +22.0B

Copy link
Contributor

@ThomThomson ThomThomson left a comment

Choose a reason for hiding this comment

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

Code only review, changes LGTM! Thanks for finding / fixing this!

expect(getSelectAllCheckbox()).not.toBeChecked();
});

test('hides "Select all" checkbox if the control only allows single selections', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Great to see a test addition here!

@Zacqary Zacqary merged commit a3e5226 into elastic:main Jul 3, 2025
28 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19

https://github.com/elastic/kibana/actions/runs/16055243062

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.19 Backport failed because of merge conflicts

You might need to backport the following PRs to 8.19:
- [Controls] migrate scss to emotion (#216413)

Manual backport

To create the backport manually run:

node scripts/backport --pr 226311

Questions ?

Please refer to the Backport tool documentation

@Zacqary Zacqary removed the v8.19.0 label Jul 3, 2025
@Zacqary
Copy link
Contributor Author

Zacqary commented Jul 3, 2025

Checkbox is not present in 8.x, canceling that backport

@Zacqary Zacqary added the v9.1.0 label Jul 3, 2025
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 9.1

https://github.com/elastic/kibana/actions/runs/16055963787

@Zacqary
Copy link
Contributor Author

Zacqary commented Jul 3, 2025

💚 All backports created successfully

Status Branch Result
9.1

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

Zacqary added a commit to Zacqary/kibana that referenced this pull request Jul 3, 2025
…tic#226311)

## Summary

Controls configured to only allow a single selection
<img width="278" alt="Screenshot 2025-07-02 at 3 55 32 PM"
src="https://github.com/user-attachments/assets/193680b6-082e-4b89-b847-5803fe6c4cb6"
/>

Would still display a Select All checkbox and allow the user to select
multiple options this way
<img width="460" alt="Screenshot 2025-07-02 at 3 53 32 PM"
src="https://github.com/user-attachments/assets/7d384015-63db-4a76-9449-35c377280e46"
/>

This PR hides Select All if the single selection option is chosen:
<img width="459" alt="Screenshot 2025-07-02 at 3 53 42 PM"
src="https://github.com/user-attachments/assets/01eae209-d358-4e94-a6e2-6c1d9fb60aa1"
/>

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit a3e5226)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 3, 2025
…tic#226311)

## Summary

Controls configured to only allow a single selection
<img width="278" alt="Screenshot 2025-07-02 at 3 55 32 PM"
src="https://github.com/user-attachments/assets/193680b6-082e-4b89-b847-5803fe6c4cb6"
/>

Would still display a Select All checkbox and allow the user to select
multiple options this way
<img width="460" alt="Screenshot 2025-07-02 at 3 53 32 PM"
src="https://github.com/user-attachments/assets/7d384015-63db-4a76-9449-35c377280e46"
/>

This PR hides Select All if the single selection option is chosen:
<img width="459" alt="Screenshot 2025-07-02 at 3 53 42 PM"
src="https://github.com/user-attachments/assets/01eae209-d358-4e94-a6e2-6c1d9fb60aa1"
/>

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit a3e5226)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
9.1

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jul 3, 2025
…#226311) (#226466)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[Controls] Hide Select All checkbox from single select controls
(#226311)](#226311)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Zac
Xeper","email":"Zacqary@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-07-03T16:01:28Z","message":"[Controls]
Hide Select All checkbox from single select controls (#226311)\n\n##
Summary\n\nControls configured to only allow a single selection\n<img
width=\"278\" alt=\"Screenshot 2025-07-02 at 3 55
32 PM\"\nsrc=\"https://github.com/user-attachments/assets/193680b6-082e-4b89-b847-5803fe6c4cb6\"\n/>\n\nWould
still display a Select All checkbox and allow the user to
select\nmultiple options this way\n<img width=\"460\" alt=\"Screenshot
2025-07-02 at 3 53
32 PM\"\nsrc=\"https://github.com/user-attachments/assets/7d384015-63db-4a76-9449-35c377280e46\"\n/>\n\nThis
PR hides Select All if the single selection option is chosen:\n<img
width=\"459\" alt=\"Screenshot 2025-07-02 at 3 53
42 PM\"\nsrc=\"https://github.com/user-attachments/assets/01eae209-d358-4e94-a6e2-6c1d9fb60aa1\"\n/>\n\n\n###
Checklist\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"a3e52260ae71434a8b278b60c9255ba7f51ebc71","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Dashboard","release_note:fix","Team:Presentation","loe:small","impact:high","backport:version","v9.1.0","v9.2.0"],"title":"[Controls]
Hide Select All checkbox from single select
controls","number":226311,"url":"https://github.com/elastic/kibana/pull/226311","mergeCommit":{"message":"[Controls]
Hide Select All checkbox from single select controls (#226311)\n\n##
Summary\n\nControls configured to only allow a single selection\n<img
width=\"278\" alt=\"Screenshot 2025-07-02 at 3 55
32 PM\"\nsrc=\"https://github.com/user-attachments/assets/193680b6-082e-4b89-b847-5803fe6c4cb6\"\n/>\n\nWould
still display a Select All checkbox and allow the user to
select\nmultiple options this way\n<img width=\"460\" alt=\"Screenshot
2025-07-02 at 3 53
32 PM\"\nsrc=\"https://github.com/user-attachments/assets/7d384015-63db-4a76-9449-35c377280e46\"\n/>\n\nThis
PR hides Select All if the single selection option is chosen:\n<img
width=\"459\" alt=\"Screenshot 2025-07-02 at 3 53
42 PM\"\nsrc=\"https://github.com/user-attachments/assets/01eae209-d358-4e94-a6e2-6c1d9fb60aa1\"\n/>\n\n\n###
Checklist\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"a3e52260ae71434a8b278b60c9255ba7f51ebc71"}},"sourceBranch":"main","suggestedTargetBranches":["9.1"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/226311","number":226311,"mergeCommit":{"message":"[Controls]
Hide Select All checkbox from single select controls (#226311)\n\n##
Summary\n\nControls configured to only allow a single selection\n<img
width=\"278\" alt=\"Screenshot 2025-07-02 at 3 55
32 PM\"\nsrc=\"https://github.com/user-attachments/assets/193680b6-082e-4b89-b847-5803fe6c4cb6\"\n/>\n\nWould
still display a Select All checkbox and allow the user to
select\nmultiple options this way\n<img width=\"460\" alt=\"Screenshot
2025-07-02 at 3 53
32 PM\"\nsrc=\"https://github.com/user-attachments/assets/7d384015-63db-4a76-9449-35c377280e46\"\n/>\n\nThis
PR hides Select All if the single selection option is chosen:\n<img
width=\"459\" alt=\"Screenshot 2025-07-02 at 3 53
42 PM\"\nsrc=\"https://github.com/user-attachments/assets/01eae209-d358-4e94-a6e2-6c1d9fb60aa1\"\n/>\n\n\n###
Checklist\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"a3e52260ae71434a8b278b60c9255ba7f51ebc71"}}]}]
BACKPORT-->

Co-authored-by: Zac Xeper <Zacqary@users.noreply.github.com>
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Jul 4, 2025
@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @Zacqary

@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @Zacqary

1 similar comment
@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @Zacqary

@Zacqary Zacqary removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Jul 8, 2025
kertal pushed a commit to kertal/kibana that referenced this pull request Jul 25, 2025
…tic#226311)

## Summary

Controls configured to only allow a single selection
<img width="278" alt="Screenshot 2025-07-02 at 3 55 32 PM"
src="https://github.com/user-attachments/assets/193680b6-082e-4b89-b847-5803fe6c4cb6"
/>

Would still display a Select All checkbox and allow the user to select
multiple options this way
<img width="460" alt="Screenshot 2025-07-02 at 3 53 32 PM"
src="https://github.com/user-attachments/assets/7d384015-63db-4a76-9449-35c377280e46"
/>

This PR hides Select All if the single selection option is chosen:
<img width="459" alt="Screenshot 2025-07-02 at 3 53 42 PM"
src="https://github.com/user-attachments/assets/01eae209-d358-4e94-a6e2-6c1d9fb60aa1"
/>


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
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:small Small Level of Effort release_note:fix Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// v9.1.0 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants