Skip to content

Commit f0a1b3b

Browse files
committed
fix!: solara Meta and Navigator elements insert empty span into DOM (#625)
* fix[docs]: solara.Meta elements insert empty span into DOM * chore: remove workaround from jupyter notebook tutorial Reverts #627, since the workaround is no longer needed. * fix!: navigator would insert an empty span into dom
1 parent b7643d9 commit f0a1b3b

File tree

3 files changed

+50
-52
lines changed

3 files changed

+50
-52
lines changed

solara/components/head_tag.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<template><span></span></template>
1+
<template>
2+
</template>
23

34
<script>
45
module.exports = {

solara/website/pages/documentation/getting_started/content/04-tutorials/60-jupyter-dashboard-part1.py

Lines changed: 48 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -10,56 +10,54 @@
1010

1111
@solara.component
1212
def Page():
13-
with solara.Column(gap=0):
14-
title = "Build your Jupyter dashboard using Solara"
15-
solara.Meta(property="og:title", content=title)
16-
solara.Meta(name="twitter:title", content=title)
17-
solara.Title(title)
13+
title = "Build your Jupyter dashboard using Solara"
14+
solara.Meta(property="og:title", content=title)
15+
solara.Meta(name="twitter:title", content=title)
16+
solara.Title(title)
1817

19-
img = "https://dxhl76zpt6fap.cloudfront.net/public/docs/tutorial/jupyter-dashboard1.webp"
20-
solara.Meta(name="twitter:image", content=img)
21-
solara.Meta(property="og:image", content=img)
18+
img = "https://dxhl76zpt6fap.cloudfront.net/public/docs/tutorial/jupyter-dashboard1.webp"
19+
solara.Meta(name="twitter:image", content=img)
20+
solara.Meta(property="og:image", content=img)
2221

23-
description = "Learn how to build a Jupyter dashboard and deploy it as a web app using Solara."
24-
solara.Meta(name="description", property="og:description", content=description)
25-
solara.Meta(name="twitter:description", content=description)
26-
tags = [
27-
"jupyter",
28-
"jupyter dashboard",
29-
"dashboard",
30-
"web app",
31-
"deploy",
32-
"solara",
33-
]
34-
solara.Meta(name="keywords", content=", ".join(tags))
35-
with solara.Column():
36-
Notebook(
37-
Path(HERE / "_jupyter_dashboard_1.ipynb"),
38-
show_last_expressions=True,
39-
execute=False,
40-
outputs={
41-
"a7d17a84": None, # empty output (7)
42-
# original: https://github.com/widgetti/solara/assets/1765949/e844acdb-c77d-4df4-ba4c-a629f92f18a3
43-
"82f1d2f7": solara.Image("https://dxhl76zpt6fap.cloudfront.net/pages/docs/content/60-jupyter-dashboard-part1/map.webp"), # map (11)
44-
"3e7ea361": None, # (13)
45-
# original: https://github.com/widgetti/solara/assets/1765949/daaa3a46-61f5-431f-8003-b42b5915da4b
46-
"56055643": solara.Image("https://dxhl76zpt6fap.cloudfront.net/pages/docs/content/60-jupyter-dashboard-part1/view.webp"), # View (15)
47-
# original: https://github.com/widgetti/solara/assets/1765949/2f4daf0f-b7d8-4f70-b04a-c27542cffdb0
48-
"c78010ec": solara.Image("https://dxhl76zpt6fap.cloudfront.net/pages/docs/content/60-jupyter-dashboard-part1/page.webp"), # Page (20)
49-
# original: https://github.com/widgetti/solara/assets/1765949/a691d9f1-f07b-4e06-b21b-20980476ad64
50-
"18290364": solara.Image("https://dxhl76zpt6fap.cloudfront.net/pages/docs/content/60-jupyter-dashboard-part1/controls.webp"), # Controls
51-
"0ca68fe8": None,
52-
"fef5d187": None,
53-
# original: https://github.com/widgetti/solara/assets/1765949/f0075ad1-808d-458c-8797-e460ce4dc06d
54-
"af686391": solara.Image("https://dxhl76zpt6fap.cloudfront.net/pages/docs/content/60-jupyter-dashboard-part1/full-app.webp"), # Full app
55-
},
56-
)
57-
solara.Markdown(
58-
"""
59-
Explore this app live at [solara.dev](/apps/jupyter-dashboard-1).
22+
description = "Learn how to build a Jupyter dashboard and deploy it as a web app using Solara."
23+
solara.Meta(name="description", property="og:description", content=description)
24+
solara.Meta(name="twitter:description", content=description)
25+
tags = [
26+
"jupyter",
27+
"jupyter dashboard",
28+
"dashboard",
29+
"web app",
30+
"deploy",
31+
"solara",
32+
]
33+
solara.Meta(name="keywords", content=", ".join(tags))
34+
Notebook(
35+
Path(HERE / "_jupyter_dashboard_1.ipynb"),
36+
show_last_expressions=True,
37+
execute=False,
38+
outputs={
39+
"a7d17a84": None, # empty output (7)
40+
# original: https://github.com/widgetti/solara/assets/1765949/e844acdb-c77d-4df4-ba4c-a629f92f18a3
41+
"82f1d2f7": solara.Image("https://dxhl76zpt6fap.cloudfront.net/pages/docs/content/60-jupyter-dashboard-part1/map.webp"), # map (11)
42+
"3e7ea361": None, # (13)
43+
# original: https://github.com/widgetti/solara/assets/1765949/daaa3a46-61f5-431f-8003-b42b5915da4b
44+
"56055643": solara.Image("https://dxhl76zpt6fap.cloudfront.net/pages/docs/content/60-jupyter-dashboard-part1/view.webp"), # View (15)
45+
# original: https://github.com/widgetti/solara/assets/1765949/2f4daf0f-b7d8-4f70-b04a-c27542cffdb0
46+
"c78010ec": solara.Image("https://dxhl76zpt6fap.cloudfront.net/pages/docs/content/60-jupyter-dashboard-part1/page.webp"), # Page (20)
47+
# original: https://github.com/widgetti/solara/assets/1765949/a691d9f1-f07b-4e06-b21b-20980476ad64
48+
"18290364": solara.Image("https://dxhl76zpt6fap.cloudfront.net/pages/docs/content/60-jupyter-dashboard-part1/controls.webp"), # Controls
49+
"0ca68fe8": None,
50+
"fef5d187": None,
51+
# original: https://github.com/widgetti/solara/assets/1765949/f0075ad1-808d-458c-8797-e460ce4dc06d
52+
"af686391": solara.Image("https://dxhl76zpt6fap.cloudfront.net/pages/docs/content/60-jupyter-dashboard-part1/full-app.webp"), # Full app
53+
},
54+
)
55+
solara.Markdown(
56+
"""
57+
Explore this app live at [solara.dev](/apps/jupyter-dashboard-1).
6058
61-
Don’t miss the next tutorial and stay updated with the latest techniques and insights by subscribing to our newsletter.
62-
"""
63-
)
64-
location = solara.use_router().path
65-
MailChimp(location=location)
59+
Don’t miss the next tutorial and stay updated with the latest techniques and insights by subscribing to our newsletter.
60+
"""
61+
)
62+
location = solara.use_router().path
63+
MailChimp(location=location)

solara/widgets/vue/navigator.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<template>
2-
<span></span>
32
</template>
43
54
<script>

0 commit comments

Comments
 (0)