This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
always open existing setting item in 'settings-view:open' command - #1043
Merged
Merged
Conversation
… pane and throw exception
Remove duplicate logic + reducing size of main.js is good to reduce startup impact(since setting-view have no activationCommand in pkg.json)
Contributor
|
This might also fix atom/atom#12498 because the repro steps include getting into a bad state by opening the settings-view in two different panes. |
Contributor
|
Thanks @t9md for this contribution! ✨ |
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.
Fix #723
Description of the Change
Condition #723 happens is
settings-view:open(it try to openatom://config)Why happens is
atom.worksace.opentry to open already openedsetting-viewitem also in different paneChanges
workspace.openalways open already opened item in workpace.searchAllPanes: trueoption inworkspace.open.Plus(I can remove this refactoring part if requested)
SettingsView::showPanelForURImethod which open matching URI's panelBackground investigation why I chose this approach is explained in #723 (comment).
Alternate Designs
Currently settingsView is singleton.
Quit singleton and instantiate settingsView always is another solution.
As a result user can open multiple settingsView on every pane like one file can open in multiple editors.
But I think this is too much/big change.
Benefits
User no loner see exception
Possible Drawbacks
Nothing
Applicable Issues
#723