home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
4.01k stars 2.74k forks source link

Subview button required several clicks to respond #15424

Closed joakimjalden closed 1 year ago

joakimjalden commented 1 year ago

Checklist

Describe the issue you are experiencing

Sometimes the back button from a subview requires several clicks to respond to the command and return the UI to the view from which the subview was entered. See a more elaborate discussion of the issue in my forum post #532892.

Describe the behavior you expected

Returning immediately to the previous view when clicking the back button.

Steps to reproduce the issue

Using the minimal dashboard example below, with the numerical sensor at the end replaced by any suitable numerical sensor that provides a History graph in a popup when clicked

  1. Enter the subview by clicking the button
  2. Klick on the value to bring up the History graph in the info panel pop-up
  3. Close the pop-up window

Now (at least on my system), the subview back button (in the upper left corner) becomes unresponsive for 3 clicks and returns to the main view (with the single button) on the fourth click.

title: Example
views:
  - path: view
    title: View
    cards:
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: navigate
          navigation_path: /dashboard-subview/subview
  - theme: Backend-selected
    title: Subview
    path: subview
    subview: true
    badges: []
    cards:
      - type: entities
        entities:
          - entity: sensor.ficus_benjamina_moisture

What version of Home Assistant Core has the issue?

Home Assistant 2023.2.3

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

Microsoft Edge Version 109.0.1518.78 (Official build) (64-bit) AND iOS companion app

Which operating system are you using to run this browser?

Windows 10 AND iOS Version 16.1

State of relevant entities

No response

Problem-relevant frontend configuration

See the steps to recreate the issue above

Javascript errors shown in your browser console/inspector

None

Additional information

The issue does not seem to appear if the numerical sensor is replaced by a sensor with discrete states ('on', 'off', etc) in the colored history bar. In the minimal example given it needs to be a sensor with a history graph.

github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

joakimjalden commented 1 year ago

This is not resolved in the latest version of Home Assistant.

roderik-maker commented 1 year ago

This is not resolved in the latest version of Home Assistant.

Are you using popups? Every time you open a pop-up while in a subview it requires an extra click on the back button to go back. I think the popup gets added to your "history" so pressing the back button brings you back to the "previous page", but that is actually still the same page (the page that launched the popup). Unfortunately, I haven't been able to find a fix for this. If you want to show a further submenu from a subview, I suggest navigating to a different subview.

Edit: After some further searching I did find the following. If you want your subview back button to always send you back to the same dashboard you can set the "back_path" variable. Then if you press the back button it will always navigate you to the provided path.

github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.