Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(commad): close #11346, use available number to label when create … #11347

Merged
merged 7 commits into from
Jun 28, 2022

Conversation

yiliang114
Copy link
Contributor

What it does

close #11346

after change:

QQ20220626-180740

How to test

  1. yarn & yarn browser build & yarn browser start.
  2. Open http://localhost:3000/ and open any workspace.
  3. Use alt + n to call NEW_FILE command some times, we can see tab named Untitled-${index} one by one. The number in label is start from 1 like vscode.
  4. Call NEW_FILE command again after close some older Untitled file, it will use the number which is closed just now like vscode.

Review checklist

Reminder for reviewers

@msujew msujew added editor issues related to the editor workspace issues related to the workspace labels Jun 27, 2022
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yiliang114 Thank you for your first contribution!

I believe we can greatly simplify this change and cut down on the logic duplication. See below on how we could accomplish this.

packages/core/src/common/resource.ts Outdated Show resolved Hide resolved
packages/core/src/common/resource.ts Outdated Show resolved Hide resolved
packages/core/src/common/resource.ts Outdated Show resolved Hide resolved
@yiliang114
Copy link
Contributor Author

What did I ignore caused two CI run failed? I try to find errors in log, get nothing useful but large empty section below limited content.

image

Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good already, however the changes to the plugin host code crash the runtime. See below for how to address this.

packages/plugin-ext/src/common/uri-components.ts Outdated Show resolved Hide resolved
packages/plugin-ext/src/plugin/document-data.ts Outdated Show resolved Hide resolved
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution, the changes look good to me 👍

@msujew msujew merged commit 61f4103 into eclipse-theia:master Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor issues related to the editor workspace issues related to the workspace
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The Resource Sequence Index is not start from available number when create untitled file
3 participants