Skip to content
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

WebComponent pane to dramatically speed up creating new widgets in Panel #1122

Closed
wants to merge 61 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
62d090c
found out HTML can not be used for web component as it does not obser…
Feb 28, 2020
43f5f0f
start
Feb 28, 2020
a773729
proof of concept
Feb 28, 2020
e9a828e
refactor and more examples
Feb 28, 2020
79f0ccc
removed
Feb 28, 2020
bcff9ae
use the new extension build
xavArtley Feb 28, 2020
3e1b9d5
lots of refactoring. added some tests.
Feb 29, 2020
8612254
added attributes_to_sync and some functionality to support it
Feb 29, 2020
819d272
added support for custom parameters
Mar 1, 2020
35aca33
add synchronization from parameters to html, many tests and much more
Mar 1, 2020
106af73
change wired bundle
Mar 1, 2020
87cb099
small changes on top of wired-slider investigations
Mar 1, 2020
acd9c0e
first iteration on a reference example
Mar 1, 2020
c1969b2
added properties_to-watch functionality
Mar 2, 2020
9f0fd91
handled initial sync of parameters to properties
Mar 2, 2020
1b6bd15
added first iteration of wired-input
Mar 2, 2020
12484b7
concept for watching events like click added
Mar 3, 2020
4343aae
clean up
Mar 3, 2020
6c450aa
now the properties_to_watch are checked for changes when an events_to…
Mar 3, 2020
d121ede
added first iteration of wired reference example
Mar 3, 2020
bae897e
bugfix
Mar 4, 2020
b42c6fa
added support for object selector
Mar 4, 2020
8db8063
Added Wired Calendar and more wired functionality in general
Mar 4, 2020
910452d
bug fixes, support for nested properties, more wired elements, slider…
Mar 5, 2020
097b104
replace var with let
Mar 5, 2020
f306a78
added wired-link and some bug fixes
Mar 5, 2020
bb39f33
wired-progress, refactoring and more tests
Mar 5, 2020
37d1801
added parameters_to_watch_property and refactored to use this
Mar 6, 2020
a7cf614
added wired SearchInput, TextArea, Toggle and Video widgets.
Mar 7, 2020
3d5372f
added support for executing script tags
Mar 7, 2020
e5fe8af
added WebDataRocks test
Mar 7, 2020
34e1ac1
changes to WebDataRocks
Mar 7, 2020
53e6332
started work on perspective viewer (Not perspective)
Mar 8, 2020
e154c06
comment on not implemented functionality
Mar 8, 2020
3bb2218
first version of data transfer via ColumnDataSource
Mar 9, 2020
0423ba3
added column_data_source_orient and column_data_source_load_function …
Mar 10, 2020
4a9e4fc
added MutationObserver. Cannot communicate server<->client yet
Mar 10, 2020
dfea5c0
almost got perspective-viewer working. columns-pivot parameter does n…
Mar 12, 2020
37cb14d
fix issue with multiple mutations only sending the final mutation to …
Mar 13, 2020
32c9406
believe I get the attributes comm working. Now only clean up and more…
Mar 13, 2020
6dbaf5b
removed console.log
Mar 13, 2020
e89e84c
refactor and clean up
Mar 13, 2020
8a8aad0
added docstrings
Mar 13, 2020
26650ae
removed print statements
Mar 13, 2020
39d374e
added more documentation
Mar 13, 2020
57df9b7
clean up and questions for @Philippfr
Mar 13, 2020
0e0d602
clean + lots of questions for @Philippfr
Mar 13, 2020
ff877b1
fix some wired todos and a .ts bug
Mar 14, 2020
a96e17a
Started working on model viewer. Have issues.
Mar 14, 2020
d794089
started testing if wired works with pn.Param and fixed some problems.
Mar 14, 2020
6451401
added echarts/ pyecharts. The only functionality missing seems to be …
Mar 15, 2020
027d705
Added ECharts example. Does not work in Notebook. But works with .show
Mar 15, 2020
1c71519
got echarts to automatically resize
Mar 15, 2020
cb5cec2
remove som experiment files that should not go to holoviz master
Mar 15, 2020
a3118eb
fix textinput init issue
Mar 19, 2020
c808007
incremental work on aligning wired widgets with original widgets
Mar 20, 2020
f7934a5
alignment of panel widget and wired widget parameters
Mar 21, 2020
2173f7b
maturing wired components
Mar 22, 2020
499d09b
fix bugs and errors
Mar 22, 2020
3998560
Merge branch 'master' of https://github.com/holoviz/panel into web_co…
Apr 5, 2020
aaf903b
change bk to bokeh
Apr 5, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -119,3 +119,5 @@ builtdocs/
.vscode/
.vscode/panel.code-workspace
discover/

node_modules/*
146 changes: 146 additions & 0 deletions examples/reference/components/wired.ipynb
@@ -0,0 +1,146 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import panel as pn\n",
"pn.extension()\n",
"pn.config.sizing_mode=\"stretch_width\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Wired Components - Reference Example\n",
"\n",
"[Wired Elements](https://github.com/wiredjs/wired-elements) is a series of basic UI Elements that have a hand drawn look. These can be used for wireframes, mockups, or just the fun hand-drawn look.\n",
"\n",
"For a live demo see the [Wired Showcase](https://wiredjs.com/showcase.html)\n",
"\n",
"----\n",
"\n",
"<img src=\"https://wiredjs.com/images/logo_400.png\"></img>"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from panel.components import wired\n",
"js = \"\"\"\n",
"<script src=\"https://unpkg.com/@webcomponents/webcomponentsjs@2.2.7/webcomponents-loader.js\"></script>\n",
"<script src=\"https://wiredjs.com/dist/showcase.min.js\"></script\n",
"\"\"\"\n",
"js_files_pane = pn.pane.HTML(js)\n",
"style = \"\"\"\n",
"<style>\n",
"body {\n",
" font-family: 'Gloria Hallelujah', sans-serif;\n",
"}\n",
"</style>\n",
"\"\"\"\n",
"style_pane = pn.pane.HTML(style)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"button = wired.Button()\n",
"radio_button = wired.RadioButton()\n",
"check_box = wired.CheckBox()\n",
"check_box_checked = wired.CheckBox(checked=True)\n",
"slider = wired.Slider()\n",
"wired_input = wired.Input()\n",
"combobox = wired.ComboBox(html=\"\"\"<wired-combo id=\"colorCombo\" selected=\"red\" role=\"combobox\" aria-haspopup=\"listbox\" tabindex=\"0\" class=\"wired-rendered\" aria-expanded=\"false\"><wired-item value=\"red\" aria-selected=\"true\" role=\"option\" class=\"wired-rendered\">Red</wired-item><wired-item value=\"green\" role=\"option\" class=\"wired-rendered\">Green</wired-item><wired-item value=\"blue\" role=\"option\" class=\"wired-rendered\">Blue</wired-item></wired-combo>\"\"\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": false
},
"outputs": [],
"source": [
"pn.Column(\n",
" js_files_pane, style_pane,\n",
" button, pn.Param(button, parameters=[\"html\"] + list(button._child_parameters())), pn.layout.Divider(),\n",
" check_box, pn.Param(check_box, parameters=[\"html\"]+list(check_box._child_parameters())), pn.layout.Divider(),\n",
" check_box_checked, pn.Param(check_box_checked, parameters=[\"html\"]+list(check_box_checked._child_parameters())), pn.layout.Divider(),\n",
" radio_button, pn.Param(radio_button, parameters=[\"html\"]+list(radio_button._child_parameters())), pn.layout.Divider(),\n",
" slider, pn.Param(slider, parameters=[\"html\"]+list(slider._child_parameters())), \"**The slider value cannot be set programmatically**. See [Wired Issue](https://github.com/wiredjs/wired-elements/issues/121#issue-573516963)\", pn.layout.Divider(),\n",
" combobox, pn.Param(combobox, parameters=[\"html\"]+list(combobox._child_parameters())), pn.layout.Divider(),\n",
" wired_input, pn.Param(wired_input, parameters=[\"html\"]+list(wired_input._child_parameters())), pn.layout.Divider(),\n",
" background=None\n",
")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Adding Hand Drawn Plots to the mix\n",
"\n",
"Using `matplotlib.pyplot.xkcd` ([link](https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.xkcd.html)) you can actually sprinkle in some plots that look handdrawn.\n",
"\n",
"\n",
"![hand drawn plot](https://matplotlib.org/3.1.1/_images/sphx_glr_xkcd_001.png)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Contributors\n",
"\n",
"- [Marc Skov Madsen](https://datamodelsanalytics.com)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"str(type(button)).split(\".\")[3][:-2]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "panel",
"language": "python",
"name": "panel"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.4"
}
},
"nbformat": 4,
"nbformat_minor": 4
}