Skip to content

Commit

Permalink
fix: inconsistent hero cls (#839)
Browse files Browse the repository at this point in the history
* ci: add lighthouse audit for desktop

* fix: set separate hero skeleton heights for mobile and desktop

* docs: update changelog
  • Loading branch information
ksted authored Nov 28, 2024
1 parent bccc152 commit 61f1a54
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 11 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/lighthouse-mobile-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,6 @@ jobs:

- name: lighthouse mobile audit
run: yarn lhci:mobile
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}

- name: lighthouse desktop audit
run: yarn lhci:desktop
2 changes: 1 addition & 1 deletion apps/web/components/ui/HeroContent/HeroContentSkeleton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class="flex flex-col md:flex-row-reverse md:justify-center mx-auto mb-10 text-center animate-pulse p-4 border-neutral-200 border-b"
>
<div class="flex flex-col md:basis-2/4 md:items-stretch md:overflow-hidden">
<div class="h-[567px] bg-gray-300 rounded-sm"></div>
<div class="h-[376px] md:h-[500px] bg-gray-300 rounded-sm"></div>
</div>
<div class="p-4 md:p-10 md:max-w-[768px] md:flex md:flex-col md:justify-center md:items-start md:basis-2/4">
<div class="h-6 sm:h-8 bg-gray-300 rounded-sm w-full mb-2"></div>
Expand Down
1 change: 1 addition & 0 deletions docs/changelog/changelog_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Each client supports two PWA instances. With this change, you can designate the
- The language selector is no longer displayed if only one language is configured.
- Fixed an issue with category product prices not being updated on page change.
- Added SSR rendering for homepage.
- Improved CLS for hero skeleton.

## v1.7.0 (2024-11-06) <a href="https://github.com/plentymarkets/plentyshop-pwa/compare/v1.6.0...v1.7.0" target="_blank" rel="noopener"><b>Overview of all changes</b></a>

Expand Down
16 changes: 16 additions & 0 deletions lighthouserc.desktop.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"ci": {
"collect": {
"startServerCommand": "yarn start",
"settings": {
"preset": "desktop"
},
"url": [
"http://localhost:3000/?desktop",
"http://localhost:3000/living-room?desktop",
"http://localhost:3000/living-room/sofas/2-seater-sofa-sunflower_127?desktop"
],
"numberOfRuns": 3
}
}
}
7 changes: 0 additions & 7 deletions lighthouserc.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
{
"ci": {
"collect": {
"startServerCommand": "yarn start",
"url": [
"http://localhost:3000/",
"http://localhost:3000/living-room",
"http://localhost:3000/living-room/sofas/2-seater-sofa-sunflower_127"
],
"numberOfRuns": 3,
"assert": {
"includePassedAssertions": false,
"assertMatrix": [
Expand Down
13 changes: 13 additions & 0 deletions lighthouserc.mobile.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"ci": {
"collect": {
"startServerCommand": "yarn start",
"url": [
"http://localhost:3000/?mobile",
"http://localhost:3000/living-room?mobile",
"http://localhost:3000/living-room/sofas/2-seater-sofa-sunflower_127?mobile"
],
"numberOfRuns": 3
}
}
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"test:cypress-quarantine": "concurrently -k -s=first \"yarn wait-on http-get://localhost:3000 && yarn turbo:disable-telemetry && turbo run test:cypress-quarantine\" \"yarn start\"",
"test:cypress": "concurrently -k -s=first \"yarn wait-on http-get://localhost:3000 && yarn turbo:disable-telemetry && turbo run test:cypress\" \"yarn start\"",
"test:cypress-dev": "concurrently -k -s=first \"yarn wait-on http-get://localhost:3000 && yarn turbo:disable-telemetry && turbo run test:cypress-dev\" \"yarn start\"",
"lhci:mobile": "lhci autorun"
"lhci:mobile": "lhci collect --config=lighthouserc.mobile.json && lhci assert",
"lhci:desktop": "lhci collect --config=lighthouserc.desktop.json && lhci assert"
},
"dependencies": {
"@plentymarkets/shop-api": "^0.76.0",
Expand Down

0 comments on commit 61f1a54

Please sign in to comment.