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

Increase the page size for array/dictionary editors to 20 #44864

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Jan 1, 2021

With smaller arrays/dictionaries, this makes it possible to view all of an array/dictionary's items on a single page.

Larger values could be used, but make switching between node selections quite slow, especially on low-end CPUs. They could also be problematic with complex resource inspectors for arrays/dictionaries that contain Resources.

The change is trivially cherry-pickable to 3.2 and has been tested there.

This closes godotengine/godot-proposals#2058.

@Calinou Calinou added cherrypick:3.x Considered for cherry-picking into a future 3.x release enhancement topic:editor usability labels Jan 1, 2021
@Calinou Calinou added this to the 4.0 milestone Jan 1, 2021
@EricEzaM
Copy link
Contributor

EricEzaM commented Jan 4, 2021

Why not an editor setting? I know they are a bit bloated atm but this seems like a good one to have actually.

@Calinou Calinou force-pushed the editor-array-dictionary-increase-page-size branch from 7aa4462 to 5be0e70 Compare January 4, 2021 17:05
@Calinou
Copy link
Member Author

Calinou commented Jan 4, 2021

@EricEzaM I added a setting for it, which you can configure between 10 and 100 (defaults to 50).

The setting change applies when you select a node – no need to restart the editor.

@akien-mga
Copy link
Member

I'm fine with making this configurable, but isn't 50 a lot? I'm not concerned about performance but about usability, if you have an exported array or dictionary and expand it, it will push all other node properties very far to the end of the scroll bar. I'm not sure that's better than the current experience to have a paged editor with 10 entries per page, which still lets you access other properties in the same/next "screen".

@akien-mga
Copy link
Member

I'm fine with making this configurable, but isn't 50 a lot? I'm not concerned about performance but about usability, if you have an exported array or dictionary and expand it, it will push all other node properties very far to the end of the scroll bar. I'm not sure that's better than the current experience to have a paged editor with 10 entries per page, which still lets you access other properties in the same/next "screen".

Discussed it with @reduz, we agree that 20 would be a better default value.

If you need to edit arrays with more than 20 items, chances are that using the inspector is not the best workflow and it would be better to edit them nicely formatted in GDScript or have them serialized in JSON or ConfigFile resources.

@Calinou Calinou force-pushed the editor-array-dictionary-increase-page-size branch from 5be0e70 to 764cd98 Compare February 12, 2021 16:02
With smaller arrays/dictionaries, this makes it possible to view all of
an array/dictionary's items on a single page.

Larger values could be used, but make switching between node selections
quite slow, especially on low-end CPUs. They could also be problematic
with complex resource inspectors for arrays/dictionaries that contain
Resources.

This closes godotengine/godot-proposals#2058.
@Calinou Calinou force-pushed the editor-array-dictionary-increase-page-size branch from 764cd98 to d97d65b Compare February 12, 2021 16:03
@Calinou
Copy link
Member Author

Calinou commented Feb 12, 2021

I've changed the default number of items per page to 20. It can still be increased up to 100 in the Editor Settings.

@Calinou Calinou changed the title Increase the page size for array/dictionary editors to 50 Increase the page size for array/dictionary editors to 20 Feb 19, 2021
@akien-mga akien-mga merged commit dc1ae06 into godotengine:master Feb 19, 2021
@akien-mga
Copy link
Member

Thanks!

@akien-mga
Copy link
Member

Cherry-picked for 3.2.4.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Feb 21, 2021
@Calinou Calinou deleted the editor-array-dictionary-increase-page-size branch March 31, 2021 09:42
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.

Add Editor Setting to disable large Arrays/Dictionaries being split into Pages
3 participants