Skip to content
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 default value for input boxes in tournament editor screens #30087

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

CloneWith
Copy link
Contributor

Goal

In the current version of osu!lazer tournament client, there are small restore buttons that restore the current value of input boxes to their default. But most of them just revert to an empty string, which isn't so friendly in cases where we accidentally modified one and cannot easily undo this change unless restarting the client.

For this we can read values from the model, setting them default values on component loading. Then we can still access the initial value even after we save changes, as long as we haven't close the tournament client.

@bdach
Copy link
Collaborator

bdach commented Oct 3, 2024

I'm not sure this makes much sense even conceptually... The undo controls are mostly there by accident due to reuse of existing components that had undo components which made sense. I don't know how useful it is having these. Even given this justification:

For this we can read values from the model, setting them default values on component loading. Then we can still access the initial value even after we save changes, as long as we haven't close the tournament client.

If the feature worked like this maybe it'd be useful, except it doesn't, because pressing "Save changes" doesn't make the undo buttons go away. I'd argue if the goal here was to mark "dirty" unsaved fields, then saving should make the undo buttons disappear.

@peppy
Copy link
Member

peppy commented Oct 3, 2024

Yeah it feels like incorrect usage of the "revert" control which goes against user expectations..

@CloneWith
Copy link
Contributor Author

CloneWith commented Oct 3, 2024

If the feature worked like this maybe it'd be useful, except it doesn't, because pressing "Save changes" doesn't make the undo buttons go away. I'd argue if the goal here was to mark "dirty" unsaved fields, then saving should make the undo buttons disappear.

Seems good from the perspective of users. Can be taken into account.

Then it should be like that when we save the changes, the new values are set to the default.

@pull-request-size pull-request-size bot added size/L and removed size/S labels Oct 5, 2024
@CloneWith
Copy link
Contributor Author

The latest commit uses a public BindableBool in TournamentGameBase. When change saving is triggered, this boolean value would be also changed, updating default values of input boxes after this.

@peppy
Copy link
Member

peppy commented Oct 22, 2024

I don't like the complexity overhead of the added code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants