-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Brush fixes and enhancements #3683
base: main
Are you sure you want to change the base?
Conversation
Sync with the origin
Discard all JS changes; take only R-side functions (mainly to maintain signatures)
double-renders once and for all
I just realized there's actually a system for the alpha version numbers, but I want to be able to easily distinguish my fork from the main branch for the time being.
…remember what all the brush issues were that I was trying to fix
Conflicts: NEWS.md inst/www/shared/shiny-autoreload.js inst/www/shared/shiny-showcase.css inst/www/shared/shiny-showcase.js inst/www/shared/shiny-testmode.js inst/www/shared/shiny.js inst/www/shared/shiny.js.map inst/www/shared/shiny.min.css inst/www/shared/shiny.min.js inst/www/shared/shiny.min.js.map srcts/src/imageutils/createBrush.ts srcts/src/imageutils/createHandlers.ts srcts/types/src/imageutils/createHandlers.d.ts srcts/types/src/utils/index.d.ts
Conflicts: inst/www/shared/shiny.js inst/www/shared/shiny.js.map inst/www/shared/shiny.min.js inst/www/shared/shiny.min.js.map srcts/src/imageutils/createBrush.ts srcts/types/src/imageutils/createBrush.d.ts yarn.lock
I've merged in the latest main, this appears to be working again. The one failure is not the fault of this PR, the latest main commit also fails the 3.5.3 test |
joshuaulrich/xts@1ea13d4 seems to be the source of the 3.5.3 failure--looks like a dependency of a dependency added in an R >= 3.6.0 requirement a few weeks ago. Annoying that the dependency resolution won't take a version of it prior to the explicit R dependency being added. |
@wch is there anything else this would need to get it merged in? I'm aware that this is a pretty huge PR, but it does solve a number of longstanding issues with the "brush" functionality. |
Removing "merge in the fix for R3.5" from the TODO since that doesn't actually seem likely to be fixable given the way that CRAN handles (or really, fails to handle) older versions of packages. Unless someone convinces the |
Does look like there are more commits to main for me to merge in though |
@mjakubczak looks like they updated the CLA and want everyone to re-sign it. Since I based this PR off of yours from three years ago, it looks like they want your signature as well as mine--would you mind doing so? |
@dvg-p4 done ;) |
Thanks! alright, now i just gotta...merge the last two releases of shiny into here, resolve whatever merge conflicts result, and see if I can get the core maintainers to notice me lol |
Hi @dvg-p4, above all else I want to acknowledge the amount of work you've put into this PR; it's quite impressive. We appreciate the effort you put in, both in the PR itself, and in keeping it up to date over a few releases where this PR was not included or reviewed. I think the biggest challenge this PR faces is that it's too large and covers too much ground. Davis Vaughn wrote an excellent chapter on the advantages of small, focused PRs and many of the concepts of that chapter apply here. In particular, in Shiny, reviewers have a primary goal of making sure that changes are correct and scoped. Reviewing is challenging because this region of the code is complicated and involves many features, and anyone reviewing changes in this area will have to spend considerable time reading and gaining context on how this all works. And in addition, we have to think through the many ways and places where Shiny components can be used as well as browser compatibility, etc. When PRs are smaller and scoped, a review can be much more confident that they've understood the change, and it's a lot easier to assess the amount of work it will take to review in advance, which increases the chances of a timely review. I understand that breaking this PR into smaller changes is a lot of work and I would equally understand if you're not up for it at this point, especially after such a long delay in hearing meaningful feedback. I also understand, from personal experience, how changes in Shiny tend to layer (once change opening the door to another), which makes it even more difficult to untangle a large PR into smaller PRs. In my experience, though, it's always worth the effort when it makes the PR more approachable and easier to review. That said, from reading the PR description, it does seem likely that some parts of this PR could naturally be pulled out into smaller, individual PRs. |
Hi @gadenbuie, |
TODO
Breaking changes
session$resetBrush()
now properly namespaces the brush ID automatically within a module. This breaks previous workarounds, which will now result in a doubly-namespaced brush ID. This function has also been supplemented with the slightly more user-friendlyshiny::resetBrush()
; see details below.New features and improvements
Added
resetBrush()
function for a slightly more user-friendly alternative tosession$resetBrush()
with syntax similar to theupdate*()
functions.Closed Set ggplot2's plot brush programmatically Shiny #1456: Added
updateBrushCoords()
function to programatically update the area brushed on a plot, similar to otherupdate*()
functions. Tested primarily withggplot2
, but may work with reduced functionality with base graphics and images. Seehelp(updateBrushCoords, shiny)
for more details.Bug fixes