#ya im working on the gui editor for

1 messages ยท Page 1 of 1 (latest)

torpid shadow
#

I don't have ready to publish code
but the example config is pretty straightforward:

type: custom:actionable-tabbed-card
options:
  defaultTabIndex: 0
styles:
  '--mdc-tab-horizontal-padding': 0
tabs:
  - attributes:
      label: Hallway
      icon: mdi:door-sliding-open
    action:
      action: navigate
      navigation_path: '#hallway'
  - attributes:
      label: Kitchen
      icon: mdi:fridge-outline
    action:
      action: navigate
      navigation_path: '#kitchen'
  - attributes:
      label: Living Room
      icon: mdi:sofa-outline
    action:
      action: navigate
      navigation_path: '#living_room'
#

so basically it just executes an action instead of drawind a card. It can draw a card as well too

pearl sparrow
#

so its just going to be a tab bar of tabs and no content below corresponding to each tab?

torpid shadow
#

basically it as tabbar navigator on most views. yes.
sometimes I use the card if I only want to switch between single card (e.g graphs with different time periods)

pearl sparrow
#

do you have a screenshot available?

torpid shadow
#

The one use I liked is as a navigator between HA (2022.10) "subviews"

#

This one actually navigates the entire view, the tabbar is just constantly placed in all of them

pearl sparrow
#

interesting

#

couldnt you just use ha "Views" concept for dashboards?

#

that puts each view in a tab and then you can put whatever in each view. even subviews iirc.

torpid shadow
#

I guess I could but then I would have to make separate dashboards for different types (media palyers / shutters / weather / transport / AIQ) otherwise tabs will be mixed between them.

#

And I wouldn't get the cool "back" arrow taking me straight where I navigated from

#

oh ,wait
you expected me to put whole view content into Tabbed Card card: config?

pearl sparrow
#

if you have the ability to record gifs i would love to see the full interface and you navigating it.

#

no no

#

like the full ha interface showing the dashboard and all.

torpid shadow
#
  • my setup is still in a big mess rn ๐Ÿ˜…
pearl sparrow
#

np and thanks.

#

were you the one who opened the issue about having hidden content until a tab is acted on?

torpid shadow
#

nope
actually I prefer it the way it is now
I wouldn't mind even if tab content got unloaded when it's hidden for some time.

#

That would be good for some heavy cards (statistics and stuff)

pearl sparrow
#

ill look into that. i know that nothing is loaded until you click on it first.

#

at least i thought thats the way i had it

torpid shadow
#

I do use it with card: option as well for some cases.
It works nice for re-configuring time periods for LTStatistics.

pearl sparrow
#

oh that is nice!

#

im still trying to wrap my head around your custom card modifications lol

#

so when you click the tab that executes an action to change your browsers nav path, which is tied to a subview, and thomas' state card swaps subview content?

torpid shadow
#

either
currently I use it mostly for navigation between subviews

#

using with state-switch is technically easier

#

since user is staying on the same view but swapping selected cards

pearl sparrow
#

so in the first video, thomas' state switch isnt being used?

torpid shadow
#

no

#

it was my first implementation
but it turned out using with subviews more useful

#

I wanted to swap too much content so navigating view was more practical

#

using with state-switch for 1 or 2 cards that are just below it ... I can just use tabs to switch them.

#

I guess if I had views where half of the cards being identical and other half need to be modified it would make better case for state-switch.

#

Anyway the mod itself is very simple - wait until tab animation finishes and execute standard HA action. Card param is optional and empty element is rendered when not provided. That's all.

#

(+there is also another param that resets selected tab to initial - to be used when action navigates away into another view)

pearl sparrow
#

very cool. always interesting to see how things are remixed. if you ever want to share the code id love to check it out. do you have any other cards that you started or work on?

torpid shadow
#

I have a couple of simple mods to existing cards:

  • calendar sidebar loaded as a view
  • mod to multiple-entity-row allow multiple attributes, prefix and suffix to secondary_info: param
  • a mod of HA media background card that sets artwork and css computed colors on it's parent element
  • custom loaded for Button Card/ Decluttering Card templates - allowing me to use templates from .yaml files with gui dashboards
  • few known cards with pull requests that haven't been accepted by org. dev
#

I generally don't have a full card written from scratch. I'm trying to stick to known stuff for now for low maintenance setup. Also I'm not so confident in developing yet.

#

maybe one day

#

anyway it's time for me to go, it's 2:30 am already

#

(media background mod in action)

pearl sparrow
#

you are the great remixer ๐Ÿ™Œ