-
-
Notifications
You must be signed in to change notification settings - Fork 525
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
Add vanilla template #1421
Add vanilla template #1421
Conversation
…as changing the elements for the sidebar drawer to use vanilla features
Looks like a great start! |
Looks great. I just wanted to share my vision, knowledge and assets on Material Templates, Themes, Styles and widgets for Panel. Just for inspiration. Take some of it if you can use it. My Vision for Material in PanelI would like users to be able to easily create powerful and awesomely looking analytics apps in Python. I see Panel as the best technology for that but some functionality is missing.
I look to the for the awesomeness. I have chosen this over for example Bootstrap as Material is modern, it's very popular and have Web Components that work really well with Panel instead of old school js and css files that often do not. My vision includes being able to let the user toggle between a light and a dark theme (and maybe more) in a live Panel app. ChallengesThe main challenges using Material is that it has a different design system than the Bootstrap inspired widgets of Panel/ Bokeh and that Panel widgets cannot be easily styled to support for example a dark theme. An example is that Material only have three colors (primary, secondary, error) where Panel has 5 (primary, success, info, warning, danger colors). Another example is that the Dataframe Pane and Widget do not look great in a Dark theme (Because they are white) and do support easily adjusting the color scheme to the three colors in the Material Design System. It's not easy to change the style of existing Panel widgets as most of the color from Bokeh or Panel style files is hard coded as far as I can see. Major problem :-) Experimentation - Material DesignerIn order to better enable styling of Panel and Bokeh widgets to Material and Dark Themes I started working on the App Template with Themes PR. python -m panel serve 'panel\tests\themes\theme_builder\test_theme_builder.py' --dev --show Please take a look at the PR and its files as there is already a lot of code that can be re-used for styling. The most important ones are
Experimentation - Awesome Panel StylerI have started working on a new Designer and renamed to Styler as I wanted to support both Panel/ Bootstrap designs and Material ones. And also would make it easy to style new awesome themes I plan to reuse a lot of code from the Material Designer above in the Awesome Panel Styler. Especially in order to style Panel widgets for dark themes. And increasingly implement more Material Widgets as I need them. python -m panel serve 'package\tests\styler\test_styler.py' --dev --show You can find the code in the Other Resources
|
My feedback images above is that they are a big step in the right direction. In general my advice is to stick to the original Material Design System including Color Themes simply because this would make life easier for developers, designers, users and enable consistent use of Material Widgets in Panel. You can find the themes here. So if the background colors in the light and dark themes are not the official ones please consider using them as they are modern, works well with the material colors and widgets and would make it much easier for users to work with designers and their organisations official design systems. One detail is that I can see the icon used for opening the The same goes for the app bar in the Material Theme. I think it looks great but I'm not sure its the color scheme recommended by Material Design. So I would pick an official one as the default and support more if I have time or provide an example showcasing how to customize this. And please add a little bit of margin to the plots. More space between the plots and between the plots and the app bar is needed in my opinion. Or at least use some kind of consistent spacing. That would make both examples look really awesome to me. |
I believe easy to use and awesome looking Templates is is a Killer Feature and one of the key drivers of the success of one of the alternative Python Frameworks :-) |
Another thing is that you need to fine tune the Example of margin. plot_pane = pn.pane.HoloViews(
hv.Curve({}), sizing_mode="stretch_both", margin=10
) I believe it would a lot of users if the margin was there by default in Panel. What do you think @philippjfr ? |
And one more thing. My users always asks to remove the Bokeh logo from the plots as they don't understand why it should be there. I know this might be there for a reason. But I also believe the app looks simpler, better and more modern without it. |
@MarcSkovMadsen I don't know if you've seen, but we actually do have a Material template! I can discuss with the team your suggestion of having the option to remove the Bokeh logo. |
Ahh. Sorry @kebowen730 . I thought that the Vanilla template was just the name of the Template based on Material. I did not know the Vanilla Framework. |
We may want to find a better name, "Vanilla" in this case just means no framework (see this StackExchange post). |
…ontrols into one button in the header
Codecov Report
@@ Coverage Diff @@
## master #1421 +/- ##
=======================================
Coverage 86.20% 86.20%
=======================================
Files 138 139 +1
Lines 15426 15445 +19
=======================================
+ Hits 13298 13315 +17
- Misses 2128 2130 +2
Continue to review full report at Codecov.
|
@philippjfr I fixed the borders on the Panel cards and fixed the sidebar buttons |
One request streamlit users are having all the time is the possibility to specify the favicon. It might be a good idea to enable that for the template. |
A few other things that would be nice to have in a template is
|
This was next on my to do list before I got pulled into 6 hours of meetings today. I'll revisit tomorrow. |
…as changing the elements for the sidebar drawer to use vanilla features
f83e55d
to
e59e4ee
Compare
I've got plans to add that to all the templates at once, once this one is merged. |
@kebowen730 Last issues for you to address:
|
Thanks @kebowen730! |
I added a VanillaTemplate with light and dark themes, I attached screenshots above for feedback on the appearance.