house-of-abbey / GarminHomeAssistant

Garmin application to provide a dashboard to control your Home Assistant
https://community.home-assistant.io/t/home-assistant-app-for-garmin/637348
MIT License
81 stars 12 forks source link

Tap confirmation toast does not disappear without user intervention #181

Closed denisfrench closed 1 day ago

denisfrench commented 2 weeks ago

Describe the bug The readme (https://github.com/house-of-abbey/GarminHomeAssistant?tab=readme-ov-file#tap-item-response) states the tap item confirmation toast will disappear after a short while if not dismissed by the user, however it seems to remain unless a button is pressed.

IMPORTANT! I have:

To Reproduce Steps to reproduce the behavior:

  1. Activate tap item.
  2. Confirmation toast appears.
  3. Wait for toast to disappear.
  4. Application times out before toast disappears (timeout currently set to 30s).

Expected behavior The toast should disappear promptly, rather than adding to the required button presses to exit the app (currently 3 presses).

Screenshots N/A

Garmin Device (please complete the following information):

Smartphone (please complete the following information):

Additional context The great utility of this watch app is to switch simple entities very quickly without reaching for your phone. Any increase in delay or button presses detracts from this; I suggest the toast really only needs to remain for 1-2s.

Thanks for your work on this awesome app 😀

philipabbey commented 2 weeks ago

This is a real problem, since there is no API call to remove the toast. The showToast() documentation gives no additional call to remove it, precisely because the toast is supposed to have its own timeout. So the only recourse we have it to not show confirmation via a toast at all, for all devices for all users.

Do other applications using toasts behave the same way on your watch?

denisfrench commented 1 week ago

I'm not sure if this actually tests the toast function, but message and GPS notifications do disappear quickly within the native run app.

If this isn't a valid test, could you point me to an app I can properly test the toast function with?

philipabbey commented 1 week ago

Sounds like a valid test. On a Venu 2 inside the GHA App, a 'toast' can take 15 seconds to dissappear.

philipabbey commented 1 week ago

So the options are:

  1. Leave the functionality unchanged, accept the need to manually dismiss a 'toast'.
  2. Remove the display of a toast for all (devices & users).

In the meantime I have amended the documentation at https://github.com/house-of-abbey/GarminHomeAssistant/blob/main/README.md#tap-item-response.

denisfrench commented 1 day ago

Fair enough; thanks for investigating anyway 🙂