Add select all and select x matches (select all 2)#13795
Add select all and select x matches (select all 2)#13795sfc-gh-dmatthews merged 12 commits intodevelopfrom
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
✅ PR preview is ready!
|
SummaryThis PR adds a "Select all" and "Select X matches" feature to the Multiselect widget. When the dropdown is open:
The implementation is clean and the unit tests are comprehensive. Code QualityThe implementation in
Minor observation in
Test CoverageUnit Tests (Frontend)The unit test coverage is excellent:
E2E TestsMissing E2E test coverage: The PR does not include E2E tests for the new feature. While the unit tests are comprehensive, E2E tests would verify:
Potential E2E test breakage: Some existing E2E tests may fail due to the new "Select all" option changing dropdown item counts:
Backwards CompatibilityLow risk of breaking changes:
One subtle behavioral change: Users who relied on the first dropdown item being the first data option will now see "Select all" first. This is unlikely to cause issues in practice. Security & RiskNo security concerns identified:
Low regression risk:
Recommendations
VerdictAPPROVED: The implementation is clean, well-tested with comprehensive unit tests, and follows existing patterns. The feature adds valuable UX improvement without breaking existing functionality. The main gap is missing E2E test updates/additions, which should be verified before merge to ensure CI passes. This is an automated AI review using |
sfc-gh-bnisco
left a comment
There was a problem hiding this comment.
Small test suggestion inline, and given the e2e failures, looks like there will need to be some revisions on the e2e tests.
8096ee9 to
7132679
Compare
98d61dc to
57ceb89
Compare
📈 Frontend coverage change detectedThe frontend unit test (vitest) coverage has increased by 0.0900%
🎉 Great job on improving test coverage! |
f876deb to
2df8686
Compare
7132679 to
44abccb
Compare
90a9eeb to
b744651
Compare
44abccb to
93808e8
Compare
b744651 to
127163f
Compare
93808e8 to
0adf09d
Compare
127163f to
edcd9fc
Compare
9b8a906 to
67426a6
Compare
af34d22 to
98055e5
Compare
fed76f6 to
07894bf
Compare
98055e5 to
de31a73
Compare
4c3152a to
4da12c9
Compare
de31a73 to
904afcb
Compare
4da12c9 to
12bf0dd
Compare
904afcb to
ab76d8e
Compare
Merge activity
|
12bf0dd to
d987c02
Compare
ab76d8e to
9465966
Compare
This reverts commit 57ceb89.
d987c02 to
cb1e088
Compare
## Describe your changes This PR adds a "Select all" and "Select X matches" feature to the Multiselect widget. When the dropdown is open: - Without a search filter: Shows "Select all" option to select all remaining unselected options, but only if there is more than one item - With a search filter: Shows "Select X matches" option to select all filtered matches, but only if there is more than one match in the filtered list No styling changes are applies in this PR. That's next in the Graphite stack. ## Screenshot or video (only for visual changes) <table> <tr><th>Select all</th><th>Select X matches</th></tr> <tr> <td> <img width="772" height="205" alt="image" src="https://github.com/user-attachments/assets/713bd6d2-7645-4b2b-a323-21dd9f25ca88" /> </td> <td> <img width="766" height="207" alt="image" src="https://github.com/user-attachments/assets/960f3f7a-1c52-45d4-b382-e29ecbc39a92" /> </td> </tr> <tr> <td> <img width="787" height="210" alt="image" src="https://github.com/user-attachments/assets/e68c81df-d418-4f5d-8021-f254d8a40926" /> </td> <td> <img width="759" height="211" alt="image" src="https://github.com/user-attachments/assets/9deb0402-5880-4d86-9358-b82d41373f9c" /> </tr> </table> ## GitHub Issue Link (if applicable) Closes #4714 ## Testing Plan - Explanation of why no additional tests are needed - Unit Tests (JS and/or Python) - E2E Tests - Any manual testing needed? --- **Contribution License Agreement** By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.
|
I don't agree to "Users who relied on the first dropdown item being the first data option will now see "Select all" first. This is unlikely to cause issues in practice.". In my case there are hundreds of options, and selecting all of them may cause a huge amount of data to be loaded, potentially crashing the Streamlit Server. How can we switch off the new feature? |

Describe your changes
This PR adds a "Select all" and "Select X matches" feature to the Multiselect widget. When the dropdown is open:
No styling changes are applies in this PR. That's next in the Graphite stack.
Screenshot or video (only for visual changes)
GitHub Issue Link (if applicable)
Closes #4714
Testing Plan
Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.