Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to change opacity of 'uom' through animations. #217

Closed
stinobook opened this issue May 19, 2023 · 5 comments
Closed

Impossible to change opacity of 'uom' through animations. #217

stinobook opened this issue May 19, 2023 · 5 comments
Assignees
Labels
bug/confirmed Confirmed bug bug Something isn't working styling Style / Classes stuff tool/state About the entity state tool

Comments

@stinobook
Copy link

stinobook commented May 19, 2023

Swiss Army Knife version

2.4.4

Bug description

Impossible to change opacity of 'uom' through animations. maybe other styles too?

To Reproduce

tested on 2 different cards/entities/...
state works but uom doesn't


                        - type: state
                          position:
                            cx: 10
                            cy: 92
                          styles:
                            state:
                              text-anchor: start
                              font-size: 9em
                            uom:
                              opacity: 1 # it is possible to style it here, but not in the animations
                          entity_indexes:
                            - entity_index: 1
                            - entity_index: 0
                          user_actions:
                            tap_action:
                              haptic: success
                              actions:
                                - action: more-info
                          animations:
                            - state: 'on'
                              entity_index: 0
                              styles:
                                state:
                                  opacity: 0.8
                                  transition: opacity 0.5s linear
                                uom:
                                  opacity: 0.8
                                  transition: opacity 0.5s linear
                            - state: 'off'
                              entity_index: 0
                              styles:
                                state:
                                  opacity: 0
                                  transition: opacity 0.5s linear
                                uom:
                                  opacity: 0
                                  transition: opacity 0.5s linear

Expected behavior

for the uom to follow the state animation

Screenshots

image
image

@stinobook stinobook added the bug Something isn't working label May 19, 2023
@AmoebeLabs AmoebeLabs added tool/state About the entity state tool styling Style / Classes stuff labels May 19, 2023
@AmoebeLabs
Copy link
Owner

I’ll check uom, but in the mean time, try the following:

                          animations:
                            - state: 'on'
                              entity_index: 0
                              styles:
                                tool:
                                  opacity: 0.8
                                  transition: opacity 0.5s linear
                            - state: 'off'
                              entity_index: 0
                              styles:
                                tool:
                                  opacity: 0
                                  transition: opacity 0.5s linear

@stinobook
Copy link
Author

I also tried that but it didn't do anything at all. I saw 'tools' once as a possibility in one of your examples and figured maybe it was only 'tools' that worked and not a single 'tool'.

image
image
image

@AmoebeLabs
Copy link
Owner

Tool styling is indeed broken for at least the enity state tool. I will check what’s changed.

Some of the eslint recommendations broke most of my cards while I was changing the development environment. This is either one of those results, or something completely different. It will be solved though.

Uom styling still unclear. The styleMap for uom is processed by the renderer, so probably the style builder has some error that is causing this bug.

@AmoebeLabs AmoebeLabs added the bug/confirmed Confirmed bug label May 20, 2023
@AmoebeLabs AmoebeLabs added this to the Release v2.4.5 milestone May 20, 2023
@AmoebeLabs AmoebeLabs self-assigned this May 20, 2023
@AmoebeLabs
Copy link
Owner

Closed with #222

@stinobook
Copy link
Author

This is working great now :D Tool still didnt work but uom and state seperately did the trick.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/confirmed Confirmed bug bug Something isn't working styling Style / Classes stuff tool/state About the entity state tool
Projects
None yet
Development

No branches or pull requests

2 participants