Conversation
📝 WalkthroughWalkthroughThis pull request extends the testing infrastructure by introducing a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
731c28b to
ed1fd1f
Compare
035a64e to
3d20fef
Compare
796c9da to
9476e19
Compare
9e64ab5 to
267fb03
Compare
75c5907 to
75b5023
Compare
e8d4929 to
ddc9eb3
Compare
ddc9eb3 to
d49e63e
Compare
…ltinn/altinn-studio into update-the-design-system-minor
framitdavid
left a comment
There was a problem hiding this comment.
Ryddig, gode kommentarer med todos, og fin PR-beskrivelse. Har ikke noe mer å utsette på selve koden som er endret. Jeg godkjenner review, men ruller den også ut i dev for å se hvordan dette ser ut. 😊
Dette bunner i at vi har Jeg ser nærmere på testfunn 2 i morgen. |
Dette skjer på grunn av en endring som gjør at størrelsen på ikonet regnes ut basert på skriftstørrelsen til I vår kode er ikonet omgitt av en .tabIcon {
/* ... */
font-size: var(--ds-size-8);
}Med gammel versjon av Designsystemet, blir denne størrelsen forstørret med en faktor på 1,3: .ds-button :where(img, svg) {
/* ... */
font-size: 1.3em;
}I den nye versjonen er det gjort en liten justering: .ds-button :where(img, svg):not(.ds-spinner) {
/* ... */
font-size: calc(var(--_ds-captured-length) * 1.3);
}
|
Dette var for å fikse svg ikon størrelser i Safari når du bruker zoom. 🔍 Mer info finner du på PRen: digdir/designsystemet#4484 I retrospekt, skulle vi kanskje ha skrevet at |
|
Takk for oppklaringen, @mimarz.
I dokumentasjonen tenker du på? Ja, det hadde hjulpet! Vil det si at vi heller burde gjøre dette; .tabIcon svg {
font-size: calc(var(--ds-size-8) * 1.3);
}enn dette? .tabIcon {
--_ds-captured-length: var(--ds-size-8);
} |



Description
This pull request updates The Design System to the latest version, along with necessary changes to the code. Here is an overview of the code adjustments:
Fixes to breaking changes
variantprop onPagination.Buttonis replaced withdata-variantdata-toggle-groupattribute onToggleGrouparia-labeltoToggleGroup.Item(titleis no longer interpreted as the input element's name)ToggleGroup, of which the root element is now afieldsetand not adivTabs, of which the root element is now the custom-madeds-tabsaria-labeltoBreadcrumbsAdjustments in Jest setup
Polyfill for
matches(':popover-open')JSDOM does not recognise the
:popover-openpseudo-class in selectors. This makes at least one of our tests fail. Therefore, the@oddbird/popover-polyfillpackage is added tosetupTests.ts.Custom matchers for
fieldsetanddetails/summaryelementsSome elements are not reachable using the ordinary
getByRoleapproach. Therefore, we have created facade modules for thescreenandwithinutilities with some custom matcher functions:altinn-studio/src/Designer/frontend/libs/studio-ui-test/src/matchers.ts
Lines 7 to 55 in 2bd961d
Adjustments in Playwright tests
The
<summary>element has no role anymore, so thegetByRole('button')selectors which were used to address it are replaced with this custom matcher:altinn-studio/src/Designer/frontend/testing/playwright/helpers/BasePage.ts
Lines 55 to 57 in bbd9a45
A similar fix is also added to the
resourceadmPlaywright tests.Verification
Summary by CodeRabbit
New Features
Bug Fixes
aria-labelattributes across components.Tests