UNDO script asset create can lose data if file is unsaved
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 7.8k
- Forks
- 1.2k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 49
Description
Release Type: official 4.0.0.1 beta 2 0926
Version: official 4.0.0.1 beta 2 0926
Platform(s): Windows
Describe the bug
Xenko UNDO has separate contexts for the project assets, and each text-editor, which leads to non-intuitive behavior when trying to use the built-in editor... If focus is accidentally not in the editor, pressing undo can remove the entire file if the last action was to add the script, which is non-intuitive and dangerous if the file is not saved.
To Reproduce
Steps to reproduce the behavior:
- add a script
- edit the contents of the script (and dont save)
- click in the solution explorer
- press undo (ctrl-Z)
- WITNESS: it removes the script from the project, blowing away edits
Expected behavior
EXPECTED: Xenko to show a warning before removing an unsaved script file asset.
Additional context
Pretty much other editor environment I use (such as visual studio) has a single global UNDO stack.. which means if you press undo, it will remove the last action you did globally in the application, regardless of your focus context. It's very very non-intuitive that in Xenko, if you change the focus and undo, it will undo different things.
In itself, this is not necessarily a problem.. but if you can accidentlaly undo a scrip asset create, that causes the removal of a script asset, without a warning dialog.. that's a problem.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source files or tests are named in the issue. Start by reproducing the undo sequence in the Xenko editor, then trace the project-asset and text-editor undo contexts. Done means undoing an unsaved script asset creation warns before removal and does not silently discard edits.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop, game-dev, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100