Add backend-controlled format options to data explorer#11051
Open
kv9898 wants to merge 8 commits intoposit-dev:mainfrom
Open
Add backend-controlled format options to data explorer#11051kv9898 wants to merge 8 commits intoposit-dev:mainfrom
kv9898 wants to merge 8 commits intoposit-dev:mainfrom
Conversation
|
Thank you all for this PR! We ask that you sign our Contributor License Agreement before we accept your contribution. You can sign the CLA by posting a comment on this PR saying: I have read the CLA Document and I hereby sign the CLA 1 out of 2 committers have signed the CLA. |
Co-authored-by: kv9898 <105025148+kv9898@users.noreply.github.com>
Co-authored-by: kv9898 <105025148+kv9898@users.noreply.github.com>
Co-authored-by: kv9898 <105025148+kv9898@users.noreply.github.com>
Co-authored-by: kv9898 <105025148+kv9898@users.noreply.github.com>
Co-authored-by: kv9898 <105025148+kv9898@users.noreply.github.com>
1b478e1 to
2e51bef
Compare
Contributor
Author
|
@juliasilge I can't get copilot to sign the CLA, can you help me with this? |
dfalbel
reviewed
Dec 15, 2025
Contributor
Author
|
recheck |
Contributor
Author
|
@juliasilge Hmm the same problem (Copilot not included in the allowlist) also appears here: positron/.github/workflows/cla.yml Line 52 in 50d0337 |
juliasilge
added a commit
that referenced
this pull request
Dec 17, 2025
Contributor
Author
|
Do we have any updates on this? |
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.
Addresses #4818. I attempted to address this problem by #7266, but that was rejected for the reason that it is more desirable to let the backends control formatting options rather than a global config. This PR takes exactly the latter approach.
Note that this PR only adds an optional format_options field to the protocol, and the functionality requires corresponding changes to the backends to respect the new protocol. posit-dev/ark#987 implements this for ark (the R backend).
The combined end result looks like (using the code example in the original issue):

Changes
Protocol Layer
format_optionsfield toBackendStateindata_explorer-backend-openrpc.jsonFormatOptionsin backend stateFrontend Integration
DataExplorerClientInstance.updateBackendState()to merge backend-provided format options with defaultsDEFAULT_DATA_THOUSANDS_SEPandDEFAULT_PROFILE_THOUSANDS_SEP'') vs profiles (',')Python Backend
_get_format_options()method toDataExplorerTableViewbase class for subclass overrideformat_optionsinBackendStatereturned byget_state()How It Works
Backends now return format options in their state:
Frontend merges backend options with defaults, falling back to
max_integral_digits: 7if not provided. This allows:scipenanddigits(see ark repository changes)Release Notes
New Features
Bug Fixes
QA Notes
Risk Level: Low. Changes are additive and backward compatible.
Testing after ark implementation:
scipen=0: Numbers ≥10M display as scientific notationoptions(scipen=10): Larger numbers display in fixed notationoptions(scipen=-3): Smaller numbers display as scientific notationAdjacent areas: None. Format option merging is self-contained in
updateBackendState().