iantrich / restriction-card

🔒 Apply restrictions to Lovelace cards
MIT License
254 stars 22 forks source link

Theme showing lock icon under pop-up window #86

Closed dolenec closed 1 year ago

dolenec commented 1 year ago

Checklist:

Release with the issue: 1.2.7

Last working release (if known):

Browser and Operating System: Windows OS, Android phone

Description of problem:

Javascript errors shown in the web inspector (if applicable):

Additional information:

This error was started under HA 2023.5.x

dolenec commented 1 year ago

lovelace_1

dolenec commented 1 year ago

lovelace_2

dolenec commented 1 year ago

lovelace-3

Dehumanizer77 commented 1 year ago

Yes, same here, started to happen with the latest HA release :-/

Dehumanizer77 commented 1 year ago

@iantrich do you think you'll be able to look into it? Maybe it is related to https://github.com/iantrich/restriction-card/issues/84 ?

dolenec commented 1 year ago

Is @iantrich still able to maintane plugin or should we make new fork and fix problem on new fork?

Dehumanizer77 commented 1 year ago

@dolenec Looks like @iantrich is not available, if you are able to fix it, please do create a fork and you can send a pull request, in case @iantrich will be around in the future.

ildar170975 commented 1 year ago

This PR fixed one thing but broke the whole card.

Dehumanizer77 commented 1 year ago

It works perfectly for me..,

bram2202 commented 1 year ago

This PR fixed one thing but broke the whole card.

Do you have an example or something?

ildar170975 commented 1 year ago

image Seems to work with row: true only. https://github.com/iantrich/restriction-card/issues/92

Dehumanizer77 commented 1 year ago

hmmm... looks like I still have the problem in some places... Screenshot_20230622-223051_Home Assistant

Dehumanizer77 commented 1 year ago

When I have restriction cards stacked like this, the fix doesn't work.

Screenshot_20230622-223400_Home Assistant

ildar170975 commented 1 year ago

@Dehumanizer77 Are these conventional button cards?

IMHO overlaying lock icons (visible above popups) is BETTER than not displaying (and hence not restricting) a lock at all. Downgraded to 1.2.7 (which is still reported as 1.2.6, like really abandoned).

Dehumanizer77 commented 1 year ago

Actually, it's custom button cards: https://github.com/custom-cards/button-card

Dehumanizer77 commented 1 year ago

@ildar170975 This works for me:

maybe you need to specify action?

Dehumanizer77 commented 1 year ago

or actually as I am looking at it again, does the restriction card type even apply to the boolean input in your example?

ildar170975 commented 1 year ago

Actually, it's custom button cards

It has its own lock feature.

ildar170975 commented 1 year ago

This works for me:

As I already said - the new card only works for row: true. It does not work with cards since no z-index is specified now for overlay.

ildar170975 commented 1 year ago

does the restriction card type even apply to the boolean input in your example?

No, because overlay (which is used to overlap a card) is now located BELOW the card. If you have any CSS skills - apply the old removed z-index manually for overlay via Code Inspector and see how it works.

Dehumanizer77 commented 1 year ago

Actually, it's custom button cards

It has its own lock feature.

ah, so probably a similar fix needs to be done there... thanks

ildar170975 commented 1 year ago

a similar fix needs to be done

Only if you are using its own lock feature and not using restriction-card. BTW, the button-card is abandoned too(((.

Dehumanizer77 commented 1 year ago

does the restriction card type even apply to the boolean input in your example?

No, because overlay (which is used to overlap a card) is now located BELOW the card. If you have any CSS skills - apply the old removed z-index manually for overlay via Code Inspector and see how it works.

I see, ok, so it needs some more thought to fix the original issue.

iantrich commented 1 year ago

If someone can make a fix, I'll merge it in. I'll also be moving this to the custom_cards organization soon as I don't run Home Assistant anymore at my home. That way anyone should be able to join the org and take over as maintainer.

Dehumanizer77 commented 1 year ago

a similar fix needs to be done

Only if you are using its own lock feature and not using restriction-card.

Yes I do and I realised that now, thanks for pointing me i the right direction.

iantrich commented 1 year ago

Based on the brief descriptions I've read, I'm guessing the z-index should have been lowered, not removed by @bram2202

ildar170975 commented 1 year ago

I have another proposal (untested) - can we place the overlay AFTER the card/row? (w/o using z-index)

"untested" - because I failed to create my own forked version of the card and cannot test myself (could not create a test environment and compile a js-file from a ts-source)... I wanted to introduce a custom overlay as a background image covering a whole card. It could be of any color, even striped (described here if anyone interested). image

Dehumanizer77 commented 1 year ago

I have tried to lower the z-index as @iantrich suggested, but it doesn't fix the issue, the locks are stil visible on top when something else is opened on top. I have tried 10, 1 and even -50 with the same result. @ildar170975 if you can send me the changes you are proposing, I can test it, I was able to create a working fork.

Dehumanizer77 commented 1 year ago

BTW, lowering z-index did actually work for the custom button-card, interestingly...

ildar170975 commented 1 year ago

if you can send me the changes you are proposing, I can test it, I was able to create a working fork.

Thanks a lot, but I cannot just give "some changes", they must be tested step by step by me((((

the locks are stil visible

I will try to play with it too & report my results.

Dehumanizer77 commented 1 year ago

Alternatively I can help you to create a fork with which you could test it if you have any specific problem. You can then add the forked repo as custom repository in HACS to be able to test it.

ildar170975 commented 1 year ago

This would be a great help from you! Currently I am rather busy with some family matters; I will try to contact you as I will be able to!!!