-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
feat(AssetManager): Allow editing asset names without a popup #1491
Conversation
It's interesting because to me this is less intuitive :D the effect is very subtle which makes it easy to accidentally click on a name when you just want to select something. I'm also very curious as to your statement
I personally haven't seen this being used anywhere as a default :p Neither windows explorer or the file managers I'm used to on linux have this behaviour by default, nor do online file storage solutions like a google drive. I'm aware they can usually be configured to do so however, but I wouldn't assume this to be done by most people. That said, I do agree that the context menu and action popups can use some UI/UX improvements. I think the bigger issue however is that the extensions are still present on the asset names (#1022), which, I'm going to guess, is the biggest reason why you might need to rename them so often. If that were fixed, would you still have a need to rename assets that often causing the context menu to remain a bother? |
Hm I hadn't thought it would be easy to accidentally click. I always aim for the image when trying to select, but fair point.
I suppose I would say most file managers I've used allow a slow doubleclick to edit the name. I went for what seemed easiest to me, which is similar but not the same as a file manager.
That would take care of a good amount of the renaming certainly. Perhaps a better implementation would be a combination of the old method and this. Instead of clicking the title to initiate a rename, use the context menu option to make the title editable in place. Would that be worth trying? |
That would definitely be an upgrade over what it currently does yeah, |
I changed the way this works to now doing a right-click->rename to make the title editable in-place. The newly editable title gains focus and the text is all selected by default. One issue I have is that there is a linter error I cannot seem to figure out how to fix. It has to do with a part of the file I didn't change. The 2024-10-30.14-07-39.mp4 |
So what is happening with the lint error: Now this is no longer the case and apparently it's not happy. I'm not entirely sure why it's not just making the The solution is rather easy, explicitly tell the computed what type it is: const sections = computed<Section[]>(() => [
...
]); You can import |
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.
Works well! I have a bunch of comments but they're almost all purely nitpicking about small stylistic thing.
I recommend to first check my comment on the canRename
function as some of my other comments may no longer be relevant if you agree with my feedback there.
Thanks for the solution! It was driving me crazy. This gives me flashbacks to C++ template errors and trying to debug those, but this time in a much less familiar language. |
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.
Last miniscule change :D
This allows you to click on the name of an asset or folder and simply modify the name in place, rather than having a popup appear to change the name. You can complete editing by simply pressing Enter or clicking outside of the editable text.
The popup system works fine, but I find it to be cumbersome and less intuitive. It also has the issue of starting with a blank text field instead of the current name of the asset/folder. Most of the time when I'm editing a name, it's to fix a small typo I made, so having to start at a blank slate each time is frustrating.
While this may not be a perfect implementation, it's more similar to what most people would expect after using a modern file browser. I also do not remove the Rename functionality in the context menu in this change so that not everyone is forced into using this system if they're used to the old way.
2024-10-28.18-02-58.mp4