-
Notifications
You must be signed in to change notification settings - Fork 70
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
use empty array for layouts if not yet loaded when changing layoutset #11340
Conversation
84b3f7e
to
d10bc79
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #11340 +/- ##
==========================================
+ Coverage 82.82% 82.86% +0.03%
==========================================
Files 838 840 +2
Lines 12626 12626
Branches 1691 1689 -2
==========================================
+ Hits 10458 10463 +5
+ Misses 1906 1901 -5
Partials 262 262
☔ View full report in Codecov by Sentry. |
1d12ad1
to
84c2988
Compare
c40fc7a
to
ab61786
Compare
e8d00dd
to
4816a5d
Compare
1c9bf28
to
ef9b271
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mye bra opprydning her! Det hadde vært fint om vi kunne laget en test på event-lytteren. Dette er en algoritme som vi bruker flere steder, så jeg forslår at vi gjør det til en egen hook, som i designsystemet: https://github.com/digdir/designsystem/blob/main/packages/react/src/hooks/useEventListener.ts
frontend/packages/ux-editor/src/containers/DesignView/DesignView.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Veldig bra! Får du kjørt Cypress-testene lokalt? Det er endringer i mange filer her, så det hadde vært fint å verifisere at det ikke brekker noe.
Enhetstester har du fikset så langt det lar seg gjøre, så punktet om automatisert test kan du krysse av for 🙂
…ate useReactiveLocalStorage hook
5e328f3
to
524c97f
Compare
…#11340) * Set layouts as empty array if not loaded yet * Move selected layout set to global ux-editor context * fix tests * Add tests * Move MapIformLayoutsToLayouts outside of comopnent * Filter out eventlistener on window from useLocalStorage hook to separate useReactiveLocalStorage hook
…#11340) * Set layouts as empty array if not loaded yet * Move selected layout set to global ux-editor context * fix tests * Add tests * Move MapIformLayoutsToLayouts outside of comopnent * Filter out eventlistener on window from useLocalStorage hook to separate useReactiveLocalStorage hook
Description
Related Issue(s)
Verification
Documentation