Repository navigation
Fix dcc.Upload contents and dcc.Geolocation position docstrings - #4126
Open
ZainnQureshii wants to merge 1 commit into
Open
ZainnQureshii wants to merge 1 commit into
ZainnQureshii wants to merge 1 commit into
Conversation
Upload reads files with readAsDataURL, so contents is a base64 data URL, not a binary string. Geolocation sets missing optional fields with `?? null`, so they arrive as null, not NaN. Fixes plotly#4125 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
T4rk1n
approved these changes
Nov 9, 2026
T4rk1n
left a comment
Contributor
There was a problem hiding this comment.
Both docstrings now match what the components do. Upload reads files with readAsDataURL and passes reader.result through unchanged, and Geolocation fills missing fields with ?? null. No changes needed from my side.
This file contains hidden or 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
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 #4125
Two
dccprop docstrings describe a value format the component does not produce:dcc.Upload.contentssaid "binary string". The component reads each file withreader.readAsDataURL(file)(src/fragments/Upload.react.js:189) and pushesreader.resultunchanged (:173), so the value is a base64 data URL. The docstring now says so and shows thedata:<mime type>;base64,<data>shape.dcc.Geolocation.positionsaid unavailable fields are NaN. The component builds them with?? null(src/components/Geolocation.react.js:59-65), so they arrive as null (Nonein a Python callback). The docstring now says null, which the Python generator already renders asNone(fix_keywordsindash/development/_py_components_generation.py).Docstrings only, no behavior change, so no test is added. The generated Python wrappers pick the text up on the next build.
Contributor Checklist
dev(fix or chore) ornext(feature, new API, breaking change), see Which branch to targetdcc.Uploadcontentsdocstringdcc.Geolocationpositiondocstringoptionals
CHANGELOG.mdPrepared with AI assistance (Claude Code) and reviewed with GitHub Copilot.
Generated with Claude Code