-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Improve SpriteFrameEditor frame addition ordering #68091
Improve SpriteFrameEditor frame addition ordering #68091
Conversation
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.
Not sure if it's just me but to me the horizontal/vertical part of the orderings seem inverted, e.g. I'd expect "Left to Right, Top to Bottom" to go from left to right first in a column by column manner, and then top to bottom for each such column. But it currently goes row by row from top to bottom and then left to right for each such row (which I think "Top to Bottom, Left to Right" should be doing). 🤔
It might be not clear what the added dropdown is for. Especially when no frames are selected and thus changing selected ordering doesn't affect anything. Thus probably a Label
before the dropdown is needed, just like for the other options.
Another thing is this dialog is getting way too wide because of that many options stacked in a single horizontal line. I suggest moving these into a HFlowContainer
, grouped appropriately into HBoxContainer
s (so contents of each such HBoxContainer
s would stay together):
Overall LGTM. Code looks fine, seems to be working as intended. The usage of map/pair might make the code a little confusing but there's not much of it so it should be fine (few more comments for clarification should do the thing).
Also maybe the numbers/text should not be drawn when zoomed out enough. The text can be bigger than the frame at a certain zoom.
Will take a look at some of the visual details and clean up some code Would "Left to right, then top to bottom" be more clear? I personally read "Left to right, top to bottom" as "left to right in each row, then top to bottom", i.e. row major order, can implement the original suggestion for separate modes for horizontal and vertical and will look into this Edit: now I can see the potential confusion between what order to visualise them as opposed to which order one would sort them, as in a lexicographical sort, will think of how to clarify it |
I don't think it would change anything, "then" is kinda implicitly in there already. I mean with/without it I think the interpretation would be the same (whatever the interpretation is).
Yeah, I can see how it can be interpreted in a different way. That's why I've started my comment with "Not sure if it's just me (...)". Maybe I'm in the minority in here, I don't know. 🙂
If you're referring to my original suggestion (up to 3 dropdowns) then I don't think it would be good. A single dropdown is way easier to use. I considered also submenus (another dropdown from the dropdown) but it would be harder to use and it's not like there are many options to choose from so there's no need to categorize like that. Maybe just adding some text into preceding separators could help? 🤔 (you can pass a text to |
Oh didn't know about separators as text, that I will look into! Thank you |
0648d14
to
a8688ec
Compare
Fixed the various style and code suggestions, added clarifications to the drop down hopefully that makes it clearer, fixed the width of the popup, and made the indices stop rendering when too large @kleonc thank you for your feedback, anything else you can think of? |
a10d1c9
to
b7c6802
Compare
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.
Approving functionality / code, LGTM.
And works fine as far as I've tested.
Leaving the visuals / presentation / wording etc. for the others. 🙂
b7c6802
to
156ab6a
Compare
@kleonc would you mind pointing some relevant code owners to this, I don't know how to and who would be appropriate |
cc @godotengine/2d-editor I guess. You could for example ask for a review in the Contributors Chat (for this one in the editor channel?). And in general you can ask/discuss things in there. |
Thank you will check that! |
156ab6a
to
2908f07
Compare
Nice, I didn't test it yet but the screenshots seem to match what I was proposing. I also get the ambiguity about Left-to-right, Top-to-bottom and reversely. This seems to be the official wording for it, but for users not used to it, I think the categories "By row" and "By column" should make the distinction. The user can play around with the settings the first time and observe the numbers to understand the differences. That said, to make the items clearer there are a few possibilities:
|
@hsandt thank you for you feedback, I'll look into icons! |
2908f07
to
7da7417
Compare
OK, I tested it, I think it's pretty clear even without icons since there are headers "By Row" and "By Column" so we cannot be confused on which one is iterated on first. The selection is also refreshed when changing ordering mode, for immediate feedback, so it's very convenient to use. The only question is whether users will think about revealing the pane on the right when hidden, but it's likely that they do when the slicing is not correct anyway. Plus, I think it was revealed by default, so users have a chance to see it once before they hide it the first time. I also see it was approved by reviewer in the meantime, so it should be good to go! |
7da7417
to
f691603
Compare
I'll go ahead and squash in a little bit if there's no questions about the interface |
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.
A couple of nitpicks, but overall the code looks good. The feature looks great!
f691603
to
2211590
Compare
2211590
to
83d8504
Compare
Thank you! And I'm always happy to get good feedback (Sorry my rebase went weird and it briefly included a previous commit updated, hence the random team) |
Thanks! |
Thank you! |
See the original proposal, implements drawing the index of selected frames and the modes suggested
Fixes: godot-proposals#5679