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

MWPW-158776 Fix video CLS #2915

Merged
merged 4 commits into from
Oct 1, 2024
Merged

MWPW-158776 Fix video CLS #2915

merged 4 commits into from
Oct 1, 2024

Conversation

mokimo
Copy link
Contributor

@mokimo mokimo commented Sep 19, 2024

Follow up for the reverted PR #2849

Resolves: MWPW-158776

This should still work: #1936

Test URLs:

Onhover play

Onviewport play

Only desktop (mobile should not load the video for perf reasons)

Split marquee video tests
Before: https://main--milo--adobecom.hlx.page/docs/library/kitchen-sink/marquee-split?martech=off
After: https://marquee-cls--milo--mokimo.hlx.page/docs/library/kitchen-sink/marquee-split?martech=off

Before: https://main--cc--adobecom.hlx.page/drafts/00-CC-milo-migration/bugs/document?martech=off
After: https://main--cc--adobecom.hlx.page/drafts/00-CC-milo-migration/bugs/document?martech=off&milolibs=marquee-cls--milo--mokimo

CLS

Bacom tests

CC tests

Copy link

codecov bot commented Sep 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.27%. Comparing base (c5e352f) to head (4f09f4e).
Report is 35 commits behind head on stage.

Additional details and impacted files
@@            Coverage Diff             @@
##            stage    #2915      +/-   ##
==========================================
- Coverage   98.21%   96.27%   -1.95%     
==========================================
  Files          64      238     +174     
  Lines        7848    54495   +46647     
==========================================
+ Hits         7708    52465   +44757     
- Misses        140     2030    +1890     

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

@mokimo mokimo changed the title MWPW-156749: Fix video CLS MWPW-158776 Fix video CLS Sep 19, 2024
@mokimo
Copy link
Contributor Author

mokimo commented Sep 19, 2024

Not sure how codecov fails 🤷
image

@spadmasa
Copy link

Copy link
Contributor

@JasonHowellSlavin JasonHowellSlavin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two nits, but looks good to me!

test/blocks/video/video.test.js Outdated Show resolved Hide resolved
libs/utils/decorate.js Show resolved Hide resolved
Copy link
Contributor

This pull request is not passing all required checks. Please see this discussion for information on how to get all checks passing. Inconsistent checks can be manually retried. If a test absolutely can not pass for a good reason, please add a comment with an explanation to the PR.

mokimo and others added 3 commits September 23, 2024 14:50
* fix cls by adding the videoEl without a source

* adapt the video hover and in view port play

* Remove no-lazy and return earlier

* Fix linting issue

* Consolidate duplicated logic

* Move functions into the init function

* Move root margin and use optional chaining

* Only query for the videoEl once
@mokimo
Copy link
Contributor Author

mokimo commented Sep 23, 2024

@spadmasa - this is a CC specific issue due to consuming code altering the block. @aishwaryamathuria is having a look, but we can't proceed until it is fixed/prepared on the CC project.

@mokimo mokimo added the do not merge PR should not be merged yet label Sep 23, 2024
Copy link
Contributor

@robert-bogos robert-bogos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

Copy link

@SilviuLCF SilviuLCF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified and ready for STAGE

@milo-pr-merge
Copy link
Contributor

milo-pr-merge bot commented Sep 27, 2024

Skipped merging 2915: MWPW-158776 Fix video CLS due to failing checks

3 similar comments
@milo-pr-merge
Copy link
Contributor

milo-pr-merge bot commented Sep 28, 2024

Skipped merging 2915: MWPW-158776 Fix video CLS due to failing checks

@milo-pr-merge
Copy link
Contributor

milo-pr-merge bot commented Sep 29, 2024

Skipped merging 2915: MWPW-158776 Fix video CLS due to failing checks

@milo-pr-merge
Copy link
Contributor

milo-pr-merge bot commented Sep 30, 2024

Skipped merging 2915: MWPW-158776 Fix video CLS due to failing checks

@mokimo mokimo merged commit 5208028 into adobecom:stage Oct 1, 2024
22 of 23 checks passed
@mokimo mokimo mentioned this pull request Oct 1, 2024
rohitsahu pushed a commit to rohitsahu/milo that referenced this pull request Oct 1, 2024
* stage:
  MWPW-158886: update the way we send arbitrary fields to caas (adobecom#2977)
  MWPW-159028: MAS more technical documents + refactored aem related code (adobecom#2952)
  MWPW-158776 Fix video CLS  (adobecom#2915)
  MWPW-159197 Invoke onReady of standalone gnav when it is rendered adobecom#2962 (adobecom#2963)
  MWPW-159157: Update modal to account for new image size (adobecom#2975)
  Reverts MWPW-157555: Causing prices and CTAs to fail in Safari (adobecom#2987)
  [MWPW-159287 : NALA] Enhance Nala Run Command to Support Feature Branches with with an owner other than 'adobecom' (adobecom#2978)
  [MWPW-158927] Countdown Timer feedbacks incorporated (adobecom#2955)
  [MWPW-159265] Callout text in RTL not properly aligned (adobecom#2974)
  Add support for Jarvis through Unav and make appID of notifications configurable (adobecom#2969)
  MWPW-159236 Fix duplicate percent in donut chart tooltip (adobecom#2968)
  MWPW-144360 Prototype pollution tag selector (adobecom#2967)
  [MWPW-153616] Update 404 links in region selector (adobecom#2956)
  MWPW-157555: Remove useless logic and putting import commerce.js top. (adobecom#2906)

# Conflicts:
#	libs/deps/mas/mas.js
#	libs/deps/mas/merch-card.js
#	libs/deps/mas/plans-modal.js
#	libs/features/mas/web-components/src/global.css.js
mokimo added a commit that referenced this pull request Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants