posit-dev / posit-dev/positron

Maintain editor tab order and active tab when restoring Data Explorer editors

Open
#5,489 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: data explorer enhancement usability
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:

  1. Start an interpreter, e.g. R 4.4.0
  2. View at least one data frame in the Data Explorer, e.g. View(iris)
  3. 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., Image
  4. Reload the IDE, e.g. Developer: Reload Window command in the Command Prompt (See https://github.com/posit-dev/positron/issues/5462 for more ways to reload)
  5. 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., Image

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.