-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix card list UI layout shifts (jumps) on load
This commit fixes layout shifts that occur on card list part of the page when the page is initially loaded. - Resolve issue where card list starts with minimal width, leading to jumps in UI until correct width is calculated on medium and big screens. - Dispose of existing `ResizeObserver` properly before creating a new one. This prevents leaks and incorrect width calculations if `containerElement` changes. - Throttle resize events to minimize width/height calculation changes, enhancing performance and reducing the chances for layout shifts. Supporting CI/CD improvements: - Enable artifact upload in CI/CD even if E2E tests fail. - Distinguish uploaded artifacts by operating system for clarity.
- Loading branch information
1 parent
78c3b4d
commit 9762de8
Showing
12 changed files
with
420 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,67 @@ | ||
@mixin hover-or-touch($selector-suffix: '', $selector-prefix: '&') { | ||
@media (hover: hover) { | ||
/* We only do this if hover is truly supported; otherwise the emulator in mobile | ||
@media (hover: hover) { | ||
|
||
/* We only do this if hover is truly supported; otherwise the emulator in mobile | ||
keeps hovered style in-place even after touching, making it sticky. */ | ||
#{$selector-prefix}:hover #{$selector-suffix} { | ||
@content; | ||
} | ||
#{$selector-prefix}:hover #{$selector-suffix} { | ||
@content; | ||
} | ||
@media (hover: none) { | ||
/* We only do this if hover is not supported,otherwise the desktop behavior is not | ||
} | ||
|
||
@media (hover: none) { | ||
|
||
/* We only do this if hover is not supported,otherwise the desktop behavior is not | ||
as desired; it does not get activated on hover but only during click/touch. */ | ||
#{$selector-prefix}:active #{$selector-suffix} { | ||
@content; | ||
} | ||
#{$selector-prefix}:active #{$selector-suffix} { | ||
@content; | ||
} | ||
} | ||
} | ||
|
||
@mixin clickable($cursor: 'pointer') { | ||
cursor: #{$cursor}; | ||
user-select: none; | ||
/* | ||
cursor: #{$cursor}; | ||
user-select: none; | ||
/* | ||
It removes (blue) background during touch as seen in mobile webkit browsers (Chrome, Safari, Edge). | ||
The default behavior is that any element (or containing element) that has cursor:pointer | ||
explicitly set and is clicked will flash blue momentarily. | ||
Removing it could have accessibility issue since that hides an interactive cue. But as we still provide | ||
response to user actions through :active by `hover-or-touch` mixin. | ||
*/ | ||
-webkit-tap-highlight-color: transparent; | ||
-webkit-tap-highlight-color: transparent; | ||
} | ||
|
||
@mixin fade-transition($name) { | ||
.#{$name}-enter-active, | ||
.#{$name}-leave-active { | ||
transition: opacity 0.3s ease; | ||
} | ||
|
||
.#{$name}-enter-from, | ||
.#{$name}-leave-to { | ||
opacity: 0; | ||
} | ||
} | ||
|
||
@mixin fade-slide-transition($name, $duration, $offset-upward: null) { | ||
.#{$name}-enter-active, | ||
.#{$name}-leave-active { | ||
transition: all $duration; | ||
} | ||
|
||
.#{$name}-leave-active, | ||
.#{$name}-enter-from | ||
{ | ||
opacity: 0; | ||
.#{$name}-enter-active, | ||
.#{$name}-leave-active { | ||
transition: all $duration; | ||
} | ||
|
||
@if $offset-upward { | ||
transform: translateY($offset-upward); | ||
} | ||
.#{$name}-leave-active, | ||
.#{$name}-enter-from { | ||
opacity: 0; | ||
|
||
@if $offset-upward { | ||
transform: translateY($offset-upward); | ||
} | ||
} | ||
} | ||
|
||
@mixin reset-ul { | ||
margin: 0; | ||
padding: 0; | ||
list-style: none; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.