posit-dev / posit-dev/shinyreact
R bookmark restore value shape differs from Python
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 14
- Forks
- 3
- Avg merge
- 9h 12m
- Merged PRs (30d)
- 74
Description
R's bookmark restore serializer uses jsonlite::toJSON(auto_unbox = TRUE), so a length-1 R vector (e.g. a checkbox-group with one selected value) serializes as a JSON scalar "a", whereas Python json.dumps emits ["a"]. This can seed the wrong shape into the JS input registry for single-value multi-value inputs on restore. Needs a cross-language bookmark-payload fixture and a shape-preserving fix (hard due to R's lack of a scalar vs. vector distinction).
Note: re-verify against current code; the broad bookmarking issue #27 is closed.
Filed from the retired docs/todos.md.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Re-verify the current R bookmark restore serializer, especially jsonlite::toJSON(auto_unbox = TRUE), and compare it with Python json.dumps and the JavaScript input registry. Add the cross-language bookmark-payload fixture described in the issue, then confirm that single-value multi-value inputs retain the same shape during restore.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, r, typescript
- Domain
- backend-api-design, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100