Skip to content

Conversation

@nzaytsev
Copy link
Contributor

@nzaytsev nzaytsev commented Oct 28, 2024

Description

Screen.Recording.2024-10-28.at.11.18.31.mov

Checklist

  • I have followed the guidelines in the Contributing document
  • My changes follow the coding style of this project
  • My changes build without any errors or warnings
  • My changes have been formatted and linted
  • My changes include any required corresponding changes to the documentation (including CHANGELOG.md and README.md)
  • My changes have been rebased and squashed to the minimal number (typically 1) of relevant commits
  • My changes have a descriptive commit message with a short title, including a Fixes $XXX - or Closes #XXX - prefix to auto-close the issue that your PR addresses

@nzaytsev nzaytsev linked an issue Oct 28, 2024 that may be closed by this pull request
@nzaytsev nzaytsev requested review from axosoft-ramint and eamodio and removed request for axosoft-ramint October 28, 2024 04:20
@nzaytsev nzaytsev force-pushed the features/3549-open-multi-diff-editor-when-opening-a-new-worktree-from-a-pr branch from dacb6c6 to 4c7014a Compare October 30, 2024 04:56
Copy link
Contributor

@axosoft-ramint axosoft-ramint left a comment

Choose a reason for hiding this comment

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

I tried creating a VSIX from the latest of this branch, and running "open in worktree" on a few PRs, but I'm never able to see the PR changes opened. I will check if there was an issue with the package creation but in the meantime, some comments below:

Copy link
Contributor

@axosoft-ramint axosoft-ramint left a comment

Choose a reason for hiding this comment

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

I found out why I wasn't able to see the PR changes in my test cases using the Launchpad. See below.

Also have an overall suggestion for making this much simpler. Let me know if it would work or if we would run into issues.

@nzaytsev nzaytsev force-pushed the features/3549-open-multi-diff-editor-when-opening-a-new-worktree-from-a-pr branch from 02a3e5a to 861824b Compare November 1, 2024 07:52
Copy link
Contributor

@axosoft-ramint axosoft-ramint left a comment

Choose a reason for hiding this comment

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

This works for me - though I was speaking with @eamodio this morning and thinking that it might not make sense to always load the changes. Will follow up on that in a bit.

[DeepLinkServiceAction.OpenGraph]: DeepLinkServiceState.OpenGraph,
[DeepLinkServiceAction.OpenFile]: DeepLinkServiceState.OpenFile,
[DeepLinkServiceAction.OpenSwitch]: DeepLinkServiceState.SwitchToRef,
[DeepLinkServiceAction.OpenAllPrChanges]: DeepLinkServiceState.OpenAllPrChanges,
Copy link
Contributor

Choose a reason for hiding this comment

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

This transition is no longer necessary since it would/should only be reachable from OpenInspect

repository: repo,
source: 'launchpad',
} satisfies ShowWipArgs);
action = DeepLinkServiceAction.OpenAllPrChanges;
Copy link
Contributor

Choose a reason for hiding this comment

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

Right now this would work because we really only open inspect on PR switches, in which case all the info is there to show the PR changes. Would be a nice additional touch though to check the action type in this._context.action though and maybe restrict/guard against any non-PR case.

@axosoft-ramint
Copy link
Contributor

Hey @nzaytsev, while reviewing your PR, I'd suggest the following code changes:

👉 Only open changes when worktree is created

  • Removes unneeded transition event
  • Only opens changes when using "Open in Worktree"
  • Only opens changes when a worktree is created in the flow

You can also review and apply these suggestions locally on your machine.

Learn more about GitKraken Code Suggest

Code Suggest liberates your code reviews from GitHub's restrictive, comment-only feedback style. As simple as suggesting changes in a Google-doc, provide real code suggestions from where you code, e.g. your IDE, and on anything in your project — not just on the lines of code changed in the PR.

Join your team on GitKraken to speed up PR review.

@axosoft-ramint
Copy link
Contributor

Hey @nzaytsev, while reviewing your PR, I'd suggest the following code changes:

👉 Restricts to only opening on "Open in Worktree" and only when worktree is created

You can also review and apply these suggestions locally on your machine.

Learn more about GitKraken Code Suggest

Code Suggest liberates your code reviews from GitHub's restrictive, comment-only feedback style. As simple as suggesting changes in a Google-doc, provide real code suggestions from where you code, e.g. your IDE, and on anything in your project — not just on the lines of code changed in the PR.

Join your team on GitKraken to speed up PR review.

 - Only shows changes for "open in worktree" action
- Removes unnecessary state transition
- Only shows changes if worktree is created in flow
- Applies to branches in views and graph
@axosoft-ramint axosoft-ramint self-requested a review November 5, 2024 15:17
@axosoft-ramint
Copy link
Contributor

@eamodio Asking for your help reviewing this one since I committed to it directly.

@axosoft-ramint
Copy link
Contributor

Going to go ahead and merge this - we can address further issues in follow-up

@axosoft-ramint axosoft-ramint merged commit 41600ec into main Nov 6, 2024
3 checks passed
@axosoft-ramint axosoft-ramint deleted the features/3549-open-multi-diff-editor-when-opening-a-new-worktree-from-a-pr branch November 6, 2024 15:55
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.

Open multi-diff editor when opening a new worktree from a PR

3 participants