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

Upgrade to @utrecht/components v7 #803

Merged
merged 11 commits into from
Mar 6, 2025

Conversation

sergei-maertens
Copy link
Member

@sergei-maertens sergei-maertens commented Mar 5, 2025

Requires open-formulieren/design-tokens#52

We've been on the latest 1.0.0 alpha version for too long, while 7.4.0 is available and this package is no longer being published (in favour of individual component packages). To get there we:

  • Upgrade incrementally to the latest @utrecht/components (v4)
  • Upgrade incrementally to the latest @utrecht/components (v5)
  • Upgrade incrementally to the latest @utrecht/components (v6)
  • Upgrade incrementally to the latest @utrecht/components (v7)
  • Upgrade the @openformulieren/formio-renderer package to be at the same state

Copy link

codecov bot commented Mar 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.42%. Comparing base (3426375) to head (496e97f).
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #803      +/-   ##
==========================================
+ Coverage   83.29%   83.42%   +0.12%     
==========================================
  Files         233      233              
  Lines        4633     4633              
  Branches     1193     1180      -13     
==========================================
+ Hits         3859     3865       +6     
+ Misses        744      738       -6     
  Partials       30       30              
Flag Coverage Δ
storybook 76.82% <ø> (+0.20%) ⬆️
vitest 62.18% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

codecov bot commented Mar 5, 2025

Bundle Report

Changes will increase total bundle size by 40 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
@open-formulieren/sdk-OpenForms-umd 4.9MB 20 bytes (0.0%) ⬆️
@open-formulieren/sdk-esm 4.87MB 20 bytes (0.0%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: @open-formulieren/sdk-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-*.js 20 bytes 45.47kB 0.04%
view changes for bundle: @open-formulieren/sdk-OpenForms-umd

Assets Changed:

Asset Name Size Change Total Size Change (%)
open-*.js 20 bytes 3.54MB 0.0%

Files in open-*.js:

  • ./src/formio/components/Checkbox.scss → Total Size: 0 bytes

@sergei-maertens sergei-maertens changed the title Upgrade to @utrecht/components Upgrade to @utrecht/components v?? Mar 6, 2025
This is the latest version before the scss mixins are removed.
We can run a first visual regression check on this state.
* Converted the decorators to typescript
* De-duplicated the utrecht document decorator
* Ensured that it's only wired up in the preview.js of Storybook - the
  intent was clearly to enable it globally, but the duplicate was still
  added in other places. That is now cleaned up.

This should resolve the visual regressions related to spacing of the
utrecht-button-group, which only happened in storybook because the
--utrecht-space-around was set for some unclear reason. This is now
removed, and the expected behaviour for edit grid is now working.
@sergei-maertens sergei-maertens force-pushed the chore/445-upgrade-utrecht-components branch from aeca7ae to 3bfe705 Compare March 6, 2025 14:12
Doing a click + ArrowDown on a react select seems to have a race
condition where sometimes the *next* option gets 'focus', resulting in
it being higlighted with a different color, which in turn trips the
Chromatic snapshots as it's toggling between which option is focused.

Replacing this with an explicit focus + ArrowDown causes the menu to
open and seems to avoid the race condition.

The click used to be required in older versions of testing library and
react-select to properly focus the input/select when the browser window
itself doesn't have focus, e.g. when live-reloading saved code in SB
which would lead to a frustrating DX.
@sergei-maertens sergei-maertens force-pushed the chore/445-upgrade-utrecht-components branch from 4c2fb8c to 715eda1 Compare March 6, 2025 16:32
Adapted the few places where we directly import the mixin
for certain components, which has been moved into the package
src and is no longer in the dist/css directory.

Other imports have been updated to refer to the package itself,
as that resolves to the CSS file inside, and we can now use
the @use rule in a bunch of places rather than sticking with
the deprecated @import.
Contains fix for the breaking alert component changes.
@sergei-maertens sergei-maertens force-pushed the chore/445-upgrade-utrecht-components branch from 14e26f8 to 207d9a4 Compare March 6, 2025 19:36
@sergei-maertens sergei-maertens changed the title Upgrade to @utrecht/components v?? Upgrade to @utrecht/components v7 Mar 6, 2025
The real test to see if we have broken CSS 😬
@sergei-maertens sergei-maertens merged commit 19fc530 into main Mar 6, 2025
17 checks passed
@sergei-maertens sergei-maertens deleted the chore/445-upgrade-utrecht-components branch March 6, 2025 20:09
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

Successfully merging this pull request may close these issues.

1 participant