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

feat: improve readability of multiselect #638

Merged

Conversation

jzfrank
Copy link
Contributor

@jzfrank jzfrank commented Aug 26, 2023

Description

Improve readability of selected items in MultiSelect

Related issue(s)
#635

What kind of change does this PR introduce? (check at least one)

  • Bug fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

How has This been tested?

Storybook

Screenshots (if appropriate):

  • Truncate longer text with lg as breakpoint
  • Able to close by item or all together.

In mobile:
image

horizontally scrollable without showing scroll bar.
image

In desktop:
image

The PR fulfills these requirements:

  • It's submitted to the main branch
  • When resolving a specific issue, it's referenced in the related issue section above
  • My change requires a change to the documentation. (Managed by Tremor Team)
  • I have added tests to cover my changes
  • Check the "Allow edits from maintainers" option while creating your PR.
  • Add refs #XXX or fixes #XXX to the related issue section if your PR refers to or fixes an issue.

@jzfrank jzfrank marked this pull request as ready for review August 26, 2023 15:25
@christopherkindl
Copy link
Member

Thank you so much, @jzfrank! We will review it asap.

@jzfrank jzfrank force-pushed the feat/improve-readability-multiselect branch from f65503c to 83dd575 Compare August 27, 2023 20:51
@christopherkindl
Copy link
Member

christopherkindl commented Aug 29, 2023

@jzfrank Works great so far, one thing to be fixed would be to add a white background for the global close button, such that it does not overlay with the selected items:

_temp_GH

@christopherkindl
Copy link
Member

@jzfrank + no change in height of the input bar when an item is selected. Currently it gets bigger once an item is selected 🙂

@jzfrank
Copy link
Contributor Author

jzfrank commented Aug 30, 2023

@christopherkindl Thanks for the review! Now it should get fixed.

@jzfrank
Copy link
Contributor Author

jzfrank commented Aug 30, 2023

A quick follow up question: I hide the horizontal scrollbar for a better UI. However, if the user does not have a trackpad or ability to scroll horizontally, should we show the scrollbar? Maybe we should add a prop showScrollBar with default to be false?

@christopherkindl
Copy link
Member

Thanks so much @jzfrank! Will review it asap. And good question, will try out what feels better.

@severinlandolt
Copy link
Member

@christopherkindl @jzfrank Added support for dark mode.

@christopherkindl
Copy link
Member

@jzfrank updated styling of selected items
@severinlandolt not sure how we can keep the same height as in the other input elements without compromising the aesthetics. Would avoid shrinking the font size of selected item pills, maybe let's change the padding between selected items <> input?

@christopherkindl christopherkindl added the PR: In Review This PR is in the process of being reviewed by the team label Sep 1, 2023
@severinlandolt
Copy link
Member

@christopherkindl Should now have the same height:
CleanShot 2023-09-04 at 08 26 58@2x

@severinlandolt severinlandolt force-pushed the feat/improve-readability-multiselect branch from 51e925e to c0f0dcf Compare September 4, 2023 06:38
@severinlandolt severinlandolt merged commit 7eb35b1 into tremorlabs:main Sep 5, 2023
3 checks passed
@github-actions
Copy link

github-actions bot commented Sep 5, 2023

🎉 This PR is included in version 3.7.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
Labels
PR: In Review This PR is in the process of being reviewed by the team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants