* fix: supply and retain default selectize.js plugins (for py-shiny)
* `npm run build` (GitHub Actions)
* Move more in a 'remove_button' attribute direction
* `npm run build` (GitHub Actions)
* Move to a JSON-only approach
* `npm run build` (GitHub Actions)
* Drop sticky update logic by always sending 'missing' value and resolving client-side
* Cleanup
* Don't mutate options; better typing pattern
* `npm run build` (GitHub Actions)
---------
Co-authored-by: cpsievert <cpsievert@users.noreply.github.com>
* Revert changes in 8861645d99 from #4252
We compile from R sass. So we should be partial to R's compiler, no the latest in npm
* Restore original compile script (with message) that built using R-sass, not npm
* Add step in build command to update the sass output
* run new command
* Put action icon and label into containers
* Update snaps
* More robust test
* Don't include container if icon/label isn't specified
* `yarn build` (GitHub Actions)
* Send HTML string/deps on update; update news
---------
Co-authored-by: cpsievert <cpsievert@users.noreply.github.com>
* v1.11.1 release candidate
* `yarn build` (GitHub Actions)
* Revert actionButton()/actionLink() implementation to v1.11.0's behavior (re-introducing #4239)
* Minimal fix to address the regression in #4239
Ideally we'd fix this issue, and also get updateActionButton() working with HTML labels, but thanks to today's release of kinesis (which snapshots all of actionButton()s markup), and CRAN dragging their feet to accept our original submission (which was fine, by the way), we can't have nice things
* `yarn build` (GitHub Actions)
---------
Co-authored-by: cpsievert <cpsievert@users.noreply.github.com>
* Revert the addition of spacing between icon and label in actionButton()
* `yarn build` (GitHub Actions)
---------
Co-authored-by: cpsievert <cpsievert@users.noreply.github.com>
* Close#4239: fix front-end action button label updating logic (follow up to #3996)
* Update news
* Use a separator instead of putting markup in attributes
* `yarn build` (GitHub Actions)
* Address feedback
* Cleanup
* Refactor into a single method to split icon/label
* `yarn build` (GitHub Actions)
* Better naming
* Add some padding to the separator
* Add some unit tests for R logic
* Update NEWS.md
* Update NEWS.md
* Update NEWS.md
* Update NEWS.md
* Increase backcompat (keep same R structure when no icon is provided)
* Refine comment
---------
Co-authored-by: cpsievert <cpsievert@users.noreply.github.com>
* feat(InputBinding): subscribe callback now supports event priority
* Update NEWS.md
* Update srcts/src/shiny/bind.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* `yarn build` (GitHub Actions)
* Simpler and more consistent typing
* Support a suitable object as input
* Provide a type for the callback itself, not just the valueit's given
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: cpsievert <cpsievert@users.noreply.github.com>
* fix(examples-shiny): use shiny.min.css in 08_html to avoid 404 (#4220)
* Update NEWS.md
* Minimize all the files
---------
Co-authored-by: Carson Sievert <cpsievert1@gmail.com>
* Bugfix for error found when calling shiny::shinyAppTemplate without library(shiny)
* Update news
* Update NEWS.md
---------
Co-authored-by: Carson <cpsievert1@gmail.com>
* fix: Fix checking if `scope` is a jquery element
Fixesrstudio/bslib#1159
* refactor: Don't check binding validity if `scope` isn't an element
* fix(insertTab): Render inserted nav html only once
* chore: Don't need to delay binding
* fix: Bind all after inserting nav controls
Output bindings require outputs to be attached to the DOM.
* chore: align comment
* chore: Add news item
* Make sure spinner is visible when htmlwidget errors are visible
* Give recalculating outputs a min-height large enough to show the spinner
* tableOutput() now gets the spinner treatment
* yarn run bundle_extras
* Forward visibility hidden for all recalculating widgets, not just those with a error message (otherwise spinner won't be visible after a req())
* Update news
* fix: Schedule modal removal for transitioning modals
* refactor: Simplify and both call and schedule modal hiding at same time
* Increment version number to 1.10.0.9000
* docs: Add NEWS entry
* Fix#4135: Plot outputs incorrectly sized inside scaled outputs
CSS zoom property affects el.getBoundingClientRect() but not
el.offsetWidth/Height. When reporting sizes of outputs from
client to server, we need to back out the CSS zoom because
those sizes are used as CSS width/height, which will be
affected by zoom.
(Note that something similar happens with CSS transforms but
we don't have a good way to deal with them)
* Squelch TS error
* `yarn build` (GitHub Actions)
* Add TODO
Co-authored-by: Garrick Aden-Buie <garrick@adenbuie.com>
* Rebuild JS
---------
Co-authored-by: jcheng5 <jcheng5@users.noreply.github.com>
Co-authored-by: Garrick Aden-Buie <garrick@adenbuie.com>
* refactor: Factor out message display from error handler
* feat: Add custom event for sending a client message
* feat: Report binding validity problem via event instead of throwing error
* feat: Don't need to hide shared input/output message
Now that it's not an error, it's safe to report
* refactor: Move `inDevMode()` logic into error console
* refactor: Rename `.error` --> `.event`
* feat: wrap client error message
It's otherwise hard to tell that the error is scrollable
Plus the scrolling is over the whole message rather than the part that overflows
* feat: always send client console messages to browser console as well
* chore: throw if `shiny:client-message` receives an event that isn't CustomEvent
* feat: Handle status in `showShinyClientMessage()`
* Renamed `showMessageInClientConsole()` to `showShinyClientMessage()` to improve clarity
* Added `status` argument to `showShinyClientMessage()` to allow for different message types
* refactor: Don't throw errors for duplicate IDs
Brings dev mode in line with current "prod" behavior,
where errors aren't thrown for duplciates. In both cases
we still get console or client messages.
* refactor: Clean up `status` inside `checkValidity()`
* refactor: Have `checkValidity()` handle emitting the client console event
* Remove dateInput and dateRangeInput handlers for keyup and input events
This prevents spurious updates while typing, but still sends when enter is pressed, focus is lost, or the GUI is clicked (due to the remaining `changeDate` and `change` handlers).
* chore: small edits to comments and NEWS item
---------
Co-authored-by: Garrick Aden-Buie <garrick@adenbuie.com>
* Fix#3234: Click handler on scaled image getting clipped
There were two related problems here, both happening in the same scenario:
when an imageOutput with click handlers is showing an image at less than
its natural size (e.g. a 1000x1000 px .png file, being displayed in the
web page at 500x500 due to max-width or for whatever other reason), any
click where the image coordinate (1000x1000) exceeds the display size
(500x500).
In the example above, a user clicks at 300x300 in the 500x500 displayed
image. We call 300x300 the "CSS coordinates". This gets scaled up into
the position in the PNG's own coordinate system, "image coordinates":
in this case, 600x600. Since the 600x600 image coordinate is greater
than the 500x500 CSS coordinate limit, the following issues were
triggered.
1. When imageOutput(click=clickOpts(clip=TRUE)) (the default), these
clicks weren't registering at all. There was code that detected
clicks that were inside the imageOutput but outside the actual image,
but this code didn't take scaling into account.
2. Even with clip=FALSE, the click would be triggered BUT the `x` and `y`
values on the click event were incorrect--they would max out at the
CSS coordinate limit. This because plot and image output divide the
world into "panels" and clicks snap to the nearest panel. In the case
of image outputs, the server doesn't provide any panels, so the
client makes one big panel that covers the whole image--but that code
was erroneously using CSS sizes, not image sizes.
* Update NEWS
* Follow up to #4040: enable busy indicators by default
* Make our spinner invisible when wrapped inside a shinycssloaders::withSpinner() container
* Add the ability to disable/customize recalculating opacity (i.e., fade)
* Fix bug with fade not being applied correctly when the output container has no children
* `devtools::document()` (GitHub Actions)
* `yarn build` (GitHub Actions)
* Update NEWS.md
* Follow up to b7e7af: need to also rest opacity for :empty case (for initial calculation)
* Rd docs fixes/improvements
---------
Co-authored-by: cpsievert <cpsievert@users.noreply.github.com>