-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Add ability to edit beatmap content externally #28800
Conversation
await inStream.CopyToAsync(outStream).ConfigureAwait(false); | ||
} | ||
|
||
return new ExternalEditOperation<TModel>(this, model, mountedPath); |
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.
Q:
Would it be better to have fixed mounted path? It will let user easier to load the project like vscode.
Also, Lazer can only edit one beatmap one time, so there's no need to give the folder a hash?
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.
Except filesystems are not as durable as you think they are and reusing a path leads to many issues like "oh this folder isn't writable because someone broke something" "oh this directory is being used by something else and therefore cannot be written to" "oh files got left over here and now random stuff is going to make it in".
I agree with the choice of not using a fixed path.
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.
Hmm... I'll have a think about this one. I can see the benefits for having it fixed, but as @bdach touches on it would need extra error handling.
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.
I think this should be considered as a follow-up effort if ever.
If we're to allow this, we'd probably not want to delete the files when re-importing so the user can keep an external editor open or something. It has a lot of considerations and a lot of opportunity for breakage.
Would probably say that it's a lower priority and time is best spent elsewhere now that we have the initial support in, unless we get a huge number of complaints from users that what has been implemented doesn't meet their needs.
Beatmaps that are edited through this flow do not receive "locally modified" status and instead appear to have none. 2024-07-10.12-54-54.mp4I also got to a state once where this started getting thrown:
Not sure what I did precisely to trigger it, I was doing a lot of exiting and re-entering the mounting screen as it was doing its things to see how it reacts. Full log here, maybe it'll help: 1720608222.runtime.log |
I feel this may be fixed by b6741ee.. exiting the screen wasn't properly being blocked until completion. |
I've applied all feedback, added error handling and (hopefully) simplified things a bit. |
I've applied follow-up changes to address some remaining concerns of mine, please check them. I'm sure we'll get some reports about some things in this flow not quite working but I'm not willing to go fish myself so let's get this in and see what happens. |
Changes look fine 👍 . |
At a low level, this will work for all realm models (and can be reused easily for skins). I'll look at implementing for the skin editor separately though.
osu.2024-07-10.at.09.20.55.mp4
Closes #18902