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(selectable search): add isCondensed prop to SelectableSearchInput
component
#2809
feat(selectable search): add isCondensed prop to SelectableSearchInput
component
#2809
Conversation
🦋 Changeset detectedLatest commit: b3dc39c The changes in this PR will be included in the next version bump. This PR includes changesets to release 96 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@ddouglasz Any thoughts? Could be I've just looked at the wrong part too long and am missing the obvious... |
…Condensed for SelectableSearchInput
This has been resolved now but about to leave a couple comments on some curiosities we had. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason select (from react) is being used/imported here instead of the select component already set up in UI Kit? Then all that would be needed is just to pass in the isCondensed instead of re-setting up the conditional styling again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We saw something similar with create-select-styles.ts
and selectable-search-input.styles.ts
where basically the same functions were both being written and the conditional styling had to be duplicated. However other instances pulled from the same function and all that had to be done was just pass the prop in. Maybe out of scope for this initiative but just something we noticed as we worked on the select input based components.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @jmcreasman 👋
Sorry I totally missed your previous mentions. Regarding your observation above, thats a good question. I think that is a viable option as it seems they are similar components. However, I guess it is either these use cases are not ideal for the outcome we want using a SelectInput or they were just implemented in this isolated form. I can confirm this when I have some time to investigate further.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jmcreasman for your feedback 👍
I remember we run into som issues we couldn't overcome when we first tried to implement the SelectableSearchInput
using the SelectInput
component, although I don't remember the exact reason.
I agree with you that it's weird not all selectable components share more code and that's something that we would like to address in one of the initiatives we already discussed within the team for the future on ui-kit
, however, we need to find the time to kickstart that initiative and I don't think that's going to happen this or next quarter.
Anyway, we really appreciate the feedback so it helps us to confirm what we already had in mind for improving this area of ui-kit
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you 🙏🏾
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
Thanks!
@jmcreasman thanks, looks good so far. One thing that is missing: One of the requirements was to also decreae the font-size inside the dropdown menu when |
I see what you mean, I had thought they were condensed too but after a second glance realize they are not. I'll take a look today and ping you when it's ready for your review. Thanks for the catch! |
@jmcreasman that looks correct. I dont see it in the preview link though |
I don't see it neither, even when pulling the branch and running it locally. @jmcreasman could it be you have some locally uncommitted/unpushed changes? |
@FilPob / @CarlosCortizasCT |
@jmcreasman Nice! the condensed one looks great now. However somehow there is also an unexpected change in the non-condensed version. The padding for each select item seems to be decreased. The non-condensed version should stay as it is currently. |
@CarlosCortizasCT / @ddouglasz |
Hi @jmcreasman So the issue here is that we are already creating some custom styles for the select component here: const selectStyles = createSelectStyles({
hasWarning,
hasError,
menuPortalZIndex,
isDisabled,
isReadOnly,
horizontalConstraint,
});
That shared function ( I just pushed a commit to adjust that and it seems to work fine. @FilPob will you take another look when you have the time? 🙏 |
SelectableSearchInput
component
Thanks @CarlosCortizasCT that makes sense |
Looks good now. Thank you all! |
Adding a new boolean isCondensed prop that when set to true condenses the input height, font size and icon size for the following component:
SelectableSearchInput
isCondensed is false
isCondensed is true