wp-media / rocket-scripts

MIT License
0 stars 0 forks source link

Consider viewport on element distance calculation #28

Closed wordpressfan closed 2 months ago

wordpressfan commented 2 months ago

Description

Part of https://github.com/wp-media/wp-rocket/issues/6933

Here we will calculate the threshold below the viewport.

Type of change

Detailed scenario

Now we will calculate the threshold starting from the end of viewport as discussed here:

https://github.com/wp-media/wp-rocket/pull/6929#issuecomment-2320913319

Technical description

Documentation

As mentioned in the issue itself we will consider having viewport height in the calculation.

New dependencies

No

Risks

One risk is mentioned and shared with product team here: https://github.com/wp-media/wp-rocket/issues/6933#issuecomment-2326064756 and we are fine with that.

Mandatory Checklist

Code validation

Code style

Additional Checks

codacy-production[bot] commented 2 months ago

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
:white_check_mark: +0.60% (target: -1.00%) :white_check_mark: 76.92% (target: 50.00%)
Coverage variation details | | Coverable lines | Covered lines | Coverage | | ------------- | ------------- | ------------- | ------------- | | Common ancestor commit (96cb6c581b2fc9f72cf354a62787dd9c865a05ab) | 571 | 287 | 50.26% | | | Head commit (ecdac7a5f9c87f85d7b888b14b359963a0d8d950) | 578 (+7) | 294 (+7) | 50.87% (**+0.60%**) | **Coverage variation** is the difference between the coverage for the head and common ancestor commits of the pull request branch: ` - `
Diff coverage details | | Coverable lines | Covered lines | Diff coverage | | ------------- | ------------- | ------------- | ------------- | | Pull request (#28) | 13 | 10 | **76.92%** | **Diff coverage** is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: `/ * 100%`

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more