Repository navigation
Remove the empty label column on the Settings tab - #30
Conversation
The Cookie Notice field was registered with a title, so the Settings API rendered a <th> label column next to it. The section heading already names the field, which left an empty gutter on the left of the panel. Tag the field row and hide its label column so the field uses the full width. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f91e4c2af4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -1 +0,0 @@ | |||
| .frcn-settings-wrapper .frcn-field-row--toggle{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;max-width:640px}.frcn-settings-wrapper .frcn-toggle-label{font-size:15px;font-weight:600}.frcn-settings-wrapper .frcn-toggle{position:relative;display:inline-block;width:42px;height:24px}.frcn-settings-wrapper .frcn-toggle input{opacity:0;width:0;height:0}.frcn-settings-wrapper .frcn-toggle span{position:absolute;inset:0;background-color:#ccc;border-radius:999px;transition:background-color .2s;cursor:pointer}.frcn-settings-wrapper .frcn-toggle span::before{content:"";position:absolute;width:18px;height:18px;left:3px;top:3px;background-color:#fff;border-radius:50%;transition:transform .2s}.frcn-settings-wrapper .frcn-toggle input:checked+span{background-color:#687df9}.frcn-settings-wrapper .frcn-toggle input:checked+span::before{transform:translateX(18px)}.frcn-settings-wrapper .frcn-panel{max-width:640px;padding:16px;background-color:#f9fafb;border:1px solid #e5e7eb;border-radius:8px;margin-bottom:16px}.frcn-settings-wrapper .frcn-stats-row{display:flex;gap:16px;max-width:640px;margin-bottom:16px;padding:16px;background-color:#f9fafb;border:1px solid #e5e7eb;border-radius:8px}.frcn-settings-wrapper .frcn-stat{flex:1}.frcn-settings-wrapper .frcn-stat__label{font-size:12px;color:#6b7280;margin:0 0 4px}.frcn-settings-wrapper .frcn-stat__value{font-size:24px;font-weight:700;margin:0}.frcn-settings-wrapper .frcn-label{display:block;font-size:13px;font-weight:600;color:#374151;margin-bottom:8px}.frcn-settings-wrapper .frcn-label--mt{margin-top:16px}.frcn-settings-wrapper .frcn-hint{font-size:12px;color:#6b7280;margin-top:8px}.frcn-settings-wrapper .frcn-hint--warn{color:#b45309}.frcn-settings-wrapper .frcn-input{display:block;width:100%;padding:6px 10px;border:1px solid #d1d5db;border-radius:6px;font-size:14px}.frcn-settings-wrapper .frcn-input--narrow{width:120px}.frcn-settings-wrapper .frcn-mono{font-family:monospace;font-size:12px}.frcn-settings-wrapper .frcn-color-input{height:40px;width:100%;border:1px solid #d1d5db;border-radius:6px}.frcn-settings-wrapper .frcn-grid-2,.frcn-settings-wrapper .frcn-grid-3{display:grid;gap:16px;margin-top:16px}.frcn-settings-wrapper .frcn-grid-2{grid-template-columns:repeat(2,1fr)}.frcn-settings-wrapper .frcn-grid-3{grid-template-columns:repeat(3,1fr)}.frcn-settings-wrapper .frcn-grid--mt{margin-top:16px}.frcn-settings-wrapper .frcn-alert{margin-bottom:16px;padding:16px;background-color:#fffbeb;border:1px solid #fde68a;border-radius:8px}.frcn-settings-wrapper .frcn-alert__title{font-size:13px;font-weight:600;color:#92400e;margin:0 0 8px}.frcn-settings-wrapper .frcn-alert__body{font-size:13px;color:#92400e;margin:0}.frcn-settings-wrapper .frcn-integration-list{list-style:none;margin:0 0 16px;padding:0;display:flex;flex-direction:column;gap:8px}.frcn-settings-wrapper .frcn-integration-item{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 12px;background-color:#fff;border:1px solid #e5e7eb;border-radius:8px;font-size:13px}.frcn-settings-wrapper .frcn-remove{font-size:12px;color:#b91c1c;white-space:nowrap}.frcn-settings-wrapper .frcn-cookie-notice-preview-stage{position:relative;min-height:180px;display:flex;align-items:center;justify-content:center;padding:24px 12px;background-color:#eef2ff;border-radius:8px}.frcn-settings-wrapper .frcn-cookie-notice-preview{position:static!important;inset:auto!important;left:auto!important;right:auto!important;bottom:auto!important;top:auto!important;max-width:100%;width:auto!important}.frcn-settings-wrapper .frcn-cookie-notice-preview.frcn-cookie-notice--bar{max-width:480px}.frcn-settings-wrapper .frcn-cookie-notice-preview.frcn-cookie-notice--box.frcn-cookie-notice--right{margin-left:auto;margin-right:0}.frcn-settings-wrapper .frcn-cookie-notice-preview.frcn-cookie-notice--box.frcn-cookie-notice--left{margin-right:auto;margin-left:0}.frcn-settings-wrapper .frcn-cookie-notice-preview .frcn-cookie-notice__panel{max-height:none}.frcn-settings-wrapper .frcn-tabs{display:flex;flex-wrap:wrap;gap:4px;margin:16px 0 20px;border-bottom:1px solid #e5e7eb}.frcn-settings-wrapper .frcn-tab-btn{display:flex;align-items:center;border:none;border-bottom:2px solid transparent;background:0 0;color:#50575e;font-weight:500;font-size:13px;padding:9px 14px 8px;border-radius:4px 4px 0 0;cursor:pointer;white-space:nowrap}.frcn-settings-wrapper .frcn-tab-btn:hover{background:#f6f7f7}.frcn-settings-wrapper .frcn-tab-btn.is-active{border-bottom-color:#687df9;background:#eef2ff;color:#1d2327;font-weight:600}.frcn-settings-wrapper .frcn-tab-panel[hidden]{display:none}.frcn-settings-wrapper .frcn-upsell-card{max-width:520px;background:linear-gradient(135deg,#fff 0,#eef2ff 100%);border:1px solid #dbe3fe;border-radius:8px;padding:24px}.frcn-settings-wrapper .frcn-pro-chip{display:inline-block;font-size:10px;font-weight:700;letter-spacing:.06em;color:#fff;background:#5468e0;border-radius:3px;padding:2px 7px;margin-bottom:10px}.frcn-settings-wrapper .frcn-upsell-card h2{margin:0 0 8px;font-size:17px;font-weight:600;color:#1d2327}.frcn-settings-wrapper .frcn-upsell-card p{margin:0 0 16px;color:#4b5563;line-height:1.5}.frcn-settings-wrapper .frcn-btn-primary{display:inline-flex;align-items:center;gap:4px;background:#5468e0;color:#fff;font-size:13px;font-weight:600;text-decoration:none;padding:9px 16px;border-radius:6px}.frcn-settings-wrapper .frcn-btn-primary:hover{background:#4054d6;color:#fff} No newline at end of file | |||
There was a problem hiding this comment.
Restore the generated settings stylesheet
For tag-based releases from this commit, the checked .github/workflows/deploy.yml runs only composer install before deploying and never invokes npm run build, so deleting this tracked artifact means the WordPress.org package will omit settings.min.css; with SCRIPT_DEBUG off, Settings::get_asset_url() consequently falls back to the unminified stylesheet while the other assets remain minified. Commit the regenerated file or add the asset build to the deployment job.
AGENTS.md reference: AGENTS.md:L118-L124
Useful? React with 👍 / 👎.
| // The section heading already names this field; the class lets the | ||
| // stylesheet drop the Settings API's label column so the field uses | ||
| // the full panel width instead of leaving an empty gutter. | ||
| array( 'class' => 'frcn-field-row--full' ) |
There was a problem hiding this comment.
Add automated coverage for the full-width row
Add a test that verifies the registered field receives frcn-field-row--full and that the stylesheet contains the corresponding layout rules. This change modifies both sides of that PHP/CSS integration without adding or updating any test, leaving the new behavior covered only by the manual check even though the repository explicitly requires programmatic coverage for every change.
AGENTS.md reference: AGENTS.md:L126-L129
Useful? React with 👍 / 👎.
Summary
The Settings tab showed an empty gutter on the left of the Cookie Notice panel.
enable_cookie_noticeis registered withadd_settings_field()using a title, so the Settings API renders a<th>label column. The section heading already shows "Cookie Notice", so that column was empty.array( 'class' => 'frcn-field-row--full' )toadd_settings_field()so WordPress tags the row.<th>and drop the<td>side padding inassets/admin/settings.css. The rule is scoped to.frcn-settings-wrapper.settings.min.csswithnpm run build.Test plan
composer lint,composer phpstan,composer test(132 tests) pass.display: none) and the panel uses the full width.