-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
Restructure and rename settings #376
Conversation
Do note that this will almost certainly invalidate users' previous settings, something that (if this PR is accepted) should be mentioned in the changelog.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is a compatibility-breaking change, the next version of this extension will be 2.0.0.
PS: Do you know how to make a toast pop up after the user updates the extension? This would be useful to show a message about the renamed settings. |
Unfortunately there's no official API for this yet--however, the GitLens extension implements such a feature, which I took inspiration from to make f9ed7f6. Hopefully that's good! If the updated setting names are going to be in the changelog, I can update the message to say something like "Please view the changelog to see the updated settings." (I would add a button to open the changelog, but unfortunately there doesn't seem to be a standard way to make a popup button open a web browser, and links inside of popups aren't automatically highlighted, so including a URL wouldn't work very well either.) |
Are we sure about this? The old settings will still be in the user's We can still throw a popup saying that the user's settings have been converted to the new style names, and maybe tell them to double check their extension settings. Since the number of old-style settings will never increase, there also shouldn't be any (much) maintenance cost to just leave the converter routine in place |
You're right, we absolutely could do that. I just pushed 8f307ae implementing it. Based on the milestone this PR was assigned (1.5.0), I changed the update text to:
That message displays conditionally, only if any settings have actually been converted. |
That's awesome, thank you for updating this. I'll try to get it reviewed this week.
The milestone wasn't a hard decision, mostly I wanted to indicate that I was serious about getting this merged, but not trying to force it into the next release.
Sounds perfect to me, most users will never even need to know that we did this. |
Sorry for the delay in reviewing: I've been under the weather lately. I'm really excited for this PR. The new names look WAY better in the settings menu. The settings converter worked great, once I remembered that the extension only activates when you touch a godot file or something. My extension host window didn't have a relevant file open, so it didn't trigger the extension to start and it left me very confused about why my setting hadn't been converted. Update MessageI didn't see the update message the first time around and had to trick the extension into displaying it for me. It looks like this, all on one line with most of the message cut off: Adding a button to the message caused the entire text to be shown, and making the user dismiss it might make it less missable: The Old SettingsWhile I was playing with this I had the thought that if a user jumps between different versions, then removing the old settings might cause an undesirable situation where they install Side NoteReading your code taught me about |
Thank you for the review! Apologies for my delay in responding.
I think that leaving the old ones is a good choice. As you mentioned, it goes along with the precedent set by other extensions, including Microsoft's. I'll update the converter routine to not delete anything. As for removing them in the future, I believe it'd be best to just leave them there forever, as it avoids any strange conflicts if users (for whatever reason) jump between various versions of the extension. Deleting stuff from the user's configuration did make me feel a bit uneasy anyways.
I was worried about this, I hope it didn't just convert things silently. The logic for displaying the message will change slightly when I remove the deletion aspect of the converter routine, only displaying if there's an old-style configuration key without a matching new-style one (which it will add beforehand). I'll get to work on the changes shortly, I'm a little busy due to the holidays but have more than enough time within the next few days. (Also, thanks for noticing the message getting cut-off and adding the button!) |
I'm fully on board with that now. I hadn't really thought it through when I originally suggested deleting the original settings.
I'm fairly confident that I just missed the popup the first time around. Once I started trying to intentionally trigger the conversion, it happened every time I expected it. |
I realized that half of the contributed items(commands/configurations) were still using a random assortment of kebab-case and snake_case, plus an uncomfortable mix of Only the string names of contributed items were changed, so there shouldn't be any behavior changes to the extension. |
How did that even happen? |
I have several planned features that are blocked by this PR, so I'm going to merge it even though I contributed to it. Sorry in advance, @Calinou. |
No problem, thanks for finishing it! Got tied up with work and totally forgot to myself, haha. Slight word of caution, in its current state the converter still deletes old-style settings, but I understand if that's not a priority right now! Should just be a simple change in the logic of In any case, glad to see it merged! 🎉 |
Thanks for mentioning that, I definitely remembered reviewing a version with that already removed. I must have done it myself when I was messing around and then thrown it away. I already have the fix in my next PR, alongside a handful of typos/missed configuration names. |
This pull request:
Renames settings to better fit with VSCode's UI-based settings display (it expects
camelCase
setting names, the extension formerly usedsnake_case
)Groups settings into categories
Slightly rewords some setting descriptions (see below)
godot-tools.lsp.serverProtocol
godot-tools.lsp.autoReconnect.enabled
godot-tools.lsp.serverProtocol
(option descriptions)Fixes a bug with
utils.get_configuration
that would result in thelsp.autoReconnect.enabled
(formerlyreconnect_automatically
) setting being completely ignoredBefore:
After:
(Renaming "Godot Tools configuration" to "Godot Tools" complies with Microsoft's official recommendation for settings category names)