This repository was archived by the owner on Dec 15, 2022. It is now read-only.
allow turning off auto tracking of active pane#1336
Open
bobjunga wants to merge 1 commit intoatom:masterfrom
Open
allow turning off auto tracking of active pane#1336bobjunga wants to merge 1 commit intoatom:masterfrom
bobjunga wants to merge 1 commit intoatom:masterfrom
Conversation
* closes atom#1335 * the defaults are Enabled:true, AutoScroll:false which maintains the same default behavior as before this change. * it migrates the old autoReveal if its present in the config. * migration is required not only to keep the user's preference, but also we need to call unset on it so that the Settings View does not keep displaying it even though its no longer in the schema. * note that I also changed the description of the "Focus On Reveal" config to make it clear that it does not affect Auto Reveal but just the Reveal Active File command. * I believe that this is 100% non-breaking, backward compatible.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the Change
Enhance the tree-view config to allow turning off the behavior to change the tree selection when the active pane item changes.
Moved tree-view:autoReveal config into a config object that also has an enable boolean
tree-view's onDidChangeActivePaneItem handler now 1) migrates the old autoReveal to new autoTrackActivePane.autoReveal (if its present) and 2) uses autoTrackActivePane.enable to decide whether to call selectActiveFile and revealActiveFile
Alternate Designs
Considered changing autoReveal to an enum. See #1335
Benefits
Backward compatible with previous behavior and now allows a new behavior. See #1335
Possible Drawbacks
If other packages use tree-view:autoReveal they should eventually be updated to use autoTrackActivePane.autoReveal instead but in the mean time the impact should not be severe. If they enable autoReveal, it will still take effect because of the migration condition in the code.
Applicable Issues
#1335