posit-dev / posit-dev/publisher
Project Files checkbox can be inaccurate when collapsing and expanding directories
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 16
- Forks
- 7
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 31
Description
If the Files API takes awhile due to a very large directory size, and the user clicks a checkbox to include/exclude a item; the checkbox could be inaccurate when the parent directory is then collapsed and re-expanded.
This is due to the item being removed then re-added to the DOM upon collapsing and expanding. We do not store a local state of included/excluded files and instead rely on the API response. This reliance also explains why including/excluding a directory does not change nested files until we hear back from the Files API.
Ideally the expanded state of a directory shouldn't affect the checkbox state prior to the hearing back from the Files API.
This issue does not include handling nested files when a directory is included in the deployment.
Contributor guide
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
Start by tracing the Files API-backed Project Files checkbox and the directory collapse/expand path. Reproduce the delayed-response case with a large directory, then verify that collapsing and re-expanding preserves the user's include/exclude choice before the API responds. Keep nested-file handling out of scope, as stated in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100