osu icon indicating copy to clipboard operation
osu copied to clipboard

Fix multiple cases of mutations at editor setup screen not triggering a state save

Open peppy opened this issue 3 years ago • 1 comments

Reproduction:

  • Enter editor and change title, then hit escape to exit
  • Note that prompt to save will not appear
  • [x] Depends on https://github.com/ppy/osu-framework/pull/5331
  • [ ] Depends on framework bump

This has the side-effect of creating undo state, which is fine, but the setup screens don't support restoring previous states' content. So actually performing an undo looks invisible currently. I'm not sure this is a deal-breaker to get the more important issue fixed (dirty state not being recognised), but it's definitely not an easy one. Will involve figuring out if we want to use bindable flow, switching the editor to use live realm data, etc.

peppy avatar Aug 02 '22 07:08 peppy

The test failures here are a bit unfortunate:

JetBrains Rider-EAP 2022-08-02 at 12 07 56

I think this probably shouldn't be considered "new" text, so I'll PR a framework fix and leave this one hanging for now.

peppy avatar Aug 02 '22 12:08 peppy

I believe the aforementioned framework fix was https://github.com/ppy/osu-framework/pull/5331? I've merged master to get it in here to check off the second box.

As for this change - it looks like a step in the correct direction, but it doesn't cover everything that can be done at the setup screen. Cases I've found where changes still don't trigger a save dialog include:

  • Changing any of the difficulty sliders
  • Changing stack leniency on osu! maps
  • Changing special style toggle on mania maps

Any reason not to take care of those as well, or was that just an omission?

bdach avatar Aug 14 '22 16:08 bdach

I believe the aforementioned framework fix was ppy/osu-framework#5331? I've merged master to get it in here to check off the second box.

That's correct yeah.

As for this change - it looks like a step in the correct direction, but it doesn't cover everything that can be done at the setup screen. Cases I've found where changes still don't trigger a save dialog include:

  • Changing any of the difficulty sliders
  • Changing stack leniency on osu! maps
  • Changing special style toggle on mania maps

Any reason not to take care of those as well, or was that just an omission?

Just addressed the ones I ran into. I can look at those too.

peppy avatar Aug 16 '22 02:08 peppy