Skip to content

feat: update to latest shiny JS/CSS assets #2020

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cpsievert
Copy link
Collaborator

@cpsievert cpsievert changed the title Grab new shiny JS/CSS assets feat: update to latest shiny JS/CSS assets Jun 27, 2025
Comment on lines +70 to +75
# Adds a space between the icon and label
# TODO: this space gets removed when icon/label are updated dynamically,
# which is not ideal. The 'right' way to do this would be to either
# add a CSS class to the separator element, or wrap both the icon and
# label in a container element.
" " if icon and label else None,
Copy link
Collaborator Author

@cpsievert cpsievert Jun 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This obviously isn't ideal, and long-term this isn't the approach to spacing that we'd want, but I'm thinking I'll just keep it to retain the current behavior.

Copy link
Collaborator Author

@cpsievert cpsievert Jun 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, the old JS logic would (unconditionally, for both button and links!!) add a space when updating to either the icon or label

https://github.com/rstudio/shiny/blob/33dc41c/srcts/src/bindings/input/actionbutton.ts#L73

This is a big bummer because, unless we add the space in the server-side update, the space gets removed on update 😭

cc @gadenbuie

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before we make a decision here, I'm gonna look into rstudio/shiny#4249 as a possible direction

@cpsievert cpsievert requested a review from gadenbuie June 27, 2025 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant