open-formulieren / open-forms-sdk

A Javascript SDK for Open Forms
https://open-forms.readthedocs.io/en/stable/developers/sdk/index.html
Other
2 stars 6 forks source link

Fix order of SCSS imports for radio field #529

Closed sergei-maertens closed 1 year ago

sergei-maertens commented 1 year ago

Partly closes open-formulieren/open-forms#3327

The radio background styles were being overridden by the form-field overrides (open-forms theme specific) due to the CSS precedence order.

Forcing the radio styles to come after the form-field styles resolves this, but it's not an ideal fix. The proper long-term solution is to have a separate stylesheet with our open-forms theme specific overrides rather than baking this into the main bundle.

codecov[bot] commented 1 year ago

Codecov Report

Patch and project coverage have no change.

Comparison is base (c76c113) 49.24% compared to head (b60ebee) 49.24%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #529 +/- ## ======================================= Coverage 49.24% 49.24% ======================================= Files 199 199 Lines 3578 3578 Branches 647 647 ======================================= Hits 1762 1762 Misses 1643 1643 Partials 173 173 ``` | [Files Changed](https://app.codecov.io/gh/open-formulieren/open-forms-sdk/pull/529?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-formulieren) | Coverage Δ | | |---|---|---| | [src/components/forms/RadioField/RadioField.js](https://app.codecov.io/gh/open-formulieren/open-forms-sdk/pull/529?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-formulieren#diff-c3JjL2NvbXBvbmVudHMvZm9ybXMvUmFkaW9GaWVsZC9SYWRpb0ZpZWxkLmpz) | `18.18% <ø> (ø)` | | | [src/formio/components/Radio.js](https://app.codecov.io/gh/open-formulieren/open-forms-sdk/pull/529?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-formulieren#diff-c3JjL2Zvcm1pby9jb21wb25lbnRzL1JhZGlvLmpz) | `0.00% <ø> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sergei-maertens commented 1 year ago

LFTM: I don't understand the code that was removed. But I do expect Chromatic changes, if this is a visual fix.

Storybook loads the styles slightly different, which caused the problem not to occur, therefore there are no visual changes!

There wasn't really code being removed, just different places where the sass is imported. I was hoping we could bundle styles and JS together, but unfortunately that causes some issues :(