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

Fixed #5500: implemented "Toggle Minimap" command #5633

Merged
merged 1 commit into from
Jul 5, 2019

Conversation

fangnx
Copy link

@fangnx fangnx commented Jul 3, 2019

  • Implemented the "Toggle Minimap" command in the command pallete.

@vince-fugnitto vince-fugnitto added editor issues related to the editor enhancement issues that are enhancements to current functionality - nice to haves labels Jul 3, 2019
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

It works well!
I'd be fine too if the method doToggleMinimap was simply called toggleMinimap, and more description was made in the method to describe that it updates the user editor.minimap.enabled preference.

@vince-fugnitto vince-fugnitto requested a review from lmcbout July 3, 2019 14:59
@vince-fugnitto
Copy link
Member

@lmcbout can you try it out as well? Note that the command only updates the User preference.
If the preference already exists at the workspace or folder level it takes precedence over the toggle.

@lmcbout
Copy link
Contributor

lmcbout commented Jul 4, 2019

@lmcbout can you try it out as well? Note that the command only updates the User preference.
If the preference already exists at the workspace or folder level it takes precedence over the toggle.

1- Code should be modify from doToggleMinimap() to toggleMinimap() as suggested
2- When the 'editor.minimap.enabled' is defined in the workspace, it takes over and nothing happen. If you want to have the same behavior as VSCode, VSCode show/hide the minimap even when it is defined at the workspace level, so considerating this, it does not work. Do we want to show/hide the minimap if this preferences is defined at a lower level ?

@vince-fugnitto
Copy link
Member

2- When the 'editor.minimap.enabled' is defined in the workspace, it takes over and nothing happen. If you want to have the same behavior as VSCode, VSCode show/hide the minimap even when it is defined at the workspace level, so considerating this, it does not work. Do we want to show/hide the minimap if this preferences is defined at a lower level ?

@lmcbout

We have the same behaviour as VSCode.

VSCode sets the User preference only for the editor.minimap.enabled preference.
If the preference is set at the Workspace level it takes precedence over the User.

I do not believe there is anything more to do in this PR, and this comment was already discussed #5633 (comment)

And looking at their source code you can see as well we implement it similarly:
https://github.com/microsoft/vscode/blob/7bc29bf67c17608b11e23a8497c8f1de5a0922cf/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.ts#L26-L29

Copy link
Contributor

@lmcbout lmcbout left a comment

Choose a reason for hiding this comment

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

Would be nice, but not mandatory: doToggleMinimap() to toggleMinimap() as suggested
After further investigation, VSCode behave the same. As long as you don't put the preference in the workspace level, it is fine. VSCode put as default "true" in the workspace .
LGTM

@fangnx
Copy link
Author

fangnx commented Jul 4, 2019

Would be nice, but not mandatory: doToggleMinimap() to toggleMinimap() as suggested
After further investigation, VSCode behave the same. As long as you don't put the preference in the workspace level, it is fine. VSCode put as default "true" in the workspace .
LGTM

I will change the naming ;). Thanks for the feedback!


Just fixed the naming issue. @vince-fugnitto

- Implemented the "Toggle Minimap" command in the command pallete.

Signed-off-by: fangnx <[email protected]>
@vince-fugnitto vince-fugnitto merged commit f247b57 into eclipse-theia:master Jul 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor issues related to the editor enhancement issues that are enhancements to current functionality - nice to haves
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants