-
Notifications
You must be signed in to change notification settings - Fork 13
Add reference dashboard #143
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
base: main
Are you sure you want to change the base?
Conversation
…rial-ui into enhancement/reference-example
|
Buttons can now stretch. But since they align the text and icon center they don't seem to be a good fit for a menu. I think what is needed is something built on top of Unfortunately the |
|
I can see that a |
|
This PR now contains a import param
import panel as pn
from panel_material_ui.pane import Timeline
from panel_material_ui import Page
if __name__.startswith("bokeh"):
pn.extension()
demo_items = [
{"content_title": "Eat", "content": "Because you need strength", "opposite": "08:30", "color": "grey", "variant": "filled", "icon": "fastfood"},
{"content_title": "Code", "content": "Because it's awesome!", "opposite": "09:00", "color": "primary", "variant": "filled", "icon": "laptop_mac"},
{"content_title": "Sleep", "content": "Because you need rest", "opposite": "09:30", "color": "secondary", "variant": "outlined", "icon": "hotel"},
{"content_title": "Repeat", "content": "Because this is the life you love!", "opposite": "11:00", "color": "success", "variant": "filled", "icon": "repeat"},
]
timeline = Timeline(object=demo_items, width=600)
Page(
main=[
"## Material‑UI Timeline (Panel custom component)", timeline,],
).servable()It can also look like |
|
This PR will include a ChangeIndicator(
title="Today's Money", icon="weekend", value="$53,000", change_percent=55, since="since yesterday", sizing_mode="stretch_width"
) |
|
Yes agreed, I was going to work on this tonight. Are you okay with me taking it over? |
Would be very grateful. |
| # Generalize or move to dashboard example | ||
| # Could not get icon from ReactComponent so included it here | ||
|
|
||
| class ChangeIndicator(MaterialWidget): |
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 have not documented this one yet. I could not get it working without being a MaterialWidget, so I included it here. But I would like to give it a 2nd iteration later to find a more general API for a such a Card/ Indicator.
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.
What's wrong with it being a MaterialWidget?
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.
For me it ok. But there could be other Card like indicator widgets. I'm not sure what the most important/ generic are?
|
Didn't quite get there tonight, but will tomorrow. |
| margin=10, | ||
| height=550, | ||
| ) | ||
| timeline_config = [ |
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.
Actually thinking about it, I would prefer not to ship Timeline for the time being. It's still a mui/lab component which means it's not stable and it's also not a must have imo.
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.
The challenge I have is that I don't know how to get Icons working if its not a MaterialComponent.
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.
Would it be OK to introduce a .lab module with the same purpose as the Material UI lab concept? And then put the Timeline there?
Its a common thing. For example Streamlit has streamlit.experimental module.
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've moved the Timeline out of panel_material_ui to seperate example MaterialUIComponent. But now I have issues described in #190.










I believe a nice way to review this library before launch is to create one or more reference applications.
This PR adds a Dashboard reference application inspired by Creative Tim Dashboard.
In addition some bugs are fixed and enhancements contributed to enable creating the dashboard.
This PR is Closing:
Must have fixed
Nice to have fixed
Should do
tablepagecolorpicker for context menu.darksidebar mode working, i.e. set color to something readabletheme_configcorrectly to set background color of app.Could do
Creative Tim
Creative Panel