kinghat / tabbed-card

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

Attributes not working #13

Closed davehahn closed 1 year ago

davehahn commented 1 year ago

I real love this componet but the attributes section does not function as described in the readme,

type: custom:tabbed-card
tabs:
  - label: 2
    card:

function fine but

type: custom:tabbed-card
tabs:
  - attributes:
      label: 2 # local attributes that apply only to individual tabs
      icon: mdi:play
    card:

produces a tab with out any label or icon.

Any help would be greatly appreciated.
Keep up the great work,

Oh this is happenning on HA 2022.10.0 with the pluggin added through HACS

kinghat commented 1 year ago

I real love this componet but the attributes section does not function as described in the readme,

type: custom:tabbed-card
tabs:
  - label: 2
    card:

function fine but

type: custom:tabbed-card
tabs:
  - attributes:
      label: 2 # local attributes that apply only to individual tabs
      icon: mdi:play
    card:

produces a tab with out any label or icon.

Any help would be greatly appreciated. Keep up the great work,

youre the first known user of my component, cool! sorry it isnt working as expected. its probably because i havent cut a release that is caught up with the readme. i will do that by this evening and you can try your config with that release.

Oh this is happenning on HA 2022.10.0 with the pluggin added through HACS

i wasnt aware that the component had been pushed to the default repository yet :thinking: was this added via "custom repositories" in HACS?

kinghat commented 1 year ago

i wasnt aware that the component had been pushed to the default repository yet thinking was this added via "custom repositories" in HACS?

looks to be the case. it hasnt been merged yet: https://github.com/hacs/default/pull/1512

kinghat commented 1 year ago

pushed out a new release: https://github.com/kinghat/tabbed-card/releases/tag/v0.3.0

lmk how it works out.

davehahn commented 1 year ago

You are correct, I added this as a custom repository in HACS. This really scratched an itch I needed in a couple of my Dashboards, so I am greatly appreciated. As of your recent push the ( v0.3.0) the icons are now displayed which is awesome. The only issue is the icons do not respect the "--mdc-tab-text-label-color-default" attribute. I can guess thhis is because the icon is an svg and not a label.

I have one more for the wish list, not sure if this is possible using mwc, the "minWidth: true" atrribute does in fact shrink the atual tab siz, but the tabs are still spread evenly accross top

current

What I would love to happen is the would all left align

wish

To got that screen shot by changing a css property on the flex: 1 0 auto; to flex: 0; . Not sure if you can change that behavior or if it is part of mwc-tab.

Either way this is greatly appreciated, keep up the great work

kinghat commented 1 year ago

I have one more for the wish list, not sure if this is possible using mwc, the "minWidth: true" atrribute does in fact shrink the atual tab siz, but the tabs are still spread evenly accross top

current

What I would love to happen is the would all left align

wish

To got that screen shot by changing a css property on the flex: 1 0 auto; to flex: 0; . Not sure if you can change that behavior or if it is part of mwc-tab.

Either way this is greatly appreciated, keep up the great work

im not sure i want to support styling outside of the mwc-* component scope. i will keep it in mind as i continue work on the project.

As of your recent push the ( v0.3.0) the icons are now displayed which is awesome. The only issue is the icons do not respect the "--mdc-tab-text-label-color-default" attribute. I can guess thhis is because the icon is an svg and not a label.

can you open a new issue, since its different, and post the full config youre using and a screenshot of the issue so i can better see what is going on and test locally?