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

docs: update comment for hideFromUser #202730

Merged
merged 6 commits into from
Jan 30, 2024
Merged

docs: update comment for hideFromUser #202730

merged 6 commits into from
Jan 30, 2024

Conversation

wy-luke
Copy link
Contributor

@wy-luke wy-luke commented Jan 18, 2024

When creating a terminal with the hideFromUser: true option, I have concerns about the possibility of the hidden terminals being restored upon the next opening of the workspace.

To verify this, I tested using vscode.window.terminals.length and confirmed that it won't happen.

Considering this, I think it might be beneficial to clarify this point in the comment. So I add And the hidden terminals won't be restored when the workspace is next opened. to the end of the comment of hideFromUser

@wy-luke
Copy link
Contributor Author

wy-luke commented Jan 18, 2024

@microsoft-github-policy-service agree

@Tyriar Tyriar added this to the February 2024 milestone Jan 30, 2024
@Tyriar Tyriar enabled auto-merge January 30, 2024 18:05
Tyriar
Tyriar previously approved these changes Jan 30, 2024
@@ -565,7 +565,7 @@ export interface IShellLaunchConfig {
* until `Terminal.show` is called. The typical usage for this is when you need to run
* something that may need interactivity but only want to tell the user about it when
* interaction is needed. Note that the terminals will still be exposed to all extensions
* as normal.
* as normal. And the hidden terminals won't be restored when the workspace is next opened.
Copy link
Member

Choose a reason for hiding this comment

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

I don't really like starting a sentence with "And"

Copy link
Member

Choose a reason for hiding this comment

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

Oh same, I guess I didn't save that file when committing as it's meant to be the same

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry about that. I don't know this at all.

@Tyriar Tyriar merged commit 7fd1edb into microsoft:main Jan 30, 2024
6 checks passed
@@ -11737,7 +11737,7 @@ declare module 'vscode' {
* until `Terminal.show` is called. The typical usage for this is when you need to run
* something that may need interactivity but only want to tell the user about it when
* interaction is needed. Note that the terminals will still be exposed to all extensions
* as normal. And the hidden terminals won't be restored when the workspace is next opened.
* as normal and they will remain hidden when the workspace is reloaded.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Tyriar Sorry for the late comment.

Honestly, I don't think your changes have the same meaning as mine. These hidden terminals will not be restored at all, rather being restored and remain hidden. When I had 2 terminals opened, 1 hidden and 1 not, there would be only 1 terminal opened when the workspace is reloaded.

I used vscode.window.terminals.length to verify it, which is exactly why I want to add this comment, telling developers these hidden terminals that cannot be closed manually by users won't be restored, no need to worry about that there would be tons of hidden terminal when the workspace is reloaded.

I'm not sure if I expressed it correctly. Looking forward for your reply. Thanks.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks a bunch for following up and sorry about the delayed response 😅

I brought back your correct description in #207016

@microsoft microsoft locked and limited conversation to collaborators Jun 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants