-
Notifications
You must be signed in to change notification settings - Fork 18
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
New behaviour for selects #269
Conversation
iamdanchi
commented
May 20, 2022
•
edited
Loading
edited
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.
Please see comment. We can discuss also, what would be nice API.
Basic motivation for this response:
Missing totally: content slot for MultiSelect for passing Dropdown with left_icon for exampleWorking example for Dropdown can be seen at: This does basically everything that is required? Now, what was missing. Inside of MultiSelect (https://github.com/coingaming/moon/blob/main/lib/moon/components/select/multi_select.ex#L149) there is <:content><:content> block. That needs to be Dropdown or slot with previous links content. Now it basically works? (Like 3 lines of code for if-else added?) Needs change: options propAdditional feature. From your Affiliates code PR I see, that you try to add some props to options, so that dropdown visuals is generated from that. Links:
I think we could support this, but prefered naming for options prop would be:
And this render to proper place:
Recommendations for futureStart from documentation Page example. In our case, it could have been MultiSelectPage improvement to support left_icon and right_icon example, based on DropdownPage example with left_icon or right_icon. |
b6a8c97
to
6c83e08
Compare
"text-trunks-100": !@current, | ||
"w-10": @size == "medium", | ||
"w-12": @size == "large" | ||
"left-0", |
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 wrote 100% working code with flex and gap? Why that code is not used?
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 wrote code, where bad position for for right_icon
, because right_icon
should be anchored to the edge of the element. So I reworked it again.
In your implementation, need to add classes for the right_icon object in the passed value, and not set in the template of the called module. I think it's bad, because need to do it on every call
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.
I do not know even how to address this. Have we talked, that you should read TailwindCSS and understand it?
It makes me relatively sad, I show how it works, but you decide, that "Nah, I do it other way and I do not ask help, why Margus did show me".
If it happens once, that is ok, but it is kind of common pattern and makes me "wtf" already.
https://tailwindcss.com/docs/flex-grow
Can you restore back to the code that we wrote togeather (for a reason)?
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.
So, I see. I returned it the way we did
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.
fixed
@margusp2heathmont please look on it.
|
6f11316
to
096b6cf
Compare
/> | ||
{/if} | ||
|
||
<!-- |
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.
Why there are comments in code?
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.
It should work with classes, but it doesn't work on my side
Maybe you know how to fix it
<:example> | ||
<div class="flex flex-col gap-4"> | ||
<Form for={@user_changeset} change="form_update" submit="form_submit"> | ||
<Field name={:role}> |
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.
Why there are 3 same forms?
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.
it's 3 same forms with various fillings
- label
- inner label
- inner label + with icon
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.
Good work!
Please help to understand, added few questions.
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.
Very good work!
Thank you and approved.
58bf604
to
b7d1c0a
Compare