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

Alt click + terminal button to split #123531

Merged
merged 4 commits into from May 11, 2021
Merged

Alt click + terminal button to split #123531

merged 4 commits into from May 11, 2021

Conversation

meganrogge
Copy link
Contributor

This PR fixes #122117

@meganrogge meganrogge self-assigned this May 11, 2021
@meganrogge meganrogge requested a review from Tyriar May 11, 2021 03:04
@meganrogge meganrogge added this to the May 2021 milestone May 11, 2021
@meganrogge
Copy link
Contributor Author

meganrogge commented May 11, 2021

Ideally would like to get the split icon to appear on hover + alt like the editor button does. looks like it would take a fair amount of duplication, since MenuIttemAction does this already, but can't be used or referenced where dropdownWithPrimaryActionViewItem lives.

Thus, I've added an altAction property to dropdownWithPrimaryActionViewItem.

@meganrogge
Copy link
Contributor Author

meganrogge commented May 11, 2021

Currently, an issue with this is that clicking + w alt depressed results in:

  • a split terminal is created 👍🏼 bc onclick & altKey are monitored in dropdownWithPrimaryActionViewItem
  • a non-split terminal is created 👎🏼 bc onclick in the parent class, BaseActionViewItem, runs the primaryAction on click.

Stuff I tried:

  • to override the parent onClick method - problems w this include EventLike doesn't have an altKey I can check ❌
  • stopping the event from propagating in the onClick within dropdownWithPrimaryActionViewItem - did not work ❌

All of this could be avoided if event: unknown in terminalActions was ever defined. ☹️

@meganrogge meganrogge enabled auto-merge (squash) May 11, 2021 16:58
@meganrogge meganrogge merged commit ec4babc into main May 11, 2021
@meganrogge meganrogge deleted the merogge/splitButton branch May 11, 2021 17:20
@github-actions github-actions bot locked and limited conversation to collaborators Jun 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Split terminal + should support shift-click to open split
1 participant