-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Rework settings UI #4626
Rework settings UI #4626
Conversation
@ukutaht don't want to keep this cooking for too long, kindly paging for approval - will address any issues potentially surfacing from it |
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.
Great work @aerosol
I agree that we should merge this quite quickly and not leave it in review for a long time.
I commented where I saw text-sm
being removed with the assumption that it's probably a mistake from going to bigger fonts and back.
There is one thing about the components that I think should be changed. Namely the fact that some of these components have a built-in margin to them. I don't think reusable components should do that because positioning the component should be the concern of its parent. By default I think all components should be as neutral as possible about their positioning within the parent container or in relation to siblings.
Another question for me is whether to use these more specific attributes like width
and mt?
, or just have class
like we do on some components. Difference being:
<.input width="w-1/2" mt?={true} />
vs just
<.input class="w-1/2 mt-2"/>
I think I prefer the second option of allowing the class
attribute to be extended because it's the most flexible. What do you think?
I'm going to approve the PR because honestly none of this feedback is blocking and can be done in a follow-up.
Thanks, fixed via ab5e1fc
Having spent some time wrestling with that dilemma, my reasoning was:
So, while I agree the whole execution of trying to abstract common I feel that maybe it's more natural to tell "this is too low, because it happens Many components have predefined "themes" or "defaults", and this is Power users like yourself will always prefer "class", because it's not
Last but not least, I can't stress this enough: In the end, even if we ever get to a "storybook" level of standardisation, And as for this PR, it does not exhaust all the work required WYT? @ukutaht |
Default margins
Yeah these are real problems. I agree with the need to standardize layouts and positioning. But with the widespread browser support of visual components positioning themselves
layout component, visual components agnostic of layout
This keeps the visual components themselves more straightforward and composable because they can be used in any sort of layout. I see the baked-in margins are used mostly if not exclusively in forms. I think adding a layout component that separates form fields with a Class attribute over width and mt?It's getting too late, let's discuss another time :) |
This is a long-running work and a compromise reached when trying to make the settings UI a bit more consistent, extracting common components along the way. Contains some @ukutaht's work and addresses lots of review suggestions by @metmarkosaric - tons of context and evolutionary log can be found here