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

Feature/instance liveness indicators #655

Merged

Conversation

micahmo
Copy link
Member

@micahmo micahmo commented Aug 17, 2023

Pull Request Description

This PR has a few changes related to instances on the profile page.

  1. Instance icons now dissolve in without any vertical movement.
  2. Latency/ping time is shown next to the instance name.
  3. A liveness indicator is shown next to the instance icon. (This is purely based on whether we get a valid response for the icon.)

@hjiangsu For the ping to work on iOS, I found that we need to add an extra package and register on startup. I can't test that, so let me know if you can. Also a general note, the ping package doesn't work on Android emulators (not a big deal).

Future enhancement: I would like to make a similar ping check on startup, in case an instance is down, so the user isn't watching the spinner forever and can change instances if they want. Done in this PR.

Issue Being Fixed

Issue Number: #628

Screenshots / Recordings

output.mp4

Checklist

  • Did you update CHANGELOG.md?
  • Did you use localized strings where applicable?
  • Did you add semanticLabels where applicable for accessibility?

@micahmo
Copy link
Member Author

micahmo commented Aug 19, 2023

Added a border around the indicator.

image

@hjiangsu
Copy link
Member

hjiangsu commented Aug 19, 2023

That looks really good! I'm not at my computer to test out iOS but I like the latency indicator :D

I can test it out when I have the chance

@micahmo
Copy link
Member Author

micahmo commented Aug 20, 2023

One more change: I added special handling for failure to load posts. It mentions the possibility that the user may be offline or the instance may be down. It also offers a direct link to the settings where the user can add/switch accounts/instances. Hopefully this should alleviate issues where Thunder just spins forever on startup when an instance is down. Note that the snackbar will still display the "real" error message for troubleshooting.

qemu-system-x86_64_YndXTkH8MW.mp4

Copy link
Collaborator

@ajsosa ajsosa left a comment

Choose a reason for hiding this comment

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

Looks good to me. Will wait for @hjiangsu or someone else to confirm that it works in iOS as expected.

@hjiangsu
Copy link
Member

hjiangsu commented Sep 2, 2023

@micahmo Tested this on iOS and it is also working as expected - I see both the status indicator and the measured ping times for each instance!

@hjiangsu hjiangsu merged commit eaae55f into thunder-app:develop Sep 2, 2023
1 check passed
@micahmo micahmo deleted the feature/instance-liveness-indicators branch September 3, 2023 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants