Add optional inline project edit button #271
Merged
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.
Motivation
A continuation of #269 which opened the project file on click in the explorer like Visual Studio does. The other popular F# editor is Ionide, which instead offers an inline button to edit the project file.
Supporting similar behavior could ease transition. It's also just a nice balanced option for quick access and a larger expand/collapse target.
Behavior after PR
By default there will be an inline button to edit the project file. This can be turned off in the settings.
Decisions worth noting
Config naming
The configuration option is "Open Project Inline Button Shown". This is less direct than "Show Inline Edit Project Button".
But, I chose it because it puts the two open project options right next to each other.
Alternatively, we could make the behaviors one configuration option with an enum.
I chose not to do that since it's plausible someone might want to toggle both.
Plus, I think only boolean config settings can be accessed directly from when constraints
Icon
I chose the edit icon for opening the project since it seemed intuitive. But VS Code has other sensible built-in icons like