Closed acesyde closed 2 years ago
Hi @ofekashery
I have some problems with history-graph
and humidifier
I don't understand why these components keep their borders :(
Can you help me to finish ?
Sample
type: custom:vertical-stack-in-card
cards:
- type: light
entity: light.ceiling_lights
- type: button
tap_action:
action: toggle
entity: switch.decorative_lights
- type: history-graph
entities:
- sun.sun
- type: humidifier
entity: humidifier.humidifier
Screenshot
@acesyde I am not sure whether this is intended or not, but for me the updated card removes the ha-card-border-radius set in the theme. This issue had previously been solved: 81
@acesyde
removing ele.style.borderRadius = '0';
(line 102 & 124 in src/vertical-stack-in-card.ts)
solved my issue and also removes the borders from history-graph
and humidifier
Could you verify?
Please also check whether this bricks something else.
Hi @M4D1NG3R
I removed these 2 lines of code (existing in current code)
But the borders are still here :(
And I don"t know why the styles are not applied on these cards
ok, I am sorry, I just rebuild it, but this time it also did not work for me. I might have had the original file in cache.
Also, I get some weird behavior when using the mushroom chip card: on the one side the theme is applied, on the other it's not.
When comparing https://github.com/ofekashery/vertical-stack-in-card/commit/d0cb3bfcaa3f9a45f0b1b5f62cf9259d09deda23 which fixed https://github.com/ofekashery/vertical-stack-in-card/issues/81. Only a few lines changed one of them is the addition of:
line 39 card.style.overflow = 'hidden';
Unfortunately, I can't do anything with it, I'm too inexperienced for that. Does this help you?
Ok, I may have the fix for my issue:
adding overflow: hidden;
after line 171 fixed my issue.
this needs to be done additionally to removing ele.style.borderRadius = '0'; (line 102 & 124 in src/vertical-stack-in-card.ts)
@M4D1NG3R ok I will add that after
But with the original card (js not ts) I have also the same problem with histroy-graph
@acesyde Yeah, me too, do you have the same problem with stack-in-card?
@acesyde Yeah, me too, do you have the same problem with stack-in-card?
I don't know, tomorrow I will try it
It seems to works better with stack in card, thanks for the advice, so I need to investigate ;)
@acesyde please try replacing line 69-77
// Style cards
this._cards.forEach((card) => {
if ((card as any).updateComplete) {
(card as any).updateComplete.then(() => this._cleanCardStyle(card));
} else {
this._cleanCardStyle(card);
}
});
}
with:
// Style cards
this._cards.forEach((card) => {
this._waitForUpdate(card);
window.setTimeout(() => {
this._waitForUpdate(card);
}, 500);
});
}
private _waitForUpdate(card: LovelaceCard): void {
if ((card as any).updateComplete) {
(card as any).updateComplete.then(() => this._cleanCardStyle(card));
} else {
this._cleanCardStyle(card);
}
this._cleanCardStyle(card);
}
Hey @M4D1NG3R it's better :) but the humidifier informations doesn't appear :\
It works
Works with mushroom but a little bug with chips :(
@ofekashery what do you think about that ?
Fixed in #128.
Description
Add editor to the vertical stack in card
Related Issue
123
Motivation and Context
How Has This Been Tested
Locally
Types of changes
Checklist
Screenshots