Skip to content

Conversation

@MarcSkovMadsen
Copy link
Collaborator

@MarcSkovMadsen MarcSkovMadsen commented Apr 11, 2025

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

  • Get dark theme including Switch working
  • Add missing table to table page
  • Create custom color picker for context menu.
  • Get dark sidebar mode working, i.e. set color to something readable
  • Figure out how to use theme_config correctly to set background color of app.
  • Format and refactor code to make it readable and maintainable.
  • Make app accessible as showcase and learning tool
    • Add picture or video of App to README or docs.
    • Make tutorials
    • Deploy app

Could do

  • Speed up app to make it load super fast.
  • Layout dashboard in grid
  • Make it work on mobile.

Creative Tim

image

Creative Panel

image

image

image

This was linked to issues Apr 11, 2025
This was referenced Apr 11, 2025
@MarcSkovMadsen
Copy link
Collaborator Author

MarcSkovMadsen commented Apr 12, 2025

Don't know why, but HTML panes suddenly started having invinsible context

image

And when I replace HTML pane with pn.panel it choses Markdown pane and does not display icons?

image

@MarcSkovMadsen
Copy link
Collaborator Author

MarcSkovMadsen commented Apr 20, 2025

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.

image

I think what is needed is something built on top of List.

image

Unfortunately the ListItemButton does not take the color or variant props.

@MarcSkovMadsen
Copy link
Collaborator Author

I can see that a List item has been implemented. As its not documented in any way its hard to know if it can be used. One problem is that its buttons does not support href property.

@MarcSkovMadsen
Copy link
Collaborator Author

MarcSkovMadsen commented Apr 20, 2025

This PR now contains a Timeline component which can look like

image

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

image

@MarcSkovMadsen
Copy link
Collaborator Author

MarcSkovMadsen commented Apr 21, 2025

The PR will add an Icon indicator widget.

import panel as pn
from panel_material_ui import Icon

Icon(
    value="home"
).servable()

image

@MarcSkovMadsen
Copy link
Collaborator Author

This PR will include a ChangeIndicator component. Currently its a part of panel-material-ui because I cannot figure out how to show icons if not in a MaterialWidget.

ChangeIndicator(
        title="Today's Money", icon="weekend", value="$53,000", change_percent=55, since="since yesterday", sizing_mode="stretch_width"
    )

image

@MarcSkovMadsen
Copy link
Collaborator Author

MarcSkovMadsen commented Apr 21, 2025

This PR now includes a Drawer component.

image

image

@philippjfr
Copy link
Contributor

Yes agreed, I was going to work on this tonight. Are you okay with me taking it over?

@MarcSkovMadsen
Copy link
Collaborator Author

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):
Copy link
Collaborator Author

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.

Copy link
Contributor

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?

Copy link
Collaborator Author

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?

@philippjfr
Copy link
Contributor

Didn't quite get there tonight, but will tomorrow.

margin=10,
height=550,
)
timeline_config = [
Copy link
Contributor

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.

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

@MarcSkovMadsen MarcSkovMadsen Apr 26, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Seperate Drawer component Enable me to create link buttons TextInput size not working

2 participants