Reorganize interface/editor setttings#114971
Conversation
AdriaandeJongh
left a comment
There was a problem hiding this comment.
Having the titles / subsections is a good improvement over the current long list. However, will this break compatibility for any code referencing those settings?
Yes. I could add some extra compatibility code, but we never did that when renaming settings 🤷♂️ |
|
I think with editor settings it's fine, as long as we let users know in an upgrade guide? Should we add the break combat label to this then? |
AdriaandeJongh
left a comment
There was a problem hiding this comment.
LGTM. Let's organize this screen! I didn't scrutinize the chosen titles and categories; at first glance it looks good.
There was a problem hiding this comment.
Categories look good to me, the organization is helpful.
Unlike previous setting changes, these ones are a lot more common, especially settings like interface/editor/editor_language or interface/editor/main_font_size (https://github.com/search?q=%22interface%2Feditor%22+lang%3AGDScript+&type=code). So I think we should have compatibility for it.
_rename_setting could add to a compatibility-only hashmap and then it can be checked in get / set / has_setting.
I found some new setting uses that will need to be changed (needs rebase):
godot/editor/gui/code_editor.cpp
Line 1637 in a3e84cc
godot/editor/themes/editor_fonts.cpp
Line 434 in a3e84cc
|
I added compatibility HashMap. You can now get and set settings using their old name. (should it display a warning though?) |
kitbdev
left a comment
There was a problem hiding this comment.
Looks good.
Since it still works and doesn't break compat I guess it doesn't need a warning.
|
Thanks! |
The Interface/Editor section of editor settings has gotten too big. It feels like a dump for settings that has nowhere better to go. Lack of good grouping even led to some issues, like #114829 and its follow-up.
This PR reorganizes this section a bit, by adding sub-sections. TBH sub-sections seem under-utilized in editor settings, some sections could even be merged, instead of having sections with like 2-3 settings. I also added a method that can handle setting compatibility, so more thorough renames are possible in the future.
Although renaming settings is rather annoying. I made a script that handles it, but
check_settings_changed_in_group()uses partial names, so automatic handling is not reliable.