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

Uri handler multiple windows #152

Merged
merged 12 commits into from
Dec 16, 2022
Merged

Conversation

miketalley
Copy link
Contributor

@miketalley miketalley commented Dec 7, 2022

@miketalley miketalley changed the base branch from master to v1.0.0 December 7, 2022 15:52
@miketalley miketalley requested a review from anthmatic December 7, 2022 18:30
@miketalley miketalley marked this pull request as ready for review December 7, 2022 18:30
@anthmatic
Copy link
Contributor

Testing this locally (with the PAKUI changes locally) it still just seems to open the most recent window, not the originating window. Am I missing a step?

@miketalley
Copy link
Contributor Author

miketalley commented Dec 9, 2022

Testing this locally (with the PAKUI changes locally) it still just seems to open the most recent window, not the originating window. Am I missing a step?

It should still show the confirmation modal in the most recent/active window, but when the hubspot.config.yml gets created/updated, it should be done at the correct path.

EDIT: I think the issue may be that you need to have these changes installed in the other window also.

@TanyaScales TanyaScales requested a review from a team December 12, 2022 17:32
context.subscriptions.push(
commands.registerCommand(COMMANDS.AUTHORIZE_ACCOUNT, async () => {
const authUrl =
'https://app.hubspot.com/l/personal-access-key/auth/vscode';
const authUrl = `https://app.hubspot.com/l/personal-access-key/auth/vscode${rootPath}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

I can't fully test the flow on Windows but since rootPath uses fsPath, this path contains the windows style path which looks like .../auth/vscodec:\folder which causes a 404

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Switched to using path instead of fsPath and also added a fix for the value of rootPath that is returned from personal-access-key-ui, which is something like /C:/Folder. The fix slices off the leading /.

Let me know if you see any issues with this.

Copy link
Contributor

@anthmatic anthmatic left a comment

Choose a reason for hiding this comment

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

Can't fully test the Windows stuff yet but LGTM otherwise

@miketalley miketalley merged commit e05e71e into v1.0.0 Dec 16, 2022
@miketalley miketalley mentioned this pull request Dec 21, 2022
@TanyaScales TanyaScales deleted the uri-handler-multiple-windows branch July 14, 2023 19:24
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.

2 participants