Open thuydotm opened 1 day ago
The code below lists and compares all features for Panel, and Panel material UI Button widgets to find out what's missing and what's new.
import pandas as pd import panel as pn import panel_material_ui as pnui from bokeh.models.widgets.tables import BooleanFormatter pn.extension('tabulator', template='material', defer_load=True) def callback(event): print("event", event) widget = "Button" pnw = eval(f"pn.widgets.{widget}")(name="panel button") puiw = eval(f"pnui.widgets.{widget}")(name="panel ui button", tooltip="default") pnw.servable() puiw.servable() pn_dir = sorted(dir(eval(f"pn.widgets.{widget}"))) pnui_dir = sorted(dir(eval(f"pnui.widgets.{widget}"))) comparison_df = pd.DataFrame({ "Item": sorted(set(pn_dir + pnui_dir)), "Panel": [item in pn_dir for item in sorted(set(pn_dir + pnui_dir))], "Panel Material UI": [item in pnui_dir for item in sorted(set(pn_dir + pnui_dir))] }) pn.widgets.Tabulator( comparison_df.sort_values(by=['Panel Material UI', 'Panel'], ascending=[True, True]), formatters={ "Panel": BooleanFormatter(), "Panel Material UI": BooleanFormatter(), }, ).servable()
Missing and extra features for Button widget:
Missing and extra features for ButtonIcon widget:
Missing and extra features for Toggle widget:
The code below lists and compares all features for Panel, and Panel material UI Button widgets to find out what's missing and what's new.