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

Introduce a clear everything button in multiselect and search autocompletes #81

Merged
merged 10 commits into from
Jun 19, 2024

Conversation

jmuscireum
Copy link

@jmuscireum jmuscireum commented Jun 18, 2024

Breaking

This is breaking, as the new CSS class name (token-autocomplete-delete-button) has to be used in overriding CSS rules and in custom token renderers.

Replace token-autocomplete-token-delete with token-autocomplete-delete-button.
CSS rules might have to be adjusted.

Description

This fixes some small issues (see the first two commits) and introduces a clear button in multiselect and search autocompletes to clear all tokens and user input (remaining commits)

Correct height for empty readonly selects:
Bildschirmfoto 2024-06-18 um 16 08 09

Turn the arrow up when the suggestions are displayed:
Bildschirmfoto 2024-06-18 um 16 08 18

New symbol for optional single selects:
Bildschirmfoto 2024-06-18 um 16 08 31

Multiselect with clear button:
Bildschirmfoto 2024-06-18 um 16 08 36

Additional Notes

Checklist

  • Code change has been tested and works locally
  • TSC (TypeScript Compiler) has been run and changes are reflected in the dist folder

The line-height only has an effect, if there is actually any text.
We already had some (incorrect) CSS rules, but these weren't used until now.
This adapts the CSS to use the new cross symbol in single selects.

This is breaking, as the new CSS class name (token-autocomplete-delete-button) has to be used in overriding CSS rules and in custom token renderers.
... in multiselect and search autocompletes. This button can be used to clear all tokens and user input.
@jmuscireum jmuscireum added  💣 BREAKING CHANGE Contains non-backwards compatible changes to public methods or changes the behavior of existing code 🧬 Enhancement Contains new features labels Jun 18, 2024
lib/token-autocomplete.ts Outdated Show resolved Hide resolved
lib/token-autocomplete.ts Outdated Show resolved Hide resolved
lib/token-autocomplete.ts Outdated Show resolved Hide resolved
And give select-arrow-active a more generic name.
@jmuscireum jmuscireum merged commit f2f7386 into master Jun 19, 2024
@jmuscireum jmuscireum deleted the feature/jmu/delete-everything branch June 19, 2024 06:14
Copy link
Member

@sabieber sabieber left a comment

Choose a reason for hiding this comment

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

Thanks a lot 👌🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
 💣 BREAKING CHANGE Contains non-backwards compatible changes to public methods or changes the behavior of existing code 🧬 Enhancement Contains new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants