zanna-37 / hass-swipe-navigation

↔️ Swipe through Home Assistant Dashboard views on mobile.
MIT License
322 stars 17 forks source link

Swipe on UI Minimalst cards #38

Closed albinmedoc closed 7 months ago

albinmedoc commented 1 year ago

Swiping doesn´t work on UI Minimalist cards. I'm not getting any of the below messages in the console: ↔️ Swipe navigation: [D] Ignoring touch on "app-header". ↔️ Swipe navigation: [D] Swipe ignored, too short. ↔️ Swipe navigation: [D] Swipe ignored, vertical movement. ↔️ Swipe navigation: [D] Ignoring touch: multiple touchpoints detected.

Is there anything we can do in the repository to enable swipe?

zanna-37 commented 1 year ago

Swipe navigation should work by default, are you sure you included everything? I don't use UI Lovelace Minimalist, does it use the standard dashboard view?

albinmedoc commented 1 year ago

What do you mean by the standard dashboard view. How do I now?

This is my panels:

Skärmavbild 2023-02-16 kl  07 06 54

The swiping is working if I'm not swiping over a card (a empty space).

albinmedoc commented 1 year ago

I have tested a bit and it seems like only the #handleTouchMove function is getting called.

handleTouchStart, #handleTouchEnd is not called.

zanna-37 commented 1 year ago

I have no idea why this is. They are attached to the same element, so that's really strange.

Can you send me a minimal configuration that I can try? I need to reproduce the bug.

albinmedoc commented 1 year ago

You need to install UI Lovelace Minimalst through HACS.

Here is a minimal configuration (ui-lovelace.yaml)

---
button_card_templates: !include_dir_merge_named "../../custom_components/ui_lovelace_minimalist/__ui_minimalist__/ulm_templates/"

title: "Minimalist"
background: "var(--background-image)"
swipe_nav:
  animate: swipe
  prevent_default: true
  swipe_amount: 30
  logger_level: verbose
views:
  title: "Vardagsrum"
  path: "living-room"
  cards:
    - type: "horizontal-stack"
      cards:
        - type: "custom:button-card"
          template: chip_back
          variables:
            ulm_chip_back_path: /ui-lovelace-minimalist/home
        - type: "custom:button-card"
          template: card_title
          name: "Living room"

    - type: "custom:button-card"
      template: card_media_player
      entity: media_player.tv_living_room

    - type: "custom:button-card"
      template: card_light
      entity: light.dining_table_living_room
zanna-37 commented 1 year ago

@basbruss I'm very sorry to bother you, but I wanted to ask if you are aware of any problems between hass-swipe-navigation and UI-Lovelace-Minimalist, as albinmedoc is claiming.

If you have no clue, don't worry. I don't want to waste your time, I'll have a look myself. In case this is a known issue, we can discuss a way to allow integration. Thanks!