Skip to content
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

Move EditorNode setting registration so they are in class reference #88380

Merged

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Feb 15, 2024

This also reorders editor settings in the Interface > Editor category so related settings are put together.

Preview

Screenshot 2024-02-15 235146

@akien-mga
Copy link
Member

WARNING: @GDScript.xml: Found a code string "EditorSettings.interface/inspector/default_float_step" that matches the EditorSettings.interface/inspector/default_float_step member in annotation "@export_range" description. If this is intended, use [code skip-lint]...[/code].

Copy link
Contributor

@Mickeon Mickeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know I'll spend 2 weeks on this whole XML file in the future but it could be nice to have a head-start on the newly introduced descriptions.

<member name="interface/inspector/max_array_dictionary_items_per_page" type="int" setter="" getter="">
The number of [Array] or [Dictionary] items to display on each "page" in the inspector. Higher values allow viewing more values per page, but take more time to load. This increased load time is noticeable when selecting nodes that have array or dictionary properties in the editor.
</member>
<member name="interface/inspector/open_resources_in_current_inspector" type="bool" setter="" getter="">
If [code]true[/code], opens subresources in the current inspector. If [code]false[/code], opens a new inspector view for every subresource edited ([member interface/inspector/resources_to_open_in_new_inspector] is ignored in this case).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an inconsistency between "sub-resource" and "subresource" across the class reference, by the way.
EditorSettings already says "subresource" somewhere else, so I'm just putting this out there for further thoughts.

Copy link
Member Author

@Calinou Calinou Feb 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer keeping subresource everywhere personally. It's kind of like "subroutine" in a way.

doc/classes/EditorSettings.xml Outdated Show resolved Hide resolved
doc/classes/EditorSettings.xml Outdated Show resolved Hide resolved
doc/classes/EditorSettings.xml Outdated Show resolved Hide resolved
doc/classes/EditorSettings.xml Outdated Show resolved Hide resolved
doc/classes/EditorSettings.xml Outdated Show resolved Hide resolved
doc/classes/EditorSettings.xml Outdated Show resolved Hide resolved
doc/classes/EditorSettings.xml Outdated Show resolved Hide resolved
doc/classes/EditorSettings.xml Outdated Show resolved Hide resolved
doc/classes/EditorSettings.xml Outdated Show resolved Hide resolved
@Calinou Calinou force-pushed the editor-move-settings-to-central-location branch from 74a23ab to 617b78d Compare February 16, 2024 20:19
@Calinou
Copy link
Member Author

Calinou commented Feb 16, 2024

I know I'll spend 2 weeks on this whole XML file in the future but it could be nice to have a head-start on the newly introduced descriptions.

Thanks for the review! I've added you as a co-author 🙂

Copy link
Contributor

@Mickeon Mickeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from the fact that it literally will refuse to compile I have nothing against the class reference. At last, these settings can be documented.

@akien-mga
Copy link
Member

Needs this fix:

diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml
index 9982edfbd3..5cfbd3f9dd 100644
--- a/modules/gdscript/doc_classes/@GDScript.xml
+++ b/modules/gdscript/doc_classes/@GDScript.xml
@@ -579,7 +579,7 @@
 			<param index="2" name="step" type="float" default="1.0" />
 			<param index="3" name="extra_hints" type="String" default="&quot;&quot;" />
 			<description>
-				Export an [int] or [float] property as a range value. The range must be defined by [param min] and [param max], as well as an optional [param step] and a variety of extra hints. The [param step] defaults to [code]1[/code] for integer properties. For floating-point numbers this value depends on your [code]EditorSettings.interface/inspector/default_float_step[/code] setting.
+				Export an [int] or [float] property as a range value. The range must be defined by [param min] and [param max], as well as an optional [param step] and a variety of extra hints. The [param step] defaults to [code]1[/code] for integer properties. For floating-point numbers this value depends on your [member EditorSettings.interface/inspector/default_float_step] setting.
 				If hints [code]"or_greater"[/code] and [code]"or_less"[/code] are provided, the editor widget will not cap the value at range boundaries. The [code]"exp"[/code] hint will make the edited values on range to change exponentially. The [code]"hide_slider"[/code] hint will hide the slider element of the editor widget.
 				Hints also allow to indicate the units for the edited value. Using [code]"radians_as_degrees"[/code] you can specify that the actual value is in radians, but should be displayed in degrees in the Inspector dock (the range values are also in degrees). [code]"degrees"[/code] allows to add a degree sign as a unit suffix (the value is unchanged). Finally, a custom suffix can be provided using [code]"suffix:unit"[/code], where "unit" can be any string.
 				See also [constant PROPERTY_HINT_RANGE].

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Feb 16, 2024
@Calinou Calinou force-pushed the editor-move-settings-to-central-location branch from 617b78d to dd89c54 Compare February 17, 2024 09:18
@Calinou Calinou requested a review from a team as a code owner February 17, 2024 09:18
@Calinou Calinou force-pushed the editor-move-settings-to-central-location branch 2 times, most recently from 617b78d to 57983d1 Compare February 17, 2024 10:29
@Calinou Calinou force-pushed the editor-move-settings-to-central-location branch from 57983d1 to 6ae54fd Compare February 17, 2024 10:33
@akien-mga akien-mga merged commit 4731958 into godotengine:master Feb 17, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@Calinou Calinou deleted the editor-move-settings-to-central-location branch March 2, 2024 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants