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: [Network] Keep the refresh button in lowered state while refreshing #9600
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This gives user visual feedback that the refresh is still pending, and prevents people from clicking again and again thinking nothing is happening. This is especially true for connections that fall back to TURN, as that takes a few seconds to kick in. Additionally, prevent clicking on the button again while a refresh is pending. This is only delaying a successful result.
LordAro
approved these changes
Oct 3, 2021
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.
LGTM
TrueBrain
added
the
backport requested
This PR should be backport to current release (RC / stable)
label
Oct 3, 2021
TrueBrain
added a commit
to TrueBrain/OpenTTD
that referenced
this pull request
Oct 3, 2021
…ing (OpenTTD#9600) This gives user visual feedback that the refresh is still pending, and prevents people from clicking again and again thinking nothing is happening. This is especially true for connections that fall back to TURN, as that takes a few seconds to kick in. Additionally, prevent clicking on the button again while a refresh is pending. This is only delaying a successful result.
TrueBrain
added a commit
to TrueBrain/OpenTTD
that referenced
this pull request
Oct 3, 2021
…ing (OpenTTD#9600) This gives user visual feedback that the refresh is still pending, and prevents people from clicking again and again thinking nothing is happening. This is especially true for connections that fall back to TURN, as that takes a few seconds to kick in. Additionally, prevent clicking on the button again while a refresh is pending. This is only delaying a successful result.
TrueBrain
added a commit
to TrueBrain/OpenTTD
that referenced
this pull request
Oct 3, 2021
…ing (OpenTTD#9600) This gives user visual feedback that the refresh is still pending, and prevents people from clicking again and again thinking nothing is happening. This is especially true for connections that fall back to TURN, as that takes a few seconds to kick in. Additionally, prevent clicking on the button again while a refresh is pending. This is only delaying a successful result.
TrueBrain
added a commit
to TrueBrain/OpenTTD
that referenced
this pull request
Oct 3, 2021
…ing (OpenTTD#9600) This gives user visual feedback that the refresh is still pending, and prevents people from clicking again and again thinking nothing is happening. This is especially true for connections that fall back to TURN, as that takes a few seconds to kick in. Additionally, prevent clicking on the button again while a refresh is pending. This is only delaying a successful result.
TrueBrain
added a commit
to TrueBrain/OpenTTD
that referenced
this pull request
Oct 3, 2021
…ing (OpenTTD#9600) This gives user visual feedback that the refresh is still pending, and prevents people from clicking again and again thinking nothing is happening. This is especially true for connections that fall back to TURN, as that takes a few seconds to kick in. Additionally, prevent clicking on the button again while a refresh is pending. This is only delaying a successful result.
TrueBrain
added a commit
that referenced
this pull request
Oct 3, 2021
…ing (#9600) This gives user visual feedback that the refresh is still pending, and prevents people from clicking again and again thinking nothing is happening. This is especially true for connections that fall back to TURN, as that takes a few seconds to kick in. Additionally, prevent clicking on the button again while a refresh is pending. This is only delaying a successful result.
TrueBrain
removed
the
backport requested
This PR should be backport to current release (RC / stable)
label
Oct 3, 2021
LordAro
added
the
backported
This PR is backported to a current release (RC / stable)
label
Oct 23, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation / Problem
I noticed on the Game Coordinator usage statistics, that we see a lot of "Aborted" connections. This happens when a new connection to the same server is being created while another one is still pending. Initially I couldn't figure out when this happens, till I was looking into an unrelated but in the Game Coordinator:
Especially when you have a TURN-connection, one that doesn't allow STUN, refreshing a server takes a few seconds. There is no visual feedback in this GUI to tell you the refresh is still pending, as the button goes up directly after pressing it. This gives you the idea you misclicked or something else went wrong, so you press again. And again. And again.
This PR sets out to resolve this.
As written in the commit message:
Description
Simply track that the server is being refreshed, and keep the state lowered while this holds true. Additionally, prevent clicking on the button again to give a pretty solid UX experience.
retries
wasn't used anymore, so I removed that variable while I was at it.Limitations
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.