-
Notifications
You must be signed in to change notification settings - Fork 23
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
Styling, layout tweaks and how to help out #77
Comments
Layout /stylingis a bit of a delicate issue right now. My current plan is to have one default backend (Bulma) and use Bulma's default functions for layout (see the columns and layout sections here). You can use all of that via WebIO (e.g. What happens is that now all widgets with a "side" label use Concerning the layout tools, if they are pure CSS I think they can go in CSSUtil, whereas if they are based on Bulma layout system, they could probably go in InteractBase (or InteractBulma, but I'm starting to think I should fuse the two packages anyway). |
Thanks. I've been looking into fixing layout issues for getting 60+ sliders on one page. These functions are kind of a problem, as they hard codes the css spacing you mentioned into the element style so you always have to use
Could this be done with css classes instead? whats the general philosophy concerning css vs element styles? Edit: And further they don't have many classes, so you need to do a lot of digging into the dom to actually apply |
To solve this I could just move all of those styles over into style.css and replace them with clases? |
Sure! Though the correct file is
|
I just realised that when everything came out unstyled! In terms of class names: |
It would also be nice to have the widget type as a css class, so that classes on flex row would be |
Also is there a helper function for including your own custom css? |
I've done a small reorganization so that you can include your new styles in style.css in InteractBase (and I'll delete custom.css as soon as it's not needed any more). To use your own css, you should do: import InteractBase: AbstractWidgetTheme, libraries
struct MyTheme <: AbstractWidgethTheme; end
libraries(::MyTheme) = vcat(libraries(Bulma()), [...]) where |
I could probably make the Concerning the separate class for each widget, I think the names should be specific to interact to avoid conflicts (for example |
Having additional css in a keyword would simplify that process. I also agree on the interact- prefix. I'm torn between getting the general case working and just getting this interface going this week for the widgets I'm using, but definitely will aim towards generalise strategies. |
Should be easy enough to add a Would love it if you'd find a good general solution, it may be tricky though, esp. as the slider also has a vertical mode, say |
Copying my reply in #111 here as this seems the appropriate place to discuss things, I think this is a reasonable to do list in terms of layout fixes:
|
Now that this is released and I have Flatten.jl I don't need AutoInteract.jl anymore... I'll be directly using this packages for making UIs, so I was wondering how my efforts to polish project layouts could be contributed back where possible.
There are lots of small details like labels overlapping sliders when widgets are smaller that I need to tweak for two projects over the next week. It would be good to do those fixes in a generally useful way, if you have any pointers on that!
I also have some nice formatting helpers from AutoInteract such as column layouts for large groups of widgets, and those could be good to include in the Interact ecosystem somehow.
The text was updated successfully, but these errors were encountered: