-
Notifications
You must be signed in to change notification settings - Fork 227
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 #7058: Implement DJE Safe Mode Feature #7081
Conversation
a8b48f5
to
9e698a6
Compare
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more |
|
Testing notes [WIP , to be checked with PO what shall be changed here or on other GH]
|
@Miraeld Thanks For the PR. Can you please check the points below: Current o/p on PR |
@Mai-Saad Feedbacks 1 & 2 have been fixed. About the third feedback:
If I may add something, I find it more logic to be like it is now, and I'll explain why. If you take the RUCSS as example, when you click on the option you get the ☑️ however it won't be enable until you select one of the method. If you don't click on one of the method, but save, it won't be ☑️ anymore. That's a bit confusing. However here, you won't get the ☑️ until you click "ACTIVATE SAFE MODE", which means the user confirm their intention to use the safemode. Just my point of view. |
@Miraeld Thanks for the update. |
Hello hello @Mai-Saad I've made some changes and mostly on the regex to be considered as "default" exclusion of the safemode. Also, I've made some modification on the condition to delete default exclusion brought by safemode from the textarea only when the safemode is enabled, following this comment. Until now, we were deleting from the textarea even tho the safemode was disabled. A technical update of the whole PR: This pull request introduces a new feature called "Safe Mode for Delay JavaScript Execution" and includes several related changes across multiple files. The most important changes are grouped by theme below: Feature Addition:
Settings and Options:
User Interface:
Testing:
These changes ensure that the new safe mode feature is integrated into the existing delay JS functionality and properly tested. |
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more |
@Miraeld thanks for the update. Now updating while having default exclusions, will keep it in the text area and safe mode is unchecked.
|
Description
Fixes #7058
This change introduces the "Delay JavaScript Execution safe mode" feature. It enhances user control over JavaScript execution, providing a checkbox to enable or disable safe mode, and displays a warning about potential performance impacts. This helps users manage their site's performance more effectively.
Type of change
Detailed scenario
To trigger the new code:
Technical description
Documentation
The feature adds a checkbox labeled "Delay JavaScript Execution safe mode" and displays a warning when it is checked. The backend logic updates the exclusions list based on the checkbox state and ensures these changes are applied when settings are saved.
Also, when we load
delay_js
on the front-end, we check if the new option is enabled, and if this is the case, we add default exclusion to delay_js.New dependencies
No new dependencies are introduced in this change.
Risks
None.
Mandatory Checklist
Code validation
Code style