-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Avoid re-registering bslib components and globals #1045
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be curious to know how
registerBinding()
handles this (i.e., does the last one win)? Seems like it'd be wise to match whatever it does?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would we want adding
bslib::value_box()
to a Quarto dashboard to use Quarto's components -- that they test against and expect to work -- or to use bslib's component js instead?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, good point, makes sense for the 1st one to win then. But also, if the last one wins for
registerBinding()
, wouldn't the binding be using the wrongSidebar
(i.e., we should maybe updateregisterBinding()
to do something similar toregisterBslibGlobal()
)?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
registerBinding()
is basically a safe call toBindingsRegistry.register()
in shiny. "registering" a binding just adds it to the end of an array. The.getBindings()
method breaks ties using thepriority
propery, followed by most-recently-registered.Anyway, you're pointing out that this isn't an unambiguous or complete fix, and I agree. This PR at least gets us out of the position of breaking Dashboards. We'll have to do some thinking in the future