Skip to content

Add open_recent option to VS Code desktop #248

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

Merged
merged 1 commit into from
May 21, 2024

Conversation

code-asher
Copy link
Member

@code-asher code-asher commented May 15, 2024

Together with coder/vscode-coder#272 closes coder/vscode-coder#241

This also (accidentally) fixes what I would imagine is a bug where if there is no folder, it would exclude the URL.

@code-asher code-asher force-pushed the asher/vscode-desktop-open-recent branch 4 times, most recently from 01f4743 to 5a64b7f Compare May 15, 2024 22:33
@code-asher code-asher force-pushed the asher/vscode-desktop-open-recent branch from 5a64b7f to ae279c7 Compare May 15, 2024 22:35
@code-asher code-asher requested a review from Parkreiner May 15, 2024 22:36
@code-asher code-asher marked this pull request as ready for review May 15, 2024 22:36
@code-asher code-asher changed the title Add open recent option to VS Code desktop Add open_recent option to VS Code desktop May 15, 2024
Copy link
Member

@Parkreiner Parkreiner left a comment

Choose a reason for hiding this comment

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

I looked through what runTerraformApply was doing to understand the setup – I think this looks good. Just had a question about what one of the tests was testing for

);
});

it("adds open_recent", async () => {
Copy link
Member

Choose a reason for hiding this comment

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

Making sure I understand: is the point of this test to make sure that open_recent gets serialized into the URL as openRecent?

Copy link
Member Author

@code-asher code-asher May 16, 2024

Choose a reason for hiding this comment

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

Yup exactly! Just making sure setting various options results in being added to the URL correctly.

Copy link
Member Author

Choose a reason for hiding this comment

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

Admittedly the test naming could be better, I went with a adds <option name(s)> pattern.

@matifali
Copy link
Member

@code-asher this will only work when using the VS Code desktop module. Do we need to do something to also support this with the Coder built-in VSCode desktop button?

@code-asher
Copy link
Member Author

code-asher commented May 16, 2024

Do we need to do something to also support this with the Coder built-in VSCode desktop button?

I asked the same question here: coder/vscode-coder#241 (comment)

I am not sure if we have any way to customize the built-in button so I think we would have to either make this the default or add options for this, but I feel like we should encourage folks to use the module anyway.

@code-asher
Copy link
Member Author

We decided to make openRecent the default for the built-in app. I think that makes sense, since you cannot configure folder for that one anyway (it always uses the agent directory, I believe).

@code-asher code-asher merged commit beaa33b into main May 21, 2024
2 checks passed
@code-asher code-asher deleted the asher/vscode-desktop-open-recent branch May 21, 2024 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optionally open last used folder
3 participants