Skip to content

Commit d4939e3

Browse files
committed
Update to latest action button/link markup
1 parent 51b1ef7 commit d4939e3

23 files changed

+201
-90
lines changed

shiny/_versions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
shiny_html_deps = "1.11.0.9000"
1+
shiny_html_deps = "1.11.1.9000"
22
bslib = "0.9.0.9000"
33
htmltools = "0.5.8.9000"
44
bootstrap = "5.3.1"

shiny/ui/_input_action_button.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,15 @@ def input_action_button(
6161
if "_add_ws" not in kwargs:
6262
kwargs["_add_ws"] = True
6363

64+
if icon is not None:
65+
icon = tags.span(icon, class_="action-icon")
66+
67+
if label is not None:
68+
label = tags.span(label, class_="action-label")
69+
6470
return tags.button(
6571
{"class": "btn btn-default action-button", "style": css(width=width)},
6672
icon,
67-
# The separator element helps us distinguish between the icon and label
68-
# when dynamically updating the button/link (see rstudio/shiny#4242)
69-
tags.span(class_="shiny-icon-separator") if icon else None,
70-
# Adds a space between the icon and label
71-
# TODO: this space gets removed when icon/label are updated dynamically,
72-
# which is not ideal. The 'right' way to do this would be to either
73-
# add a CSS class to the separator element, or wrap both the icon and
74-
# label in a container element.
75-
" " if icon and label else None,
7673
label,
7774
id=resolve_id(id),
7875
type="button",
@@ -122,12 +119,15 @@ def input_action_link(
122119
* :func:`~shiny.reactive.event`
123120
"""
124121

122+
if icon is not None:
123+
icon = tags.span(icon, class_="action-icon")
124+
125+
if label is not None:
126+
label = tags.span(label, class_="action-label")
127+
125128
return tags.a(
126-
{"class": "action-button"},
129+
{"class": "action-button action-link"},
127130
icon,
128-
# The separator element helps us distinguish between the icon and label
129-
# when dynamically updating the button/link (see rstudio/shiny#4242)
130-
tags.span(class_="shiny-icon-separator") if icon else None,
131131
label,
132132
id=resolve_id(id),
133133
href="#",

shiny/www/shared/_version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"note!": "Generated by scripts/htmlDependencies.R: do not edit by hand",
33
"package": "shiny",
4-
"version": "1.11.0.9000 (rstudio/shiny@460a93a5fdc1f152d2ec3d5741a01c2712676526)"
4+
"version": "1.11.1.9000 (rstudio/shiny@ecf6bfe9a7696695c67c90fbf5901986a61c024c)"
55
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"note!": "Generated by scripts/htmlDependencies.R: do not edit by hand",
3-
"shiny_version": "1.11.0.9000 (rstudio/shiny@460a93a5fdc1f152d2ec3d5741a01c2712676526)",
4-
"bslib_version": "0.9.0.9000 (rstudio/bslib@c707161125dc5646ce2b9990ab474b7cedaef920)",
3+
"shiny_version": "1.11.1.9000 (rstudio/shiny@ecf6bfe9a7696695c67c90fbf5901986a61c024c)",
4+
"bslib_version": "0.9.0.9000 (rstudio/bslib@9562108e40a0bffb4a7c8709c2963509435c5c0f)",
55
"htmltools_version": "0.5.8.9000 (rstudio/htmltools@487aa0bed7313d7597b6edd5810e53cab0061198)",
66
"bootstrap_version": "5.3.1"
77
}

shiny/www/shared/bootstrap/bootstrap.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

shiny/www/shared/bslib/_version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"note!": "Generated by scripts/htmlDependencies.R: do not edit by hand",
33
"package": "bslib",
4-
"version": "0.9.0.9000 (rstudio/bslib@c707161125dc5646ce2b9990ab474b7cedaef920)"
4+
"version": "0.9.0.9000 (rstudio/bslib@9562108e40a0bffb4a7c8709c2963509435c5c0f)"
55
}

shiny/www/shared/bslib/components/components.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

shiny/www/shared/bslib/components/components.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

shiny/www/shared/bslib/components/components.min.js.map

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

shiny/www/shared/busy-indicators/busy-indicators.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)