Add the possibility to edit keys from dictionaries#119162
Conversation
d45ec99 to
b295e2b
Compare
|
I missed all the previous versions and I'm coming in fresh, and I totally don't get why we don't just make the keys editable like values. My main issues with this design are having an edit icon behind the value, because it doesn't imply you can click it to edit the key. Also, after choosing the 'edit key' option, it's very strange you have to toggle back to editing value. It's a sort of opaque state and makes the entire list of properties look strange. And so I circle back to: why not just make both the key and the value editable like they're two values side by side? |
I've just discovered that we have added the inspector context menu to the list of available context menu slot, would placing the edit key there be better. I feel like it would be less discoverable then a button or inside the change type but make more sense. I could also add a copy/paste key when editing value and copy/paste value when editing key but addition of copy/past could wait for another PR. |
|
Sorry, I haven't had much time to dive deeper into this, but perhaps we should differentiate the editor between typed and untyped dictionaries. In a typed dictionary without the type dropdown, it may very well be totally fine to show the two input fields side by side? And in untyped, maybe we simply show the key and value in two rows so each input can take up the whole width, and we 'fix' differentiating the items graphically? |
|
Would you like to rebase this? I want to test it out to see if it fixes #120486 satisfactorily. If so, you should edit the description to say it does. |
b295e2b to
261c6c8
Compare
I've rebased it. Feel free to test it. If you feel it is not satisfactory feel free to suggest changes to help fix the issue. |
|
The fix works for untyped dictionaries, but I found a strange bug with typed: 2026-07-03.15-46-08.movAlso, that paper clip next to the Anyway, this bug should be ironed out before it can be retested. (Also that is the longest branch name I've ever seen lol) |
|
Yeah sorry I rebased a bit too quick I think it might have broke something. I will try to iron this bug out so that you can test it again. |

Supersedes #90258
This started as a salvage of this previous PR as I was reminded of it but in the end I went way farther and improve quite a bit how it looks.
I've made it so that when editing the key the editor property is reversed which means label is on the right, main editor is on the left and bottom editor is on top.
As in some cases having some bottom editor on top made it somewhat unreadable I added a border through th esame system of border as for object,array and dict.
I would really like to have feedback from a usability standpoint if it makes sense, if anyone would have ideas to improve or find anything that doesn't work well with my solution.
For now this is marked as draft as I haven't made the change to the classic theme and will wait for usability feedback before applying the changes.
Here are a few screenshots of how it looks like in modern theme :

