Skip to content

add option for preview navigation behavior - #112389

Merged
Benjamin Pasero (bpasero) merged 6 commits into
microsoft:masterfrom
goldst:preview-code-navigation
Dec 15, 2020
Merged

Benjamin Pasero (bpasero) merged 6 commits into
microsoft:masterfrom
goldst:preview-code-navigation

Conversation

@goldst

@goldst Leonard Goldstein (goldst) commented Dec 13, 2020 •

Copy link
Copy Markdown
Contributor

This PR fixes #112348
Let me know whether the description text of the new option is ok, so I can fix it if necessary.

@ghost

Deleted user (ghost) commented Dec 13, 2020 •

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

'workbench.editor.enablePreviewFromCodeNavigation': {
'type': 'boolean',
'description': nls.localize('enablePreviewFromCodeNavigation', "Controls whether preview editors should be kept open as regular editors when opening a second editor from the preview (e.g. via go to definition)"),
'default': true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
'default': true
'default': false

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Are you sure? In my implementation true means new behavior (keeping old preview editor open). Your suggestion would make the old behavior default again. I can also change it to false means new behavior, if that's what you mean.

// should be pinned or not. This ensures that the source of a navigation
// is not being replaced by the target. An example is "Goto definition"
// that otherwise would replace the editor everytime the user navigates.
const pinPreview = this.configurationService.getValue<boolean>('workbench.editor.enablePreviewFromCodeNavigation');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would prefer if we would lookup this setting similar to how we do it here:

const editorConfig = this.configurationService.getValue<IWorkbenchEditorConfiguration>().workbench.editor;

Aka add it to IWorkbenchEditorConfiguration

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

changed it, thanks for the pointer

@goldst

Copy link
Copy Markdown
Contributor Author

Benjamin Pasero (@bpasero), would you please help me with the macOS Integration Tests? I'm not sure why it fails all of a sudden, I don't think I changed anything that could cause a timeout... is there a way to restart it?

@bpasero
Benjamin Pasero (bpasero) merged commit a1f815a into microsoft:master Dec 15, 2020
@bpasero

Copy link
Copy Markdown
Contributor

Thanks 🥂

@goldst
Leonard Goldstein (goldst) deleted the preview-code-navigation branch December 15, 2020 14:02
@github-actions github-actions Bot locked and limited conversation to collaborators Jan 29, 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.

Ability to switch to previous behavior on 1.52.0 'Preview editor improvements'

2 participants