Code quality & UX cleanup: various minor issues
Summary
A collection of minor issues, cosmetic fixes, and code organization improvements gathered from recent development.
1. Inspector: double-click in TypeAssetRef should select asset in browser
In the inspector widget, double-clicking a TypeAssetRef field should select/highlight the corresponding asset in the asset browser, making it faster to locate assets referenced in components.
2. Inspector: remove asset path and type display
The inspector currently shows the asset path and type. Remove it — it's redundant with the asset browser and clutters the UI.
3. Inspector & Scene Hierarchy: remove "No object selected"
The inspector and scene hierarchy both display a "No object selected" message. Remove it; an empty/blank state is cleaner and expected.
4. Asset browser: show relative path from assets/
The asset browser currently shows the full project path. It should instead display only the relative path starting from <PROJECT_PATH>/assets/ onward, keeping the UI clean and focused on the asset tree structure.
5. Asset browser: remove refresh button
The refresh button in the asset browser should be removed. File changes are now monitored via a file watcher, so manual refresh is no longer needed.
6. Top bar Recent-project widget: deduplicate by full path
The Recent-project widget in the top bar should consider the full absolute path when comparing projects to avoid duplicates. For example, opening a project via ../sample-01 and then via /dev/sample-01 currently shows two separate entries even though they refer to the same directory.
7. Split oversized source files & organize by feature
Several source files have grown past 500+ lines, making them hard to navigate. We should:
- Split large files into smaller, more focused modules.
- Organize code by feature using folders instead of keeping everything flat.
8. Refactor editor/GameBuild.zig
editor/GameBuild.zig is not only gigantic but also a mess of string concatenation for code generation. Suggestions:
- Write a valid Zig template file and use regex/substitution to inject runtime-generated code instead of string-building.
- The current implementation only works for x64 (and Apple Silicon support is uncertain).
- Split x64-specific code into a separate file and add an abstraction layer for future platforms such as Android, iOS, and consoles.
9. Scene viewport: extract play-mode into a dedicated panel
Play-mode was implemented inside/merged with the scene viewport. It should be extracted into a separate dedicated panel for better UX and clearer separation of concerns.
10. Asset and scene node inline renaming: both are buggy
both asset browser and scene hierarchy have item renaming. but
- the scene nodes create the inline textfield, but they are not editable. also, it clamps the name when the orignal is too long
- the asset browser simply show the inline textfield for a frame or so, then return automatiicaly. maybe its listening to the F2 key in multiple frames?