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

Refactoring Preview option in Command Palette (part of #151140) #151566

Merged
merged 6 commits into from
Jun 9, 2022

Conversation

justschen
Copy link
Contributor

This PR fixes #151140

@mjbvz mjbvz self-requested a review June 8, 2022 22:28
label: item.action.title,
quotableLabel: item.action.title,
code: 'undoredo.codeAction',
respectAutoSaveConfig: true
respectAutoSaveConfig: true,
showPreview: options?.showPreviewPane,
Copy link
Collaborator

Choose a reason for hiding this comment

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

[nit] Potentially align these names: showPreview vs showPreviewPane vs preview

src/vs/editor/contrib/codeAction/browser/codeActionUi.ts Outdated Show resolved Hide resolved
onSelectCodeAction: async (action) => {
this.delegate.applyCodeAction(action, /* retrigger */ true);
onSelectCodeAction: async (action, trigger) => {
if (trigger.preview !== undefined) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this may be incorrect as we always want to apply the refactoring . Instead try using Boolean(trigger.preview) to convert trigger.preview to a boolean

@justschen justschen merged commit a38448d into microsoft:main Jun 9, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jul 24, 2022
@justschen justschen deleted the justin/refactor-fix branch August 8, 2024 21:47
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.

Allow refactorings to be previewed
3 participants