Skip to content

Mod. React. Continue switch auth block.#640

Merged
svfcode merged 17 commits into
devfrom
settings-to-react-12
Apr 30, 2026
Merged

Mod. React. Continue switch auth block.#640
svfcode merged 17 commits into
devfrom
settings-to-react-12

Conversation

@svfcode

@svfcode svfcode commented Apr 6, 2026

Copy link
Copy Markdown
Member

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 “Auth / Logging in” settings block to the modern React settings UI, moving 2FA activation confirmation from legacy PHP/jQuery UI into React and wiring the needed backend data for the React-managed fields.

Changes:

  • Move 2FA confirmation UI/logic from PHP-rendered hidden HTML + synchronous jQuery AJAX to a React modal with async requests.
  • Expand SettingsGeneralReact payload (email recipient, login URL, admin email, role options, capability flags) and reorder/auth-group settings for React rendering.
  • Update legacy tooltip handlers to support data-setting attributes and remove obsolete 2FA legacy JS.

Reviewed changes

Copilot reviewed 32 out of 38 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
lib/CleantalkSP/SpbctWP/Views/Settings.php Removes server-rendered 2FA dialog HTML from settings page data.
lib/CleantalkSP/SpbctWP/UsersPassCheckModule/UserPassCheckView.php Adds a psalm suppression annotation for a (potentially) unused method.
lib/CleantalkSP/SpbctWP/Settings/SettingsGeneralReact.php Adds React data (email/URLs/roles/flags), expands auth settings grouping + ordering, and provides WP roles options for React.
js/src/spbc-settings.js Makes long description/recommendation handlers accept data-setting in addition to setting. Removes legacy 2FA code generation/check logic.
js/src/spbc-admin.js Makes long description handler accept data-setting as a fallback.
js/src/react/pageElements/HiddenElements/HiddenElements.js Deletes legacy hidden HTML renderer used for the old 2FA dialog.
js/src/react/components/TabContent/TabSettingsGeneral/TabSettingsGeneral.js Binds shuffle-salts click handler via delegated event handler; passes new auth-related props into React settings.
js/src/react/components/TabContent/TabSettingsGeneral/SettingsGroup.js Extends settings group mapping to include auth-related React components and supports live in-group dependency updates.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/loginPageRenameUtils.js Adds helper for determining login rename enabled state.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/editTechSupportUrlUtils.js Adds helpers for determining 2FA active and tech-support-url enabled state.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/LoginPageRenameEnabled.js New React setting component for enabling login page rename.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/LoginPageRenameName.js New React setting component for login page rename slug.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/LoginPageRenameRedirect.js New React setting component for login page redirect URL.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/LoginPageRenameSendEmail.js New React setting component for “send notification email” option (capability-aware).
js/src/react/components/TabContent/TabSettingsGeneral/Settings/EditTechSupportUrlEnabled.js New React setting component to enable technical support link override.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/EditTechSupportUrlLink.js New React setting component for tech support URL field.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/EditTechSupportUrlRemove.js New React setting component to remove the tech support link.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/CheckPassEnable.js Updates to report value changes back to the auth settings group state and add data-setting for tooltips.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/CheckPassRoles.js New React multiselect for check-pass roles using dynamic WP role options.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/2faEnable.js New React 2FA enable control + confirmation flow.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/2faRoles.js New React multiselect for 2FA roles using dynamic WP role options.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/2faConfirmationDialog.js New React modal for entering/resending and verifying the 2FA confirmation code.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/2faConfirmationApi.js New fetch-based AJAX helpers for generating/checking the 2FA confirmation code.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/ActionShuffleSalts.js New React “Shuffle salts” action UI element.
js/src/react/components/TabContent/TabSettingsGeneral/Settings.js Passes new auth-related props down to SettingsGroup.
js/src/react/components/FormElements/Select.js Adds multiple support and correct handling of multi-select values.
js/src/react/components/FormElements/InputRadioGroup.js Syncs internal selected state when value prop changes.
js/src/react/components/App.js Removes HiddenElements usage now that the 2FA dialog is React-based.
js/spbc-settings.min.js Updates built/minified settings script to reflect source changes.
js/spbc-admin.min.js Updates built/minified admin script to reflect source changes.
js/spbc-admin.min.js.map Updates source map for built/minified admin script.
inc/spbc-settings.php Removes legacy auth-group field definitions and old PHP renderers; ensures React-managed empty sections don’t render legacy wrappers; updates 2FA handler comments.
css/src/spbc-settings.css Extends spinner styling to the new React resend button class.
css/spbc-settings.min.css Updates built/minified settings CSS to reflect source changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread js/src/react/components/FormElements/Select.js

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

Copilot reviewed 32 out of 38 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Copilot reviewed 32 out of 38 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@svfcode svfcode requested a review from Copilot April 24, 2026 07:40

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

Copilot reviewed 32 out of 38 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread js/src/spbc-settings.js

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

Copilot reviewed 32 out of 38 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread inc/spbc-settings.php
Comment thread inc/spbc-settings.php

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

Copilot reviewed 32 out of 38 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@svfcode svfcode merged commit 04e2416 into dev Apr 30, 2026
3 checks passed
svfcode added a commit that referenced this pull request May 12, 2026
* Queue log removed.

* Upd. Logging FW update.

* Upd. Logging FW update. Auto-tests.

* Fix. Logger. Logs update fixed.

* Upd. Logger. Dev merge and fixes.

* Code. Code Review

* Code. Code Review

* upd version

* upd version

* Code. Code Review

* Code. Code Review

* Code. Code Review

* Code. Code Review

* Mod. React. Continue switch auth block. (#640)

* Mod. React. Continue switch auth block.

* Mod. React. Switch auth block.

* fix eslint

* fix psalm

* upd

* fix hints

* upd hint again

* Fix. Settings. Fix 2fa option switch.

* ref by review

* ref by review

* fix typo

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Upd. Settings. Improve modal layout.

* reminify

* fix eslint

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix. Code. Github action fixed (xdebug activated).

* Mod. Link. Changing the link

* Upd. Scan. Improve Surface flow to count files. (#652)

* Upd. Scan. Improve Surface flow to count files.

* Upd. Scan. Improve Surface flow to count files.

* Upd. Scan. Improve Surface flow to count files.

* Upd. Scan. Improve Surface flow to count files.

* Update changelog

* Upd. Banners. Improved statement of show banner.

---------

Co-authored-by: alexandergull <alex.g@cleantalk.org>
Co-authored-by: datorik <datorik@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Glomberg <bazz@bk.ru>
Co-authored-by: AntonV1211 <antonV1211@yandex.ru>
Co-authored-by: Aleksandr Banins <alexander.b@cleantalk.org>
Co-authored-by: AntonV1211 <39616556+AntonV1211@users.noreply.github.com>
@Glomberg Glomberg deleted the settings-to-react-12 branch May 19, 2026 08:30
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.

4 participants