-
Notifications
You must be signed in to change notification settings - Fork 62
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
Fix input_task_button for modules #1108
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jcheng5
commented
Feb 5, 2024
jcheng5
commented
Feb 5, 2024
datetime.strptime(v, "%Y-%m-%d").date() for v in value | ||
return ( | ||
datetime.strptime(value[0], "%Y-%m-%d").date(), | ||
datetime.strptime(value[1], "%Y-%m-%d").date(), |
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.
This slight rewrite means we don't need to use pyright pragmas. Same below.
wch
approved these changes
Feb 5, 2024
schloerke
added a commit
that referenced
this pull request
Feb 13, 2024
* main: Bump version to 0.7.1.9000 Fix input_task_button for modules (#1108) Bump version to 0.7.1 Test input task button and extended task decorator (#1099) Add remaining examples for express API reference (#1093) test: Add `make playwright-debug` to help debug playwright tests (#1097) Make input_selectize work correctly within a module (#1091) Update types to allow `navset_*` functions to accept `MetadataNode` args (#1094) Update changelog Update express.ui.hold() to accept any type of object (#1089)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1107
The task button installs an input handler, which it uses to implement its auto-reset feature. One of the arguments to the input handler is the name/id of the input, a string. When a task button is in a module, that id string contains the module/namespace name as well.
Module-aware code in Shiny assumes regular strings are un-namespaced id's (akin to a relative path), and
ResolvedId
objects as namespaced id's (akin to an absolute path). In this case, we had a string that contained a namespaced id. That's then passed toupdate_task_button
, which complains that it contains characters that shouldn't be part of an id.This PR fixes the problem by changing the
input_handler
invoking code, changing the string id to a ResolvedId as early as possible.