Skip to content

Admin Settings Screen Implementation#1

Closed
Ref34t wants to merge 1 commit into
trunkfrom
feature/admin-settings-screen-issue-25
Closed

Admin Settings Screen Implementation#1
Ref34t wants to merge 1 commit into
trunkfrom
feature/admin-settings-screen-issue-25

Conversation

@Ref34t

@Ref34t Ref34t commented Oct 26, 2025

Copy link
Copy Markdown
Owner

Summary

Builds a complete admin settings screen with React UI for managing AI experimental features.

Key Components

  • Admin Settings Page - React-based UI using WordPress components
  • Settings Toggle - Global on/off switch for experimental features
  • Feature Toggles - Per-feature enable/disable functionality
  • Settings Registry - Allows features to register their own settings sections
  • Settings Service - Coordinates all settings components
  • REST API - Backend data layer for settings persistence

Architecture

  • Direct instantiation in bootstrap
  • Filter-based dependency injection for Feature_Toggles service
  • Features receive Settings_Registry as parameter
  • Render callbacks accept Settings_Toggle directly

Feature Development Pattern

Features extend Abstract_Feature and follow these rules:

  1. Implement load_feature_metadata() returning id, label, description
  2. Always register settings sections via ai_register_settings_sections hook
  3. Check is_enabled() before registering functional hooks
  4. Pass services as parameters
  5. Use Provides_Settings_Section trait for settings panels

See Example_Feature for complete reference implementation.

Files Added

  • Admin settings infrastructure (9 PHP classes)
  • React/TypeScript UI (src/ directory)
  • Feature settings trait (Provides_Settings_Section)
  • Comprehensive test suite

Resolves WordPress#25

Test using WordPress Playground

The changes in this pull request can be previewed and tested using this WordPress Playground instance:

Click here to test this pull request.

Update Current Status table to reflect work in progress on admin settings screen for Issue WordPress#25.
@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @mohamed.khaled@9hdigital.com.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Unlinked contributors: mohamed.khaled@9hdigital.com.

Co-authored-by: Ref34t <mokhaled@git.wordpress.org>
Co-authored-by: felixarntz <flixos90@git.wordpress.org>
Co-authored-by: jeffpaul <jeffpaul@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@Ref34t Ref34t closed this Oct 26, 2025
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.

Create a basic admin settings screen

2 participants