kinghat / tabbed-card

a custom card for home assistant that utilizes tabs to segregate individual cards.
MIT License
87 stars 10 forks source link

Hide as default #19

Closed YvesZH closed 1 year ago

YvesZH commented 1 year ago

Great card - thanks a lot.

futurerequest: is it possible to set the default value to 'hide'? so that only the register is displayed and no content below (all buttons inactive). In addition, your card 'remembers' the active register despite switching dashboard and reset to hide in x minutes.

Like this:

  - type: custom:tabbed-card
    options:
      defaultTabIndex: hide
      resetToDefault: true #if switch or reload the dashboard
      timeoutToDefault: 5min (or false)

Thanks 🙏

kinghat commented 1 year ago

futurerequest: is it possible to set the default value to 'hide'? so that only the register is displayed and no content below (all buttons inactive).

im not sure what you are asking here. you want to hide the default tab and not show any of the tabs corresponding card?

In addition, your card 'remembers' the active register despite switching dashboard and reset to hide in x minutes.

Like this:

  - type: custom:tabbed-card
    options:
      defaultTabIndex: hide
      resetToDefault: true #if switch or reload the dashboard
      timeoutToDefault: 5min (or false)

Thanks pray

if by "register" you mean tab, it doesnt remember the selected tab if you switch dashboards, only views within a dashboard. im still not sure what you are trying to hide in this card.

YvesZH commented 1 year ago

that with hiding I mean like this: 2249B16C-6E89-4023-AC1D-42186771CD05

Yes sorry i mean tab. In my config, your card just refresh to default, if i restart the app/browser

kinghat commented 1 year ago

that with hiding I mean like this: 2249B16C-6E89-4023-AC1D-42186771CD05

so you want to only see tabs until you click on one, expanding the content below like normal?

Yes sorry i mean tab. In my config, your card just refresh to default, if i restart the app/browser

this is the correct functionality. it follows the rest of the home assistant interface. unless im still not understanding.

YvesZH commented 1 year ago

so you want to only see tabs until you click on one, expanding the content below like normal?

yes 👍

this is the correct functionality. it follows the rest of the home assistant interface. unless im still not understanding.

my ios ha app almost never forgets the last pressed tab over hours. My 'hide as default' idea would only make sense if after a few minutes (or changing the dashboard) no tab would be active again.

sorry for confusing you 🙈

kinghat commented 1 year ago

so you want to only see tabs until you click on one, expanding the content below like normal?

yes +1

i doubt i will be altering the way the underlying component work in any major way. the only major change i envision making to the component is allowing the user to put the tabs on the bottom.

this is the correct functionality. it follows the rest of the home assistant interface. unless im still not understanding.

my ios ha app almost never forgets the last pressed tab over hours. My 'hide as default' idea would only make sense if after a few minutes (or changing the dashboard) no tab would be active again.

which tabs in the ha interface are remembering their selected state over navigation and page reloads? the only place i can see where tabs in the ha interface remember their selected state is under "Developer Tools."

YvesZH commented 1 year ago

which tabs in the ha interface are remembering their selected state over navigation and page reloads?

What I meant: your card (in the current version) 'saves' the selected tab for several hours. Doesn't really matter anymore, my idea is too complicated. Thank you for your efforts.