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

'Select All' for Select Component #520

Closed
muratcorlu opened this issue Apr 11, 2023 · 9 comments · Fixed by #746
Closed

'Select All' for Select Component #520

muratcorlu opened this issue Apr 11, 2023 · 9 comments · Fixed by #746
Assignees

Comments

@muratcorlu
Copy link
Contributor

No description provided.

@muratcorlu muratcorlu converted this from a draft issue Apr 11, 2023
@muratcorlu muratcorlu added the ADR-required An Architectural Design Record is needed for this issue label Apr 11, 2023
@buseselvi buseselvi moved this from ADR to In Design in Baklava Design System Apr 17, 2023
@muratcorlu
Copy link
Contributor Author

Design Meeting Report

Date: 2023-04-18 14:00 GMT+3


  • "Select All" functionality will be visible by default in multi-select mode
  • "Select All" will be sticky on popover. Will not disappear with scroll
  • Popover height will still include up to 6 items even if "select all" visible. That means popover height in multi-select mode will be able to bigger than single select mode.
  • To make all of the selected items easily visible, selected items will be moved to the top of the list when popover opened (order will not change immediately, when user select/deselect an item)
  • "Select all" checkbox will be "indeterminate" mode if some of the options are un-selected.
  • "Select all" will not effect current behaviour on showing selected options inside select input. That means, it will still show like "label 1, label 2, label 3, +21" as in if user selects all of the items one-by-one.

@buseselvi
Copy link
Contributor

We are planning to make a prototype test with the ux research team about select all and select search to designs before handing 🙏🏻

@muratcorlu
Copy link
Contributor Author

Our UX Research started on this together with #265. Results will come soon.

@muratcorlu muratcorlu added the ux-research:progress There is an ongoing UX research on this issue label May 22, 2023
@buseselvi
Copy link
Contributor

Here is the design documentation link 🚀

@muratcorlu muratcorlu moved this from In Design to ADR in Baklava Design System Jun 5, 2023
@buseselvi buseselvi moved this from ADR to In Design in Baklava Design System Jun 8, 2023
@buseselvi buseselvi moved this from In Design to ADR in Baklava Design System Aug 3, 2023
@buseselvi buseselvi removed their assignment Aug 15, 2023
@ogunb ogunb self-assigned this Nov 30, 2023
@ogunb
Copy link
Contributor

ogunb commented Nov 30, 2023

  • To make all of the selected items easily visible, selected items will be moved to the top of the list when popover opened (order will not change immediately, when user select/deselect an item)

This seems beyond the scope of the issue. I created another one for it.

@ogunb
Copy link
Contributor

ogunb commented Nov 30, 2023

Design

Figma Design Document

Implementation

General usage example:

<bl-select 
  multiple 
  placeholder="Choose countries"
  hide-select-all
  select-all-text="Tümünü Seç"
>
  <bl-select-option value="tr">Turkiye</bl-select-option>
  <bl-select-option value="nl">The Netherlands</bl-select-option>
  <bl-select-option value="de">Germany</bl-select-option>
  <bl-select-option value="uk">United Kingdom</bl-select-option>
</bl-select>

Rules

  • hide-select-all attribute will hide the "select all" option. False by default.
  • select-all-text attribute will change the text of the "select all" option. This will be removed when localization is implemented.
  • "Select all" option is sticky.
  • Popover height will still include up to 6 items even if "select all" visible. That means popover height in multi-select mode will be able to bigger than single select mode.
  • "Select all" checkbox will be "indeterminate" mode if some of the options are un-selected.
  • "Select all" will not effect current behaviour on showing selected options inside select input. That means, it will still show like "label 1, label 2, label 3, +21" as in if user selects all of the items one-by-one.
  • "Select all" will not take any action on disabled options.

API Reference

New attributes:

Attribute Description Default Value
hide-select-all Hides the "select all" option. false
select-all-text Changes the text of the "select all" option. Select All

@leventozen
Copy link
Member

Hey @ogunb, I think it's good to go. However, would be a good idea to verify performance and usability when dealing with a very large number of options, as this could impact rendering and user experience. To accomplish this we may need to optimize the current code a little bit. Avoiding unnecessary dom access' would be enough imo. Let's keep it in mind.

@ogunb ogunb removed ADR-required An Architectural Design Record is needed for this issue ux-research:progress There is an ongoing UX research on this issue labels Nov 30, 2023
@ogunb ogunb moved this from ADR to In Development in Baklava Design System Nov 30, 2023
ogunb added a commit that referenced this issue Nov 30, 2023
leventozen pushed a commit that referenced this issue Dec 15, 2023
@github-project-automation github-project-automation bot moved this from In Development to Done in Baklava Design System Dec 15, 2023
Copy link

🎉 This issue has been resolved in version 2.4.0-beta.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

@leventozen leventozen mentioned this issue Jan 25, 2024
Copy link

🎉 This issue has been resolved in version 3.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants