Skip to content

Mod. Settings. Moving settings to React - #692

Open
AntonV1211 wants to merge 17 commits into
devfrom
mod_react_15_av
Open

Mod. Settings. Moving settings to React#692
AntonV1211 wants to merge 17 commits into
devfrom
mod_react_15_av

Conversation

@AntonV1211

Copy link
Copy Markdown
Contributor

@AntonV1211 AntonV1211 changed the title Mod react 15 av Mod. Settings. Moving settings to React Jul 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR continues the migration of the plugin’s General Settings UI from PHP-rendered sections to the React settings screen, adding new React components for several settings groups (vulnerability checks, admin bar, misc, trusted/affiliate) and expanding the E2E test coverage accordingly.

Changes:

  • Move additional General Settings sections (Vulnerability Check, Admin Bar, Misc, Trusted & Affiliate) into React components and React grouping/ordering.
  • Expose additional settings-related values to React via PHP (links, WL info, descriptions/paths).
  • Update Puppeteer/Jest E2E tests and related test utilities to support the new UI structure.

Reviewed changes

Copilot reviewed 42 out of 44 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
spec/utils.js Normalize JEST app root env var (trim trailing slashes).
spec/form.spec.js Update Puppeteer launch args/options and executable path handling.
spec/tests/settings_tab.test.js Add extensive settings UI assertions/toggles for the newly React-managed settings.
spec/tests/login.test.js Make login typing more robust by clearing fields before input.
lib/CleantalkSP/SpbctWP/VulnerabilityAlarm/VulnerabilityAlarmView.php Remove PHP-generated vulnerability feature description (moved to React).
lib/CleantalkSP/SpbctWP/Views/Settings.php Add additional page-data fields for React (links, WL flags, descriptions, paths).
lib/CleantalkSP/SpbctWP/Settings/SettingsGeneralReact.php Group/order more settings into React sections (vulnerability/admin bar/misc/trusted+affiliate).
lib/CleantalkSP/SpbctWP/AdjustToEnvironmentModule/AdjustToEnvironmentSettings.php Add psalm suppression for unused class.
js/src/react/components/TabContent/TabSettingsGeneral/styles.css Add General tab-specific styles (sub-setting indentation + affiliate shortcode width).
js/src/react/components/TabContent/TabSettingsGeneral/SettingsGroup.js Wire new groups and map additional setting keys to new React components.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/WPUseBuiltinHttpApi.js New React setting component.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/WPUploadDirPreventPhpExecution.js New React setting component (uses description from context).
js/src/react/components/TabContent/TabSettingsGeneral/Settings/WpDisableXmlrpc.js New React setting component.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/WpDisableRestApi.js New React setting component (radio modes).
js/src/react/components/TabContent/TabSettingsGeneral/Settings/WPDashboardWidgetShow.js New React setting component.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/VulnerabilityCheckWarnOnModulesPages.js New React setting component (sub-setting).
js/src/react/components/TabContent/TabSettingsGeneral/Settings/VulnerabilityCheckTestBeforeInstall.js New React setting component.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/VulnerabilityCheckShowReports.js New React setting component.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/VulnerabilityCheckEnableCron.js New React setting component with dependency handling.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/VulnerabilityCheckDesc.js React replacement for the removed PHP vulnerability description.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/SPBCTrustedAndAffiliateShortcodeTag.js New React UI for readonly shortcode tag (depends on parent).
js/src/react/components/TabContent/TabSettingsGeneral/Settings/SPBCTrustedAndAffiliateShortcode.js New React checkbox setting with dependency handling.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/SPBCTrustedAndAffiliateFooter.js New React checkbox setting.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/SPBCTrustedAndAffiliateAddId.js New React checkbox setting with link from context.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/MonitoringUsers.js New React hidden field for monitoring users flag.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/MiscShowLinkInLoginForm.js New React checkbox setting with interpolated WL/brand text.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/MiscPreventLoginsCollectingOnPasswordReset.js New React checkbox setting.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/MiscPreventLoginsCollecting.js New React checkbox setting.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/MiscForbidToShowInIframes.js New React checkbox setting.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/MiscDisableFileEditor.js New React radio setting with multisite/network-admin messaging.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/MiscCompleteDeactivation.js New React checkbox setting with backup directory text.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/MiscBackendLogsEnable.js New React setting for backend logs (with links/upsell description).
js/src/react/components/TabContent/TabSettingsGeneral/Settings/DataSetCookies.js New React radio setting for cookie mechanism.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/DataAdditionalHeaders.js New React checkbox setting.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/AdminBarShow.js New React parent setting with dependency toggling.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/AdminBarFirewallCounter.js New React sub-setting.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/AdminBarBruteForceCounter.js New React sub-setting.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/AdminBarAdminsOnlineCounter.js New React sub-setting.
js/src/react/components/TabContent/TabSettingsGeneral/Settings.js Add new section definitions and WL gating for Trusted & Affiliate.
js/src/react/components/TabContent/styles.css Remove temporary “bottom gluing” styles now that more groups are React-managed.
inc/spbc-settings.php Remove PHP-rendered sections/fields for the migrated settings and simplify header rendering.
css/src/spbc-settings.css Remove General-tab-specific sub-setting/affiliate styles from global stylesheet source.
css/spbc-settings.min.css Update minified CSS accordingly (removing those global styles).
Files not reviewed (1)
  • css/spbc-settings.min.css: Generated file
Suppressed comments (4)

spec/tests/settings_tab.test.js:407

  • React settings render help icons with data-setting, not setting. This selector will never match and the test will fail.
    spec/tests/settings_tab.test.js:466
  • React settings render help icons with data-setting, not setting. This selector will never match and the test will fail.
    spec/tests/settings_tab.test.js:488
  • React settings render help icons with data-setting, not setting. This selector will never match and the test will fail.
    spec/tests/settings_tab.test.js:602
  • React settings render help icons with data-setting, not setting. This selector will never match and the test will fail.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread js/src/react/components/TabContent/TabSettingsGeneral/Settings/DataSetCookies.js Outdated
Comment thread js/src/react/components/TabContent/TabSettingsGeneral/Settings/DataSetCookies.js Outdated
Comment thread spec/form.spec.js
Comment thread spec/__tests__/settings_tab.test.js Outdated
AntonV1211 and others added 2 commits August 11, 2026 15:39
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@AntonV1211
AntonV1211 requested a review from Glomberg August 11, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants