Skip to content

refactor(settings): simplify PHP templates with data-driven rendering and cleaner control flow#59088

Draft
joshtrichards wants to merge 11 commits intomasterfrom
jtr/refactor-settings-templates-separation-readability
Draft

refactor(settings): simplify PHP templates with data-driven rendering and cleaner control flow#59088
joshtrichards wants to merge 11 commits intomasterfrom
jtr/refactor-settings-templates-separation-readability

Conversation

@joshtrichards
Copy link
Member

  • Resolves: #

Summary

This PR refactors multiple Settings templates to improve readability and maintainability while preserving behavior.

What changed

  • Simplified inline conditionals and nested template logic.
  • Extracted repeated markup/logic into local variables and structured arrays.
  • Replaced repetitive hardcoded blocks with loop-based rendering where appropriate.
  • Standardized template formatting (clearer control flow, spacing, and tag style).
  • Kept escaping/output behavior intact

Notes

  • No intended functional changes.
  • DOM IDs/classes and conditional visibility behavior were preserved.

TODO

  • ...

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
…ven loop

Signed-off-by: Josh <josh.t.richards@gmail.com>
…onfig

Signed-off-by: Josh <josh.t.richards@gmail.com>
… array

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards added ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) feature: settings labels Mar 19, 2026
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: settings ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant