adobe / helix-rum-enhancer

Add advanced functionality to Helix RUM Collection (client-side)
Apache License 2.0
1 stars 14 forks source link

feat: observe all mutations to capture late added medias #261

Closed kptdobe closed 1 month ago

kptdobe commented 1 month ago

Fix https://github.com/adobe/helix-rum-enhancer/issues/225

Thanks to @trieloff, we have now a good test coverage, I feel more confident that this does not break everything. Changed the MutationObserver logic to listen to all changes and start observing newly added assets.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (8805b49) to head (501fa70). Report is 4 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #261 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 6 6 Lines 488 524 +36 ========================================= + Hits 488 524 +36 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

adobe-bot commented 1 month ago

This PR will trigger a minor release when merged.

kptdobe commented 1 month ago

Need to revisit... the viewblock test is not correct, need to fix it first.

kptdobe commented 1 month ago

ok, much better now: I split the observer into 2 observers (one for the blocks and one for the media) to optimized the mutations we observe (we cannot do one observer with the 2 configs). Tests are also properly testing the late added elements. Note that with some code tweaks (stupid...), the coverage is now at 100%.

adobe-bot commented 1 month ago

:tada: This issue has been resolved in version 2.20.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: