-
Notifications
You must be signed in to change notification settings - Fork 13
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(select): prepend support on textfield & select #82
Conversation
@i8ramin Interesting contribution, however, this will need to be audited by design. Can you please confer with Dana Ballasy about this change? |
What is the breaking change for? |
No longer breaking change. |
hmmm.. so the idea is you would prepend a select to the text field in order to solve for phone field? Might be useful to provide an example of this specific use case (with a dummy select), since that is the reason for adding? like |
This is just the first step towards that end goal. Adding a phone select in there is gonna be tricky, so didn't want to create a huge PR. This one just makes it so we can "prepend" things to textfield & selects |
@cmugla added a simple flag dropdown (no functionality, just visuals) |
@@ -140,5 +147,22 @@ | |||
color: rgba($ray-color-gray-60, 0.4); | |||
} | |||
} | |||
|
|||
&--simple { |
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.
border-radius: 0; | ||
|
||
&__input { | ||
font-size: ($ray-field-label-size * 1.2); |
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.
this is specifically to make the flags a bit larger .. not sure if we should set this font size here
@i8ramin Is there any way to avoid the breaking change? We just released 1.0.0 lol |
No longer breaking changes. New wrapper div is only required for the new |
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.
This looks good to me. Please go through the chromatic failures
d18ca98
to
630a200
Compare
BREAKING CHANGE: textfields and selects that have icons (and not prepends) need to be wrapped in an extra div with a class name of "#{$ray-class-prefix}#{$class}__wrapper" re #81
@@ -44,11 +46,15 @@ | |||
border-radius: 2px; | |||
|
|||
[dir='rtl'] & { | |||
position: unset; | |||
margin-left: $ray-field-h-spacing; | |||
right: calc(100% - (2 * #{$ray-field-h-spacing})); |
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.
This is a slight change in how we handle the arrow on RTL. Instead of unsetting position, we calculate it so that the behavior is similar to how it is done with LTR
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
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.
LGTM, so long as this was approved by Dana feel free to merge
textfields and selects that have icons (and not prepends) need to be wrapped in an extra div with a class name of "#{$ray-class-prefix}#{$class}__wrapper" re #81
No longer breaking change. Decided to not touch the current
with-icon
implementation and create new styles to supportprepend
.Main motivation (re #81)
Screenshots