direflow icon indicating copy to clipboard operation
direflow copied to clipboard

Styled components losing styling

Open brandondv opened this issue 3 years ago • 2 comments

Description
When an attribute changes on the web-component externally, the styled component will render without the proper styling. When inspecting the element, it has gotten the right property in React, and it got a new styled-component class. However that new class has no css rules in the shadowDOM. So it seems that those styling rules aren't updated accordingly.

When the React component changes internally, it will have the right styling and new classname.

To reproduce
I made a repo where the bug is present. https://github.com/brandondv/direflow-styled-component-bug-reproduction

Steps to reproduce the behaviour:

  1. Clone repo
  2. Install packages (e.g. yarn install)
  3. yarn start
  4. Use the example in the html file to see the error, when filling in a color (e.g. green)
  5. See error

Expected behaviour
That external changes on the web-component attributes / properties, renders the styled component right.

Package Manager:
To install Direflow, I used yarn.

Screenshots
Screenshot 2020-07-31 at 16 03 20 Screenshot 2020-07-31 at 16 03 32

brandondv avatar Jul 31 '20 14:07 brandondv

Hi @brandondv Thank you for creating this bug report, and thanks a lot for creating a reproducible example! It makes it way easier for us to investigate :blush:

We'll take a look at this, as soon as possible.

SimonHoiberg avatar Aug 01 '20 09:08 SimonHoiberg

@SimonHoiberg any updates, still got the issue?

dlwsacrez avatar Apr 01 '22 12:04 dlwsacrez