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

Polymerwill be deprecated in 2023.5 #5

Open
Mariusthvdb opened this issue Apr 9, 2023 · 9 comments
Open

Polymerwill be deprecated in 2023.5 #5

Mariusthvdb opened this issue Apr 9, 2023 · 9 comments

Comments

@Mariusthvdb
Copy link

would it be possible to update the card to use Lit?

tiny as your card may be, its a very useful and still unique card....

hope you can make it.
thanks

@rodpayne
Copy link

2023-04-11 14:46:28.897 WARNING (MainThread) [frontend.js.latest.202304061] WARNING: Polymer will be removed from window in Home Assistant 2023.5. More info: https://developers.home-assistant.io/blog/2023/04/04/deprecating_polymer

In Home Assistant 2023.5 Polymer will no longer be provided by Home Assistant. If you use Polymer now, we recommend you switch to Lit. If you want to keep using Polymer, you will have to load Polymer yourself.

@camochu
Copy link

camochu commented Apr 14, 2023

I am also affected. One more request here to solve it

@gadgetchnnel
Copy link
Owner

I have pushed a new version, 0.0.9, which uses Lit instead of Polymer, can you please try updating and see if that works.

@Mariusthvdb
Copy link
Author

Hi!

Thx. Would this also modernize to type: module ?

Just today I experimented and made that in my Gists
See https://gist.github.com/Mariusthvdb/11bbf8403da01f05ec4913cde76604fc

Still needs some styling to move to mdc I think

@Mariusthvdb
Copy link
Author

Mariusthvdb commented May 1, 2023

I have pushed a new version, 0.0.9, which uses Lit instead of Polymer, can you please try updating and see if that works.

tested the new resource but it does not update the value(state) of the input_text after that was updated by any other card:

all empty:

Scherm­afbeelding 2023-05-01 om 10 01 14

then add a message and click enter:

Scherm­afbeelding 2023-05-01 om 10 03 33

change text in any of the other elements:

Scherm­afbeelding 2023-05-01 om 10 04 56

another try:
Scherm­afbeelding 2023-05-01 om 10 05 05

you are looking at:

      - input_select.intercom_message # showing the value as a template option in the select options
      - type: custom:text-input-full-row # my temporary rebuild of your work
        entity: input_text.message
        name: Type een bericht hier en klik enter
      - type: custom:text-input-row # this resource, your card
        entity: input_text.message
        name: Text input row
      - entity: input_text.message # core card, with some card_mods
        name: Bericht
        <<: &no_icon
          card_mod:
            style:
              hui-generic-entity-row $: |
                state-badge {
                  display: none;
                }
              .: |
                hui-generic-entity-row {
                  margin: 0px -8px;
                  /*padding: 8px;*/
                }

btw, in both our custom resources, the input_text field does Not light on hover, and as you can see the font is larger and the divider is darker/heavier. This probably has to do with the styling of the element, and at some point should be optimized according to new HA defaults (using mdc-elements)

@PulsarFX
Copy link

short question: why would I use this instead of a text helper?

@camochu
Copy link

camochu commented Jun 10, 2023

I think the correct question would be: why would I use this TO SHOW a text helper?
My answer: it's a simple way to hide icon and get more room for content. Take a look to the code, without this component you need another mod and a lot of unintuitive lines to get the same

@almighty059
Copy link

@Mariusthvdb did this card recently break again?

@Mariusthvdb
Copy link
Author

Why? I don't use it anymore so not aware of any issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants