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

Closes #6838: 3.17-pre - Support multiple factory answers in PerformanceHints check_data endpoint #6861

Merged
Merged
Show file tree
Hide file tree
Changes from 66 commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
4d46cfb
Closes #6777: 3.17 Sub tasks - Factories Creation (#6787)
jeawhanlee Jul 16, 2024
4eb5b13
Changed filename and interface name
jeawhanlee Jul 16, 2024
405c468
Adds PerformanceHints interfaces for database
Miraeld Jul 18, 2024
7879017
Apply linter
Miraeld Jul 18, 2024
1999219
Fix tests
Miraeld Jul 18, 2024
7641756
Update FactoryInterface
Miraeld Jul 18, 2024
7e93c87
Update linter
Miraeld Jul 18, 2024
b55d9b3
Merge branch 'develop' into 3.17-atf-refactor
jeawhanlee Jul 18, 2024
cb18ab2
Comply feedback
Miraeld Jul 18, 2024
4f78cb7
Merge branch '3.17-atf-refactor' into enhancement/6779-atf-db-refactor
Miraeld Jul 18, 2024
54f023d
Comply feedback
Miraeld Jul 18, 2024
12dc048
Closes #6776: 3.17 - Refactor AJAX Process (#6796)
jeawhanlee Jul 19, 2024
c14bfd3
Merge branch 'develop' into 3.17-atf-refactor
jeawhanlee Jul 20, 2024
4149dc2
Subtask/6778 3.17 refactor frontend process (#6804)
jeawhanlee Jul 22, 2024
d905c75
Merge branch 'develop' into 3.17-atf-refactor
jeawhanlee Jul 22, 2024
8ac4a00
Merge branch 'develop' into 3.17-atf-refactor
jeawhanlee Jul 23, 2024
fab2630
Closes #6764: Refactor lcp beacon script (#6789)
Miraeld Jul 25, 2024
064e02e
Closes #6774: 3.17 - Refactor WarmUp (#6810)
jeawhanlee Jul 25, 2024
01e6c18
Fixed conflicts
jeawhanlee Jul 25, 2024
95a8cd9
Updated interface
jeawhanlee Jul 25, 2024
b23a751
Updated concrete factory
jeawhanlee Jul 25, 2024
348c005
Updated database concrete products
jeawhanlee Jul 25, 2024
f66c6ee
Updated abstract database modules
jeawhanlee Jul 25, 2024
b5df8a7
Updated processor to use factories instead of atf query
jeawhanlee Jul 25, 2024
c6de3a3
Updated abstract factory
jeawhanlee Jul 25, 2024
463c157
Add `get_rows_by_url` as it's missing from abstract class
Miraeld Jul 26, 2024
383a264
Fix nonce name
Miraeld Jul 26, 2024
0c99b0c
apply linter
Miraeld Jul 26, 2024
4dad0e2
Merge branch 'develop' into 3.17-atf-refactor
jeawhanlee Jul 26, 2024
f450e8f
Merge branch '3.17-atf-refactor' into enhancement/6779-atf-db-refactor
jeawhanlee Jul 26, 2024
3ea850b
Fixed unreasonable failing test for RUCSS
jeawhanlee Jul 26, 2024
b87f0fb
Updated test
jeawhanlee Jul 26, 2024
6efc8cc
Closes #6781: 3.17 - Refactor Cron (#6797)
Khadreal Jul 26, 2024
cdb9cc7
Updated to use queries from factory
jeawhanlee Jul 26, 2024
1ba7f74
phpcs fix
jeawhanlee Jul 26, 2024
881b1b1
Add correct property
jeawhanlee Jul 26, 2024
b244714
adjust the beacon script
wordpressfan Jul 29, 2024
3eb3343
Closes #6779: AboveTheFold Database Refactor (#6794)
Miraeld Jul 30, 2024
672dc33
Closes: #6773 Refactor admin (#6802)
Khadreal Jul 30, 2024
baf5fc1
Fix phpstan
Miraeld Aug 1, 2024
4856c2c
Save lcp images properly in the database - follow up after DB refacto…
wordpressfan Aug 1, 2024
239621e
Fixed fatal error during uninstall
jeawhanlee Aug 1, 2024
50ff24c
Fixed conflicts
jeawhanlee Aug 1, 2024
03eeb74
Updated tests
jeawhanlee Aug 1, 2024
8325874
Update wpr-beacon to latest 3.17 refacto fix
MathieuLamiot Aug 3, 2024
3865638
Updated to use processor class
jeawhanlee Aug 5, 2024
365f218
Added processor class
jeawhanlee Aug 5, 2024
1ec4a93
Updated with processor class
jeawhanlee Aug 5, 2024
1bdf05d
Updated fixture
jeawhanlee Aug 5, 2024
94c4cf2
Merge branch '3.17-atf-refactor' into 3.17-pilot-support-multiple-fac…
jeawhanlee Aug 5, 2024
80248fb
Updated hooks docblock
jeawhanlee Aug 5, 2024
cb76df6
Updated deprecated version
jeawhanlee Aug 5, 2024
83877b4
Closes #6846: Regression on 3.17 Pilot Refactor where LCP is not excl…
jeawhanlee Aug 8, 2024
10b0b65
Closes #6851: 3.17 refactor regression: {wpr_imagedimensions=1} query…
jeawhanlee Aug 8, 2024
76805c8
Closes #6852: 3.17 refactor regression: fatal error when clear critic…
jeawhanlee Aug 8, 2024
7ae0f2f
Merge branch '3.17-atf-refactor' into 3.17-pilot-support-multiple-fac…
jeawhanlee Aug 9, 2024
e711457
Fixed conflicts
jeawhanlee Aug 9, 2024
33664ef
Merge branch 'feature/lrc' into 3.17-pilot-support-multiple-factory-f…
jeawhanlee Aug 13, 2024
aadfb00
Merge branch 'feature/lrc' into 3.17-pilot-support-multiple-factory-f…
jeawhanlee Aug 13, 2024
109e9f1
Return payload
jeawhanlee Aug 14, 2024
25a990e
Updated interface
jeawhanlee Aug 14, 2024
e9c1625
Handle payload
jeawhanlee Aug 14, 2024
438ce64
Updated unit test
jeawhanlee Aug 14, 2024
ec37643
Updated integration test
jeawhanlee Aug 14, 2024
6f20465
Updated beacon
jeawhanlee Aug 14, 2024
ac7fd2c
phpcs fix
jeawhanlee Aug 14, 2024
040c807
Merge feature/lrc into 3.17-pilot-support-multiple-factory-for-ajax-e…
jeawhanlee Aug 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions assets/js/wpr-beacon.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,21 @@
this._handleInfiniteLoop();
}, 1e4);
const isGeneratedBefore = await this._getGeneratedBefore();
const shouldGenerateLcp = this.config.status.atf && isGeneratedBefore === false;
let shouldSaveResultsIntoDB = false;
const shouldGenerateLcp = this.config.status.atf && (isGeneratedBefore === false || isGeneratedBefore.lcp === false);
if (shouldGenerateLcp) {
this.lcpBeacon = new BeaconLcp_default(this.config, this.logger);
await this.lcpBeacon.run();
shouldSaveResultsIntoDB = true;
} else {
this.logger.logMessage("Not running BeaconLcp because data is already available");
}
this._saveFinalResultIntoDB();
if (shouldSaveResultsIntoDB) {
this._saveFinalResultIntoDB();
} else {
this.logger.logMessage("Not saving results into DB as no beacon features ran.");
this._finalize();
}
}
async _isValidPreconditions() {
const threshold = {
Expand All @@ -257,7 +264,7 @@
credentials: "same-origin",
body: data_check
}).then((data) => data.json());
return beacon_data_response.success;
return beacon_data_response.data;
}
_saveFinalResultIntoDB() {
const results = {
Expand All @@ -278,7 +285,7 @@
"wpr-saas-no-intercept": true
}
}).then((response) => response.json()).then((data2) => {
this.logger.logMessage(data2);
this.logger.logMessage(data2.data.lcp);
}).catch((error) => {
this.logger.logMessage(error);
}).finally(() => {
Expand Down
2 changes: 1 addition & 1 deletion assets/js/wpr-beacon.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading