MelleD / lovelace-expander-card

Expander card for HomeAssistant
Apache License 2.0
56 stars 6 forks source link

card randomly resets while editing it #181

Closed robertboccia closed 1 month ago

robertboccia commented 3 months ago

READ THIS FIRST: Thanks for raising a expander card issue. Please take the time to review the following categories as some of them do not apply here.

🙅 "Please DO NOT Raise an Issue" Cases

🐞 Bug report (please don't include this emoji/text, just add your details) Please provide details of the problem, including the version of expander card and your Brwoser that you are using. If possible, please provide a test case or sample application that reproduces the problem. This makes it much easier for us to diagnose the problem and to verify that we have fixed it For quick troubleshooting, prepare a minimally reproducible example.

!!!Please check your Browser console for Javascript errors!!!

TIP: You can always edit your issue if it isn't formatted correctly. See https://guides.github.com/features/mastering-markdown

MelleD commented 3 months ago

@robertboccia did you read the text? Would like to add some content?

robertboccia commented 3 months ago

sure, card is constantly resetting as you are editing it, not sure how to explain this better, or if i am the only one experiencing this behavior, happens while editing or adding the card to a dashboard

MelleD commented 3 months ago

You have to provide some infos like HA, Card version browser etc. or show a video. Did you delete your cache? I cannot reproduce it, so hard to say something

duczz commented 3 months ago

@robertboccia this was a problem in an old version, update or clear cache fix that problem

robertboccia commented 3 months ago

im on v 1.5.1 and hassos 2024.6.4 which version should i be on?

duczz commented 3 months ago

In Browser Developer Mode Shows 1.5.1 or in hacs?

robertboccia commented 3 months ago

hacs, same thing happens in the android app as a test

duczz commented 3 months ago

And which Version shows in the Browser Developer Mode? F12

robertboccia commented 3 months ago

all f12 gives me is the console in my edge browser, what version are you talking about?

MelleD commented 3 months ago

This version in the console:

Bildschirmfoto 2024-06-27 um 19 57 00

And also maybe a screenshot from your expander card what you are using for components etc. What are you clicking etc. etc. without information it's not possible to help

robertboccia commented 3 months ago

Expander card is being loaded as 1.5.1 Using entity card and tile cards

duczz commented 3 months ago

And the Problem ist still available? This was normaly fixed in ~1.1.2.

MelleD commented 3 months ago

Expander card is being loaded as 1.5.1 Using entity card and tile cards

Not sure what I should say more than I cannot reproduce it. You have to deliver more infos or just use the yaml code

Caligo82 commented 3 months ago

I have the same issue. It's not really resetting it in terms of content. But the view of the card gets reset indeed. Have to be fast while editing.

Kagey-cmd commented 2 months ago

I just installed today with an up-to-date HAss. Experiencing the same problem. My solution was to use the Raw Configuration Editor. When editing the card directly (GUI and YAML), the card would reset completely and all around act very strange, like replacing its entire YAML contents with that of one of the child cards.

MelleD commented 2 months ago

Iam using only yaml works fine.

Without a whole example or steps to reproduce nothing will happen here on this issue.

illuzn commented 2 months ago

Not sure if mine is the same as OP but I have reproduction steps for the bug I'm experiencing which is similar in description.

Move to a new issue if this is not the same.

Bug

Editing a sub-card of the expander card (if start expanded is not on) in the new sections experimental view causes the preview to collapse.

Sections appears to be the way forward (because as explained the old masonry view results in a much more random ordering of cards when screen size or card size changes).

Reproduction Steps

  1. Minimum HA version 2024.3 (version which introduces sections).
  2. Create a view using the new sections experimental layout.
  3. Add expander card to a section.
  4. Turn off start expanded.
  5. Add a sub-card (can be any but I used tile).
  6. Expand the preview of the card.
  7. Change anything regarding the subcard (e.g. toggle show state).

This issue also affects editing the yaml.

Other diagnostic steps taken.

Have confirmed this issue does not exist in masonry view.

MelleD commented 2 months ago

Currently in editor mode the expander is open

      if (isEditorMode) {
            open = true;
        } else {

So this could be changed.

illuzn commented 2 months ago

Currently in editor mode the expander is open

      if (isEditorMode) {
            open = true;
        } else {

So this could be changed.

At least for me this just doesn't work.

MelleD commented 2 months ago

Ok so should I remove this?

How I said before I don’t use the editor. So someone else have to take over to maintain the new feature from HA or fix bug.

Or like in other component I remove it completely and just support raw yaml

robertboccia commented 2 months ago

Maybe raw yaml

Robert Boccia


From: Dennis Melzer @.> Sent: Sunday, July 14, 2024 3:04:31 PM To: MelleD/lovelace-expander-card @.> Cc: Robert Boccia @.>; Mention @.> Subject: Re: [MelleD/lovelace-expander-card] card randomly resets while editing it (Issue #181)

Ok so should I remove this?

How I said before I don’t use the editor. So someone else have to take over to maintain the new feature from HA or fix bug.

Or like in other component I remove it completely and just support raw yaml

— Reply to this email directly, view it on GitHubhttps://github.com/MelleD/lovelace-expander-card/issues/181#issuecomment-2227341868, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AR4IWBD6DQLT3YXRVLZHYXTZMJZN7AVCNFSM6AAAAABJ3XYPP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRXGM2DCOBWHA. You are receiving this because you were mentioned.Message ID: @.***>

MelleD commented 2 months ago

Yes if nobody uses the editor I can remove it

@duczz do you use it?

duczz commented 2 months ago

@MelleD danke der Nachfrage, ich bin mittlerweile flexible, da meine Cards oft yaml only erfordern (card_mod) :) Hasse es aber trotzdem, weils als noob einfach lÀnger dauert bis es klappt ^^

Wenn ich aus AnfĂ€nger Sicht denke, ist GUI immer schöner. Denke die Entscheidung liegt ganz bei dir. Wobei ich die Probleme iwie nicht nachstellen kann, bei mir klappts immer auch unter sections, wĂŒrds gerne nachstellen.

MelleD commented 2 months ago

That comes with practice ;). if you completely use yaml You just need a good IDE like the Visual Studio addon. This works quite well. I have my entire dashboard with yaml only mode. You can do a lot more with it.

@all I also tried to recreate it and couldn't get it to work. It is probably due to the components used themselves that there are known problems with this inline yaml editor. It's also funny that no one can come up with a complete example to reproduce the bug. For this reason, I decided not to invest time in the editor. If the requests and bugs pile up I will throw it out or someone else will take over the maintenance. But for me there is no benefit just time wasting

duczz commented 2 months ago

i think i can recreate the issue now when i have understand it right @MelleD (see gif) - i my eyes a not so critical issue Edit: on mansory the card still be open when you remove a entity Edit2: if that was the problem we were talking about in past, we are all talken about different things ^^ - i think the code will be resetted like in a early version Animation2

MelleD commented 2 months ago

@duczz can you send the yaml code of the entities? And what happen if you save after removing a entity? Is this just a preview issue?

If I remove a card with x the expander is NOT closed.

illuzn commented 2 months ago

@duczz that is the exact issue I'm encountering... it's just a preview bug so not so critical.

@MelleD the issue is not from removing a card but from changing an element in the card (in this case he removed an entity to change an element but for me it also occurs if I change anything e.g. change one of those toggles). By the way, just tested... it also affects using yaml.

It also only occurs on the new sections view for me. So this may be why you are having difficulty reproducing.

duczz commented 2 months ago

@illuzn okay, than we talked from different things before :) @MelleD problem is in old and new dashboard (mansory / section) (only preview, yes)

type: custom:expander-card
gap: 0.0em
expanded-gap: 0.6em
padding: 1em
clear: false
title: ' test'
overlay-margin: 0.0em
child-padding: 0.0em
child-margin-top: 0.0em
button-background: transparent
expander-card-background: var(--ha-card-background,var(--card-background-color,#fff))
header-color: var(--primary-text-color,#fff)
arrow-color: var(--arrow-color,var(--primary-text-color,#fff))
expander-card-display: block
title-card-clickable: false
min-width-expanded: .nan
max-width-expanded: 0
cards:
  - type: entity
    entity: sensor.cryptoinfo_btc_price_eur
    name: test
github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 30 days with no activity.

juanpintom commented 1 month ago

I've problems too, but idk how to replicate