jurialmunkey / skin.arctic.fuse

Other
143 stars 21 forks source link

:bug: Subemenu widget navigation does not return focus when leaving folder #916

Closed Joosh-Booth closed 1 week ago

Joosh-Booth commented 1 month ago

Skin section

Widgets

Current Behavior

If a category has a >1 submenus AND if on any submenu except the leftmost. When accessing a folder via the submenus widget, if I want to return home focus is not placed back on the item. Instead focus is returned to the sidemenu and to access that sidemenu again, I must change (via down/up) off of it and back onto it.

The expected behaviour works if you access a category widget, or the leftmost submenu widget.

Expected Behavior

When accessing a folder e.g. a TV show, I am taken to the episode/season list If I click back/return, I should be placed back in the submenu with focus on the TV show that I clicked.

Steps To Reproduce

Steps assume you have a setup similar to mine, additonal info contains the two categories used.

  1. Start on home page
  2. Go right to category 2 (Watchlist in my case)
  3. Go down to submenu
  4. Go right to submenu option 2 (Shows in my case)
  5. Go down into widgets
  6. Select any of the displayed folders (TV Shows in my case)
  7. Go back (B)
  8. Focus is now on the sidemenu and the only way to regain it is by pressing down

Screenshots and Additional Info

Video showing the issue

https://github.com/jurialmunkey/skin.arctic.fuse/assets/37447453/ec06e9db-6889-4b70-8138-75cc7e6bb7bb

For a replica of my current layout - an extract from skinvariables-shortcut-homemenu.json:

{
    "label": "Continue",
    "path": "noop",
    "icon": "special://skin/extras/icons/watched-hide.png",
    "target": "videos",
    "sidemenu_guid": "{Your sidemenu guiid}",
    "guid": "guid-12cd7010",
    "widgets": [
      {
        "label": "Movies",
        "path": "plugin://plugin.video.themoviedb.helper/?tmdb_type=movie&list_name=Your+In-Progress&tmdb_id=None&info=trakt_inprogress&sort_by=added&sort_how=desc&widget=true&reload=$INFO[Window(Home).Property(TMDbHelper.Widgets.Reload)]&reload=$INFO[Window(Home).Property(TMDbHelper.Widgets.Reload)]",
        "target": "videos",
        "guid": "guid-16369320",
        "widget_style": "Sign"
      },
      {
        "label": "Shows",
        "path": "plugin://plugin.video.themoviedb.helper/?tmdb_type=tv&list_name=Your+In-Progress&tmdb_id=None&info=trakt_inprogress&sort_by=added&sort_how=desc&widget=true&reload=$INFO[Window(Home).Property(TMDbHelper.Widgets.Reload)]&reload=$INFO[Window(Home).Property(TMDbHelper.Widgets.Reload)]",
        "target": "videos",
        "guid": "guid-ecd54a26",
        "widget_style": "Sign"
      }
    ]
  },
  {
    "label": "Watchlist",
    "path": "noop",
    "icon": "special://skin/extras/icons/watched-hide.png",
    "target": "",
    "sidemenu_guid": "guid-745b6ed7",
    "guid": "guid-296ea096",
    "submenu": [
      {
        "label": "Movies",
        "path": "noop",
        "icon": "special://skin/extras/icons/watched-hide.png",
        "target": "",
        "sidemenu_guid": "{Your sidemenu guiid}",
        "guid": "guid-cb6b66d0",
        "widgets": [
          {
            "label": "Moviesrites",
            "path": "plugin://plugin.video.themoviedb.helper/?tmdb_type=tv&list_name=Favourites&tmdb_id=None&info=trakt_favorites&sort_by=rank&sort_how=desc&widget=true&reload=$INFO[Window(Home).Property(TMDbHelper.Widgets.Reload)]&reload=$INFO[Window(Home).Property(TMDbHelper.Widgets.Reload)]",
            "icon": "special://skin/extras/icons/star.png",
            "target": "videos",
            "guid": "guid-7bf93600"
          }
        ]
      },
      {
        "label": "Shows",
        "path": "noop",
        "icon": "special://skin/extras/icons/watched-hide.png",
        "target": "",
        "sidemenu_guid": "{Your sidemenu guiid}",
        "guid": "guid-ba66e096",
        "widgets": [
          {
            "label": "Favourites",
            "path": "plugin://plugin.video.themoviedb.helper/?tmdb_type=tv&list_name=Favourites&tmdb_id=None&info=trakt_favorites&sort_by=rank&sort_how=desc&widget=true&reload=$INFO[Window(Home).Property(TMDbHelper.Widgets.Reload)]&reload=$INFO[Window(Home).Property(TMDbHelper.Widgets.Reload)]",
            "icon": "special://skin/extras/icons/star.png",
            "target": "videos",
            "guid": "guid-7bf93601"
          },
        ]
      }
    ]
  }

Checklist

ambulancePilot commented 1 week ago

I just realized I think I'm having the same issue as you, except I'm using a top menu. #974

jurialmunkey commented 1 week ago

I just realized I think I'm having the same issue as you, except I'm using a top menu. #974

No, these are two very separate issues.

The issue here is that Kodi resets focus of the submenu of categories back to the first position because there are multiple submenus (each for a different category) and so Kodi gets confused and resets them back to 1.

It doesn't actually affect navigation at all, it's just annoying because if for e.g. you click "Genres" in a submenu then you expect to land back on Genres after pressing back to return Home but instead you might end up on some other button.

The other issue with the navigation is a separate matter to do with the unfocused state getting returned to the sidemenu without triggering the focus conditions to set the right properties (which in a roundabout way is caused by the submenu issue because focus got lost).

-i.e. fixing #974 will solve the navigation issue here too but it still won't solve the submenu focus issue.