* 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>
* chore: Enable return of dependency CSS as Sass files
Makes it possible to extract the Sass files prior to compilation for the following CSS:
* shiny
* selectize
* ionrangeslider
* daterange picker
* refactor: Take a more functional approach
* fix: missing selectizeDir
* rename: __SassLayer --> __Sass
* First pass at a proper state machine for managing output progress state
* `yarn build` (GitHub Actions)
* Add useBusyIndicators(), spinnerOptions(), and pulseOptions()
* Bring in new spinner defaults
* Use an actual div instead of a pseudo-element since chromium can't be trusted to show them when animated
* Revert "Use an actual div instead of a pseudo-element since chromium can't be trusted to show them when animated"
This reverts commit 6167c1dfd7.
* Embed animation inside svg (to avoid Chromium bug). Consolidate options into a singular busyIndicatorOptions()
* Add to pkgdown reference
* `devtools::document()` (GitHub Actions)
* `yarn build` (GitHub Actions)
* Bump version
* `yarn build` (GitHub Actions)
* Sync package version (GitHub Actions)
* Apply suggestions from code review
Co-authored-by: Garrick Aden-Buie <garrick@adenbuie.com>
* Update snapshots
* `devtools::document()` (GitHub Actions)
* Address feedback
* Bring in more spinner type options
* fix use of fs
* Code review
* `devtools::document()` (GitHub Actions)
* Sync package version (GitHub Actions)
* Update snapshots
* Fix comments
* Make snapshot consistent cross-platform
* Fix namespace issue
* Reduce specificity of position relative
* Skip snapshot on windows; update news
* Whoops
* Scope spinner customizations to parent element by default
* Update snapshots
* Reorder spinner types
* Set a private random seed in tests
* Better id naming
---------
Co-authored-by: cpsievert <cpsievert@users.noreply.github.com>
Co-authored-by: Garrick Aden-Buie <garrick@adenbuie.com>
* Close#4046: Allow for progress binding to move from Idle to Invalidated status
* `yarn build` (GitHub Actions)
---------
Co-authored-by: cpsievert <cpsievert@users.noreply.github.com>
* First pass at a proper state machine for managing output progress state
* `yarn build` (GitHub Actions)
* Improved naming
* Include ascii version of diagram (as well as the source file
* Update srcts/src/shiny/outputProgress.ts
Co-authored-by: Joe Cheng <joe@rstudio.com>
* `yarn build` (GitHub Actions)
* Only call showProgress for outputs that have actually changed their recalculating status
* Add some more commentary
---------
Co-authored-by: cpsievert <cpsievert@users.noreply.github.com>
Co-authored-by: Joe Cheng <joe@rstudio.com>
* Close#4027: Fix opacity dimming on recalculating uiOutput(). Also, only apply display:content when there are child elements
* Update inst/www/shared/shiny_scss/shiny.bootstrap5.scss
* Add news item
* Close#4011. Fix and simplify reactlog's version check approach.
* Better variable name
* Use test_path() for consistent path location
* Just use packageDescription()
* Update tests/testthat/test-reactlog.R
* Update tests/testthat/test-reactlog.R
* Update DESCRIPTION
* Revert "feat: Deprecate with warnings, expect `renderDataTable()` to be deprecated (#4007)"
This reverts commit a8c6065b9f.
* Use shiny's datatables implementation when testing