-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
Cssectomy #327
Cssectomy #327
Conversation
- added local :class, :style, :attr handling to merge-css
- Sometimes a non :main component should use the toplevel :class and :style fields as well as the fields supplied in the parts structure. Adding `:use-toplevel true` to the -css-desc for a particular component will allow this. :use-toplevel can also be set to `false` for :main.
- Contents of the :attr field should generally be spread in the target element, not confined to the :attr keyword of the component. There may be exceptions, but we'll start with this.
- :flatten-attr parameter was awkward, switch to a separate function to do the job.
- Everything appears to be working
- some work remaining on the buttons
- css for buttons is split out
- More accurate. It's not a description
Just a quick sorry, because we have yet to look at this. |
Yep, beware the big chunk! |
:right and :bottom weren't being sent through to CSS, causing confusion about the location of the popup.
- Available in popover-border, popover-content-wrapper
- updates from 2.13.2 -> 2.18.0
- Make things more consistent with upstream master.
- reuse backdrop component from popover.cljs
1c466ca
to
60d0594
Compare
Hey, thanks for all the effort you've put into designing this and maintaining the branch. I've been over the PR a few times, drawing inspiration where I could. We've settled on a design which is not far off. The main differences are in ergonomics and levels of indirection:
I recently merged some of this work into our alpha components - see dropdown for a working example. Would be great to hear what you think - specifically, whether you can imagine your tailwind project integrating with this design. It could be straightforward to factor each |
Looks good! First glance says definitely workable. I can probably eliminate re-com-tailwind as a separate project and just supply it as a re-com theme. I think I have a few questions, but need to review the code a little more so that I know what I am asking :-) |
Things seem to be getting more complex, both in the component code and in the user options. Not surprising, with all the added features. Here's something that might help: can the themes parameters to the component be simplified down to one :theme (or perhaps :themes) option? I like what you have done with splitting the theme into base, main and variables sections, but does the component need to know about them? There will be less cognitive load on casual users and component authors if the theme merging is done out of their sight. An advanced user who wishes to - say - reuse base and replace main can bundle them together, then pass the bundle in to specific components with the :theme option. I should be able to look at rewriting the -css-spec stuff in a couple of weeks. I have another project to finish up. |
Yes, we should do something like that. When passed As for advanced usage, I should examine what I already wrote, maybe write some tests. I know it works to pass in |
Yes, probably, it should match what I'm thinking. Honestly, I'm going to have to make another pass over your code. It hasn't all sunk in yet. I was mostly reacting to the sight of the main-theme, theme-vars and base-theme keyword parameters of the dropdown render function. |
Should close this. Themes looks like the way to go. |
Note to reviewer: Most of the meat of this rather large pull request is in util.cljs. Everything else is a rather repetitious application of the tools added there.
Thanks!