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

Express' value_box() no longer includes named positional args #966

Merged
merged 1 commit into from
Jan 3, 2024

Conversation

cpsievert
Copy link
Collaborator

@cpsievert cpsievert commented Jan 3, 2024

Currently a shiny.express.ui.value_box() must be created with positional arguments passed to the context manager.

from shiny.express import ui

with ui.value_box("title", "value"):
  pass

With this PR, those title and value positional args will go away in favor of taking the 1st 2 children as the title and value:

from shiny.express import ui

with ui.value_box():
  "title"
  "value"

Not only does this feel more "express-like" to me, but it'll be much easier to render reactive values.

@wch wch merged commit f926cc3 into main Jan 3, 2024
26 checks passed
@wch wch deleted the express-value-box branch January 3, 2024 21:43
schloerke added a commit that referenced this pull request Jan 8, 2024
* main: (24 commits)
  Use dynamic version of py-shiny for deploy tests (#970)
  Add underscores to hide some imports (#978)
  Add rsconnect json files(shinyapps.io tests) and folium tests (#928)
  Express' `value_box()` no longer includes named positional args (#966)
  Include `tooltip()` and `popover()` in express (#949)
  Remove extra call to run_express()
  Call `tagify()` early to intercept `AttributeErrors` (#941)
  Don't pass sidebar twice to navbar_page
  Update changelog
  Update changelog
  Switch from `requests` to `urllib` (#940)
  Bump version to 0.6.1.1
  Fix docstring for page_opts
  Fix API doc sections for Express
  Smarter, lazier, and more complete page default/api for express (#893)
  Change `express.layout` to `express.ui` (#904)
  Remove `@output` from examples (#790)
  feat: Allow for `App` `server=` to take `input` only (#920)
  Add fixes for type stub generation (#828)
  Move quarto express docs to bottom
  ...
schloerke added a commit that referenced this pull request Jan 9, 2024
* main:
  Use dynamic version of py-shiny for deploy tests (#970)
  Add underscores to hide some imports (#978)
  Add rsconnect json files(shinyapps.io tests) and folium tests (#928)
  Express' `value_box()` no longer includes named positional args (#966)
  Include `tooltip()` and `popover()` in express (#949)
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.

None yet

2 participants