From da08ad037d2637da66b93692105fc43165d116d2 Mon Sep 17 00:00:00 2001 From: mikebender Date: Thu, 12 Dec 2024 15:58:14 -0500 Subject: [PATCH 1/5] chore(version): ui-v0.24.0 --- package-lock.json | 2 +- plugins/ui/CHANGELOG.md | 15 +++++++++++++++ plugins/ui/setup.cfg | 2 +- plugins/ui/src/js/package.json | 2 +- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7d00aff72..e5e78cc13 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32318,7 +32318,7 @@ }, "plugins/ui/src/js": { "name": "@deephaven/js-plugin-ui", - "version": "0.23.1", + "version": "0.24.0", "license": "Apache-2.0", "dependencies": { "@deephaven/chart": "^0.99.0", diff --git a/plugins/ui/CHANGELOG.md b/plugins/ui/CHANGELOG.md index 28d768713..557e10ac6 100644 --- a/plugins/ui/CHANGELOG.md +++ b/plugins/ui/CHANGELOG.md @@ -2,6 +2,21 @@ All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines. - - - +## ui-v0.24.0 - 2024-12-12 +#### Bug Fixes +- UI loading duplicate panels in embed iframe (#1043) - (e1559a4) - Matthew Runyon +#### Documentation +- Working with Tables (#1059) - (6e73350) - dgodinez-dh +- Importing and Exporting Components (#1054) - (21b752c) - dgodinez-dh +- Your First Component (#1052) - (ce3843a) - dgodinez-dh +- Add Stack with tabs to dashboard docs (#1048) - (cf0c994) - mofojed +#### Features +- ui.meter (#1032) - (6730aa9) - ethanalvizo +- ui.avatar (#1027) - (2738a1d) - Akshat Jawne +- Toast Implementation (#1030) - (e53b322) - dgodinez-dh + +- - - + ## ui-v0.23.1 - 2024-11-23 - - - diff --git a/plugins/ui/setup.cfg b/plugins/ui/setup.cfg index 4a4948d6c..c7129cdab 100644 --- a/plugins/ui/setup.cfg +++ b/plugins/ui/setup.cfg @@ -3,7 +3,7 @@ name = deephaven-plugin-ui description = deephaven.ui plugin long_description = file: README.md long_description_content_type = text/markdown -version = 0.23.1.dev0 +version = 0.24.0 url = https://github.com/deephaven/deephaven-plugins project_urls = Source Code = https://github.com/deephaven/deephaven-plugins diff --git a/plugins/ui/src/js/package.json b/plugins/ui/src/js/package.json index 57c71f8b3..a51cc6cf4 100644 --- a/plugins/ui/src/js/package.json +++ b/plugins/ui/src/js/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/js-plugin-ui", - "version": "0.23.1", + "version": "0.24.0", "description": "Deephaven UI plugin", "keywords": [ "Deephaven", From 0d20b6a3aa0becb82d2d4290f64c70920aba7d84 Mon Sep 17 00:00:00 2001 From: mikebender Date: Thu, 12 Dec 2024 15:58:14 -0500 Subject: [PATCH 2/5] chore(version): update ui version to 0.24.0.dev0 --- plugins/ui/setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ui/setup.cfg b/plugins/ui/setup.cfg index c7129cdab..6af963036 100644 --- a/plugins/ui/setup.cfg +++ b/plugins/ui/setup.cfg @@ -3,7 +3,7 @@ name = deephaven-plugin-ui description = deephaven.ui plugin long_description = file: README.md long_description_content_type = text/markdown -version = 0.24.0 +version = 0.24.0.dev0 url = https://github.com/deephaven/deephaven-plugins project_urls = Source Code = https://github.com/deephaven/deephaven-plugins From 9d7a3b31c027ccc75e241570568aaf2b46326e09 Mon Sep 17 00:00:00 2001 From: mikebender Date: Thu, 12 Dec 2024 16:17:37 -0500 Subject: [PATCH 3/5] chore(version): plotly-express-v0.12.1 --- package-lock.json | 2 +- plugins/plotly-express/CHANGELOG.md | 6 ++++++ plugins/plotly-express/setup.cfg | 2 +- plugins/plotly-express/src/js/package.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index e5e78cc13..05d19d59e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32033,7 +32033,7 @@ }, "plugins/plotly-express/src/js": { "name": "@deephaven/js-plugin-plotly-express", - "version": "0.12.0", + "version": "0.12.1", "license": "Apache-2.0", "dependencies": { "@deephaven/chart": "0.97.0", diff --git a/plugins/plotly-express/CHANGELOG.md b/plugins/plotly-express/CHANGELOG.md index dace500b4..88b82fa39 100644 --- a/plugins/plotly-express/CHANGELOG.md +++ b/plugins/plotly-express/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines. - - - +## plotly-express-v0.12.1 - 2024-12-12 +#### Bug Fixes +- switch to webgl by default for line plot (#992) - (2c7bc01) - Joe + +- - - + ## plotly-express-v0.12.0 - 2024-11-23 #### Bug Fixes - `dx` now respects the webgl flag (#934) - (9cdf1ee) - Joe diff --git a/plugins/plotly-express/setup.cfg b/plugins/plotly-express/setup.cfg index 7c1405431..32da8ac31 100644 --- a/plugins/plotly-express/setup.cfg +++ b/plugins/plotly-express/setup.cfg @@ -3,7 +3,7 @@ name = deephaven-plugin-plotly-express description = Deephaven Chart Plugin long_description = file: README.md long_description_content_type = text/markdown -version = 0.12.0.dev0 +version = 0.12.1 url = https://github.com/deephaven/deephaven-plugins project_urls = Source Code = https://github.com/deephaven/deephaven-plugins diff --git a/plugins/plotly-express/src/js/package.json b/plugins/plotly-express/src/js/package.json index 5bf082ab3..61c4739ef 100644 --- a/plugins/plotly-express/src/js/package.json +++ b/plugins/plotly-express/src/js/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/js-plugin-plotly-express", - "version": "0.12.0", + "version": "0.12.1", "description": "Deephaven plotly express plugin", "keywords": [ "Deephaven", From 3b34be4e91d402ddf61c8ae3518ba2e5a6f616eb Mon Sep 17 00:00:00 2001 From: mikebender Date: Thu, 12 Dec 2024 16:17:37 -0500 Subject: [PATCH 4/5] chore(version): update plotly-express version to 0.12.1.dev0 --- plugins/plotly-express/setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/plotly-express/setup.cfg b/plugins/plotly-express/setup.cfg index 32da8ac31..501796c6c 100644 --- a/plugins/plotly-express/setup.cfg +++ b/plugins/plotly-express/setup.cfg @@ -3,7 +3,7 @@ name = deephaven-plugin-plotly-express description = Deephaven Chart Plugin long_description = file: README.md long_description_content_type = text/markdown -version = 0.12.1 +version = 0.12.1.dev0 url = https://github.com/deephaven/deephaven-plugins project_urls = Source Code = https://github.com/deephaven/deephaven-plugins From 0ce76342ed9c2d1ce707bba3bb59956064023996 Mon Sep 17 00:00:00 2001 From: dgodinez-dh <77981300+dgodinez-dh@users.noreply.github.com> Date: Fri, 13 Dec 2024 08:50:13 -0700 Subject: [PATCH 5/5] docs: Conditional Rendering (#1060) https://deephaven.atlassian.net/browse/DOC-224 --------- Co-authored-by: margaretkennedy <82049573+margaretkennedy@users.noreply.github.com> Co-authored-by: Mike Bender --- .../docs/_assets/conditional_rendering1.png | Bin 0 -> 8388 bytes .../docs/_assets/conditional_rendering2.png | Bin 0 -> 9173 bytes .../docs/_assets/conditional_rendering3.png | Bin 0 -> 6532 bytes .../docs/describing/conditional_rendering.md | 191 ++++++++++++++++++ plugins/ui/docs/sidebar.json | 4 + 5 files changed, 195 insertions(+) create mode 100644 plugins/ui/docs/_assets/conditional_rendering1.png create mode 100644 plugins/ui/docs/_assets/conditional_rendering2.png create mode 100644 plugins/ui/docs/_assets/conditional_rendering3.png create mode 100644 plugins/ui/docs/describing/conditional_rendering.md diff --git a/plugins/ui/docs/_assets/conditional_rendering1.png b/plugins/ui/docs/_assets/conditional_rendering1.png new file mode 100644 index 0000000000000000000000000000000000000000..16dbe5eaf07b12194470018825d804da2bfb9082 GIT binary patch literal 8388 zcmeHsX;4#Hv~Fw#x<$Zt0E7SzD9tR25}D$}WFyE7f}o;+j0r)45I{lO1|&4v2o51O zXb{3+njs*B7zF|{#E6U`gUnMBrT`(+J9z8Wdw*WleO0gS{quh0q|UC|`|P#$THp7r zwKFccI4Et`*bV}Ll$;#TyMsVm!648UgP-Mr5p1J(F7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)-4m?Stu<;q;}nkdGesn1t1mZJ=f^#n8Aen z9jqYZ8&KrHt=GM{aPr}63jo!3qq*Xj{(QIOm1EDV3R^eTkZEO0+Y4RK$3KS|(QZsx zI>EZyKH^sdNd(eUXpjbEW^bM*+#(s99k+cjCBExy*Og8z5P^`-0O5HWmG~UHJO^)F zMyy>p8#?ScmDv_ueub~i@VhFFw+TO2MJv7Gb6{gJHjPt|q{>}M))7>O=^CV~&j#Hz zdjs4dx^Tg1#cH6TysVzI#T%!wCI@La|0t+)4&F`@b!W=ank^S; zAMxX;2E5T`bh+?%Z*!nuen@Aq&+CZH`vi_u{%+&yG~Q;UCx0ENS{kS3)y=MevpClK;6Trt|MI*7AwV z0wG|ISPO4Sn{g~Lzb(Jfps*!AMY^-QZ{&GaPN93A;`1MU&6mTcooY3GXCQ#}CRtu;n+XFE4a>y zs<^WSbaxC;x$QXj!&{~26p4mT=i}=1mT2Sk&0p{Q%sG=}aZ=m3b*VU%zDXCD5J8Hb zcWS$~@}Qs2-O=^2OD2_i3EwUT~7uR z-+#eMflFL4cO&b`Tx8I?eJNYZQ0EYe*!w}-U7%PkdvLu`O33b)BXqKg#c>+ literal 0 HcmV?d00001 diff --git a/plugins/ui/docs/_assets/conditional_rendering2.png b/plugins/ui/docs/_assets/conditional_rendering2.png new file mode 100644 index 0000000000000000000000000000000000000000..98075135db1291f90ec898773fd58a167b2581b8 GIT binary patch literal 9173 zcmeHtXH--9*KQn9R1{PcFa%IwM1>KN7Nm`eprAC7AXN#{ODNJq98ejA1nD3pqezoB z5g~+7WQ1hsy_X=N7$AwEBtRg%C(i%gwQl*}5AV9`UH8NNKv?G_`JMds+535({p=HG zZfbPw2>1vH1Uh!-wt*!Gv>yTj?UOxp5I7U~ZEy$pw=dAr=mw~w8$tsP1l+FQyAA^3 z5`}gi9{`RIBW^zo1c6Ql@&EQsyUK)uKysdU46a*+I?|_*-Vhpc)Zb}8Irx$G^^|LI zNiC+6pprh~A3orGkL_2%aX%sNT;L=Jik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r)V-0@B-FKOEZ(?qDE;OrDi62C^uS~R@U-`{FA3v@= zJ+DPmEJ5D^=rkH#e^na^QA@OIP#F$$pmot~!Ul5;hu|X3eTU+C)F2l-wcuXDCba*ypbH$M$tzgFm4;1&mp!yZShv6*xu$N&nsH8~cbp;_4 z7(%Wi&pZ1k!k};dr8L=A3u}BH9j&^VWjPepXz26!9qy4%1o;Cg@LK=HduY+!&KQuS zzJC0Yw`*5xpjk<~K-bwHn^<`r4VQOS^tdqTbvN6yV$3~E+o7{TtfS-3@gT8u1>0r| z!f=D!P)8Bap-lG&1DlAFzKslfNBmVsJ@OrA>8>`^7QX;Inh?x*9i6Y9c1i0i@rsnFoey`% zea-h_8+&}}N7GX!#Cex4aCd{0HJoX%>}$OtxYm}Ljf?d9sJaW}`{?-F14e7K*|x(d zHpcu|Iq`nMx!1_0Q0MjBt>X9i@_SC4b^o%vY4FXRE|-aLB_~g`Vs88kPp{6Ywosqm z8WKC8bMoP`-ex5adg+dNYOEbs^5yIfdZ;^d`^#2ls5(&w1d^ERJ13iAI#Oy<%y_ohr^leCXq1s=Zvf$rQgHK@4pDEdDD@mWmb literal 0 HcmV?d00001 diff --git a/plugins/ui/docs/_assets/conditional_rendering3.png b/plugins/ui/docs/_assets/conditional_rendering3.png new file mode 100644 index 0000000000000000000000000000000000000000..feae519d1a90bd82b56f38883392b44d8e1536f8 GIT binary patch literal 6532 zcmeHMX;f3mwmyhTw}>dC3V~Ky866M>OdyC2#DRuJnPe1$pv({i1VU6AQKmE^gCfKx zGAIHDnn?^n5dt!G8W}So0htUj3<)9AJ9yuE_uaMbk9*%*@8A7#a#FRb>eSw~_qV^j z>;5ke2!(BXw*dg4aQ2MN1pttRfd8f6Z3TZHid#~_mkjCx;xtg*uQ>-cHV0b&Yz+Ve zth~r?3)ucX;>;x!04POoJTi;`?Kl9~v*)ahwR4;go9-B_dA)cdl9Zluo6abndo)+I zM}4~y>{WszA(dW~m;QLJc$4tT+uAK1UDV4zSzoyPQ}T`!g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9i#$!vwI>(&p#2HW@ChK5ia$H5^>d zJVPGCr;?8R&-8ZXZkd0Z6gJer+iW)$EN2Seb&;Qx<%ymF%Q%|vpWBe9 za(FJOL7!IVFNAPDQ@F;i95tVC@)@Kc=2N{Gy)+xQHb2YR0^G7fm75Uf7tfg-9@gUd zR9bip_)zb63PIL+zP^!DU+y%(qsJW|P6*v7+W>*&IU91WV6^M>m6n(~;ds$>(Pxzx z9cJ1{K3H9V3Qc7XXnbV`i4$3$mPh0AJIj^|U2D<+bZxR zZb!o)Bk*8ZwHg)_;mgd!5~R`RCBwZN6(<2|A?-A3o6GWt&Hy8yU^dk&S`w!J0?j#6 z@kfnawCv}d6ysHky@DC|qSsiLbG-FO;`o(#RZz)e`nCw&P2+AyAE$TKS)*HDy|G*k zVq3TRo(SU90&!#VX~ZzQP~kNSCB91C9AZ*a$5O3s*hoOkUpuNmt_Evw4ZjbYunzx$ z>18AFJ5W|g_1H!6;837p;%ZqJ!Mk6=x?t~B zn9&VaHuiZP?kQAj7L>5~?;EP&oX>kWF z*XYN`HGydZUz$vriN8#QAx-kM2Rdo283JYWz8!pezCGS3k(qSsGKzRcO}BomfWfIh za?m4|^1+9hBsl(AtFQAk+a)A$*F{Vek?2^4&adn&EDgbx6V^k@V5-{zV3hgX4zZv= zHTIMgS6)%Z^R8Ultp_i%FyRhf2$^d9qmRk=GaS}(L5hY4ztk7G6RC`vD3hR79{fn) zB){D!xYZ}KS-p^$Dr?$sMJGLNJ}x0)(47`v%b=HYWAw{Nhr>Yq+&ww8k?i$b{hxEd zzr(}7kTCvd@PG9DzpexRp_uUhYa4&&bEPsWNtin+uSnpH33wr4>tIuT`tqIs0<@Dk A3jhEB literal 0 HcmV?d00001 diff --git a/plugins/ui/docs/describing/conditional_rendering.md b/plugins/ui/docs/describing/conditional_rendering.md new file mode 100644 index 000000000..bd92cec11 --- /dev/null +++ b/plugins/ui/docs/describing/conditional_rendering.md @@ -0,0 +1,191 @@ +# Conditional Rendering + +Your components will often need to display different things depending on different conditions. In `deephaven.ui`, you can conditionally render components using Python syntax like if statements, the `and` operator, and the ternary operator. + +## Conditional returning + +Consider a `packing_list` component rendering several `item` components, which can be marked as packed or not: + +```python +from deephaven import ui + + +@ui.component +def item(name, is_packed): + return ui.text("- ", name) + + +@ui.component +def packing_list(): + return ui.flex( + ui.heading("Packing list"), + item("Clothes", is_packed=True), + item("Shoes", is_packed=True), + item("Wallet", is_packed=False), + direction="column", + ) + + +my_packing_list = packing_list() +``` + +![my_packing_list](../_assets/conditional_rendering1.png) + +Some of the `item` components have their `is_packed` prop set to `True` instead of `False`. + +To add a checkmark (✅) to packed items if `is_packed=True`, you can write an if/else statement like so: + + +```python +from deephaven import ui + + +@ui.component +def item(name, is_packed): + if is_packed: + return ui.text("- ", name + " ✅") + return ui.text("- ", name) + + +@ui.component +def packing_list(): + return ui.flex( + ui.heading("Packing list"), + item("Clothes", is_packed=True), + item("Shoes", is_packed=True), + item("Wallet", is_packed=False), + direction="column", + ) + + +my_packing_list = packing_list() +``` + +![my_packing_list2](../_assets/conditional_rendering2.png) + +Notice you are creating branching logic with Python's `if` and `return` statements. In `deephaven.ui`, control flow (like conditions) is handled by Python. + +### Conditionally return nothing with `None` + +In some situations, you do not want to render anything at all. For example, you do not want to show any packed items. A component must return something. In this case, you can return `None`: + +```python +from deephaven import ui + + +@ui.component +def item(name, is_packed): + if is_packed: + return None + return ui.text("- ", name) + + +@ui.component +def packing_list(): + return ui.flex( + ui.heading("Packing list"), + item("Clothes", is_packed=True), + item("Shoes", is_packed=True), + item("Wallet", is_packed=False), + direction="column", + ) + + +my_packing_list = packing_list() +``` + +![my_packing_list3](../_assets/conditional_rendering3.png) + +If `is_packed` is `True`, the component will return nothing. Otherwise, it will return a component to render. + +In practice, returning `None` from a component is not common because it might surprise a developer trying to render it. More often, you would conditionally include or exclude the component in the parent component. The next section explains how to do that. + +## Conditionally including components + +In the previous example, you controlled which component would be returned by using an [`if`/`else` statement](https://docs.python.org/3/tutorial/controlflow.html#if-statements). This led to some code duplication. You can remove this duplication by conditionally including components. + +### Conditional ternary + +Python has a [ternary conditional](https://docs.python.org/3/reference/expressions.html#conditional-expressions) in the form: `a if condition else b`. This can simplify the `item` component. + +```python +from deephaven import ui + + +@ui.component +def item(name, is_packed): + return ui.text("- ", name + " ✅" if is_packed else name) + + +@ui.component +def packing_list(): + return ui.flex( + ui.heading("Packing list"), + item("Clothes", is_packed=True), + item("Shoes", is_packed=True), + item("Wallet", is_packed=False), + direction="column", + ) + + +my_packing_list = packing_list() +``` + +### Logical `and` operator + +Another common shortcut is the Python [logical `and` operator](https://docs.python.org/3/reference/expressions.html#and). Inside `deephaven.ui` components, it often comes up when you want to render a component when the condition is `True`, or render nothing otherwise. With `and`, you could conditionally render the checkmark only if `is_packed` is `True`: + +```python +from deephaven import ui + + +@ui.component +def item(name, is_packed): + return ui.text("- ", name, is_packed and " ✅") + + +@ui.component +def packing_list(): + return ui.flex( + ui.heading("Packing list"), + item("Clothes", is_packed=True), + item("Shoes", is_packed=True), + item("Wallet", is_packed=False), + direction="column", + ) + + +my_packing_list = packing_list() +``` + +A Python `and` expression returns the value of its right side (in our case, the checkmark) if the left side (our condition) is `True`. But if the condition is `False`, the whole expression becomes `False`. `deephaven.ui` considers `False` to be like `None` and does not render anything in its place. + +### Conditionally assigning to a variable + +When the shortcuts get in the way of writing plain code, try using an `if` statement and a variable. You can reassign variables, so start by providing the default content you want to display. Use an `if` statement to reassign an expression to `item_content` if `is_packed` is `True`. + +```python +from deephaven import ui + + +@ui.component +def item(name, is_packed): + item_content = name + if is_packed: + item_content = name + " ✅" + return ui.text("- ", item_content) + + +@ui.component +def packing_list(): + return ui.flex( + ui.heading("Packing list"), + item("Clothes", is_packed=True), + item("Shoes", is_packed=True), + item("Wallet", is_packed=False), + direction="column", + ) + + +my_packing_list = packing_list() +``` diff --git a/plugins/ui/docs/sidebar.json b/plugins/ui/docs/sidebar.json index cce11e0b9..fbbb118d1 100644 --- a/plugins/ui/docs/sidebar.json +++ b/plugins/ui/docs/sidebar.json @@ -36,6 +36,10 @@ { "label": "Working with Tables", "path": "describing/work_with_tables.md" + }, + { + "label": "Conditional Rendering", + "path": "describing/conditional_rendering.md" } ] },