-
Notifications
You must be signed in to change notification settings - Fork 26
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(search-select-input): add isCondensed prop to SearchSelectInput … #2801
Conversation
🦋 Changeset detectedLatest commit: c186e8c 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 ↗︎
|
@commercetools/shield-team-design-system Not sure if you want me to change anything about the layout for that long input value example. It was working that way before my changes, so I wanted to be sure it wasn't intentional since it was not in my list of changes to implement. |
If this is not a blocker, Maybe we can create a ticket to see if we can have a follow-up fix from our end. Unless if it is something you think you can add to this PR :) |
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 💯
the condensed prop works correctly from my side. I can't reproduce the bug with the weird layout with long value in Storybook. @ddouglasz we can fix this in a follow up if you think that's better |
Here is how I was able to create the bug. This is on the current version of UI kit. It's fine until you add the iconLeft. |
Thank you @Sarah4VT for giving it a try 🙏🏾. We will create a ticket and fix this as a follow up. |
Yeah, I did look at it more yesterday. That input that is causing the problem is the input that is used when the user types into the search box. The problem is the parent element is a flex layout and because the span that contains the value is so long, that input is wrapping to the next line, then I think getting flex'd to take up the full space possibly. If you shrink the span down to the maximum amount that also allows space for the iconLeft, padding between iconLeft and the span, the clear button, and the search button (if they are all present), it will all go on one line and look correct. It's a bit of math to do in the code because you have a lot of conditions that may or may not be present. I probably could have gotten it working, but just wasn't sure if your team would have a different preferred solution. Also I did create the github issue for this bug so feel free use that however you want. |
…component
Summary
Adds support for isCondensed prop on SearchSelectInput component to display a condensed layout.
Description
Designs
![image](https://private-user-images.githubusercontent.com/4260326/326587257-56891943-9d6b-4d2f-8b87-f54084009566.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNzIxOTUsIm5iZiI6MTczOTE3MTg5NSwicGF0aCI6Ii80MjYwMzI2LzMyNjU4NzI1Ny01Njg5MTk0My05ZDZiLTRkMmYtOGI4Ny1mNTQwODQwMDk1NjYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMDcxODE1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NDk1ODNiYTE0MGQyYzk0NzcyMmFjNTZhZjg1ZjVlYWE3YmE0ODg3NWIyZjhlMTU0YjhmY2IzMDU1ZjBhNDhmNyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.iX2AFDRe0h5lrV4RrOV4h3ItkXr4DWjft_eBAyeiofE)
Results
![image](https://private-user-images.githubusercontent.com/4260326/326586112-c5102ca6-fa45-4018-954c-623a4cf7ea8a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNzIxOTUsIm5iZiI6MTczOTE3MTg5NSwicGF0aCI6Ii80MjYwMzI2LzMyNjU4NjExMi1jNTEwMmNhNi1mYTQ1LTQwMTgtOTU0Yy02MjNhNGNmN2VhOGEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMDcxODE1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YjZjMjdiZWRiOWMzMzUxODM2ZDlhMDcxOWVhNzY1YjJhNzVlYWI0MDE0ODNjMTc0NjIxZDgxN2I0MzAzN2VkNCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.X74NOt8Mtac0DoSz0y974cWQlKOqlJ4nhMeVv6h0X2w)
I did notice that with a long input, the layout is a little off, but it was like this prior to my changes as well.
![image](https://private-user-images.githubusercontent.com/4260326/326586522-8592a6c5-2db1-45f0-8026-5591aad12b7e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNzIxOTUsIm5iZiI6MTczOTE3MTg5NSwicGF0aCI6Ii80MjYwMzI2LzMyNjU4NjUyMi04NTkyYTZjNS0yZGIxLTQ1ZjAtODAyNi01NTkxYWFkMTJiN2UucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMDcxODE1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YjIwOWU3NDgyZmE0YTkyZjRiOGZmZTY2MDQ2ZjFhNDU5MTY3YmI5OTM1ZmQ5Yzk3NDJhZjI5Mjk1YjNhM2RlMyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.iNl7MwmIe2J-Pl8e8bZjwApEO8uecENA5AzXPRvZhJE)
Existing code:
With my changes:
![image](https://private-user-images.githubusercontent.com/4260326/326586710-5e666b60-2650-4d9d-b618-c4dd90af47a8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNzIxOTUsIm5iZiI6MTczOTE3MTg5NSwicGF0aCI6Ii80MjYwMzI2LzMyNjU4NjcxMC01ZTY2NmI2MC0yNjUwLTRkOWQtYjYxOC1jNGRkOTBhZjQ3YTgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMDcxODE1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YjQ3ZGRiNjA2MDBiMzMyYWQ1ZGY2NTMxZDJhZmRkYzNiOWQxOGJiZTZhMDkzMjk1MTg1NzNhOTAyZTU5YzJjZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.Y0Gs6jqIH1iIieDPrup1wG6Pih6C0xPfdgpfe7renfg)