posit-dev / posit-dev/positron
Maintain editor tab order and active tab when restoring Data Explorer editors
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.3k
- Forks
- 184
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 206
Description
Describe the issue:
#5475 implemented the restoring of Data Explorer tabs upon reloading the IDE for #3172. However, the Data Explorer tabs are restored after any code editors are restored and tab order is not tracked, which can cause the editor tab ordering to change.
Steps to reproduce the issue:
- Start an interpreter, e.g.
R 4.4.0 - View at least one data frame in the Data Explorer, e.g.
View(iris) - Open a code file and organize the editor tabs such that the Data Explorer tabs are not all at the end. Also note that the active tab is the code file.
- e.g.,
- e.g.,
- Reload the IDE, e.g.
Developer: Reload Windowcommand in the Command Prompt (See https://github.com/posit-dev/positron/issues/5462 for more ways to reload) - See that the Data Explorer tab(s) have been restored to the end of the tabs and that the active tab is the last Data Explorer tab
- e.g.,
- e.g.,
Expected or desired behavior:
The tab order before reloading the IDE should be preserved, and a reopened Data Explorer tab should not become the active tab if another editor were previously the active tab.
From https://github.com/posit-dev/positron/pull/5475#pullrequestreview-2456124881
some changes in the data explorer service itself (to mark these tabs as custom editors that can be restored?) are needed for a better UX.
Were there any error messages in the UI, Output panel, or Developer Tools console?
N/A
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 reproducing the restoration sequence in issue #5489: open a Data Explorer and code file, arrange their tabs, then use Developer: Reload Window. Read the tab-restoration work from #5475 and the referenced Data Explorer service discussion. Done means the pre-reload tab order is preserved and the previously active code editor remains active.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- desktop, developer-experience
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100