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

Relay Ping Browser #5777

Merged
merged 18 commits into from
Feb 24, 2024
Merged

Relay Ping Browser #5777

merged 18 commits into from
Feb 24, 2024

Conversation

Drulikar
Copy link
Contributor

@Drulikar Drulikar commented Feb 21, 2024

About the pull request

This PR adds a way to ping the relays and also easily connect to them. You can access this panel by clicking the ping near the top right of chat. The ping reported here will likely be inflated from what you will actually experience or see reported by TGChat (its highly dependent on how fast your computer runs the JavaScript, and is based only on a single ping per connection), but should still give an accurate relative difference between the different connections.

When the component is loaded, it starts a timer to begin the pings in 1 second. Whenever the component is unloaded, it indicates this to the ping javascript which will cause it to early return on any pending operations.

The configs are added to examples in relays.txt. You can include it in config.txt.

Explain why it's good for the game

This should give more visibility to the relays, provide an easy way to use them, and give more of an idea the differences in connection speeds to each relay.

Testing Photographs and Procedure

Random values during testing:
image

An actual test example (with last forced to time out):
image

Now with gauges:
image

Now with flex layout:
layout rework

Changelog

🆑 Drathek
ui: Added the relay ping browser accessed by the tgchat ping to test and use alternative connections to the server
ui: Added onConfirmChange prop to Button.Confirm component.
config: Added CONNECTION_RELAY_PING and CONNECTION_RELAY_CON in the relays.txt config that is optionally included in config.txt
/:cl:

@github-actions github-actions bot added the UI deletes nanoui/html label Feb 21, 2024
@iloveloopers
Copy link
Contributor

iloveloopers commented Feb 21, 2024

south america relay when? nice pr tho

Copy link
Member

@harryob harryob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like everyone's getting in on the reviewing action here

tgui/packages/tgui/interfaces/PingRelaysPanel.jsx Outdated Show resolved Hide resolved
@Drulikar Drulikar marked this pull request as draft February 22, 2024 15:54
@Drulikar Drulikar marked this pull request as ready for review February 22, 2024 23:15
@Drulikar Drulikar added the Config drag and drop label Feb 23, 2024
cm13-github added a commit that referenced this pull request Feb 23, 2024
@harryob harryob added this pull request to the merge queue Feb 24, 2024
Merged via the queue into cmss13-devs:master with commit c24ffb7 Feb 24, 2024
26 checks passed
cm13-github added a commit that referenced this pull request Feb 24, 2024
@Drulikar Drulikar deleted the Relay_Ping branch February 24, 2024 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Config drag and drop UI deletes nanoui/html
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants