From cc4ed148dadba46cc7ddabd683912510e8e44250 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 24 Oct 2026 11:04:30 +0000 Subject: [PATCH 1/2] fix(submissions): keep a row's action buttons on one line The fixed-layout table gave every column but ID an equal share, so the Actions column (228 px in a 1700 px table) was narrower than Edit, PDF and Trash need, while Status and Date sat half empty. Status and Date now take 9em, Actions 22em, and the buttons sit in a flex row with an even gap; a trashed row's four buttons still wrap. Measured by a render at 1700, 1366 and 1180 px. Closes #2050 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_018srx5hc431EYmG4MHUr2KA --- CHANGELOG.md | 1 + assets/css/ffc-admin-submissions.css | 21 +++++++++++++++++++ assets/css/ffc-admin-submissions.min.css | 2 +- includes/admin/class-ffc-submissions-list.php | 10 +++++++++ tests/Unit/SubmissionsListTest.php | 3 +++ 5 files changed, 36 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d9c86421..5850c4ac5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,6 +64,7 @@ The format follows [Keep a Changelog] (https://keepachangelog.com/en/1.1.0/). - **Audience Calendars: invitations find the form's page in any spelling and warn when there is none** (#2024). The page lookup accepts `id="N"`, `id='N'` and `id=N`; the calendar's Post-event form tab and the Attendance card say when no published page embeds the chosen form. Post-event invitations join Tools → Export and Erase Personal Data. - **Certificate forms: no silent failure when the browser cannot run them** (#2030). The form posts with `method="post"`, so without JavaScript the name, e-mail and CPF/RF stay out of the URL and the logs, and a notice says JavaScript is off. A form whose scripts, PDF libraries or captcha and nonce refresh did not load in 10 s shows "The form did not load completely" with a Reload button instead of a form that fails on submit. - **GPS forms no longer show "Location blocked" twice** (#2030). On a cached page, refreshing the captcha and security codes re-ran the checks while the browser was still answering the permission query, and both answers drew a banner. A stale answer is now dropped, and a banner replaces one with the same purpose. +- **The submissions list keeps a row's buttons on one line** (#2050). Every column of the fixed-layout table had an equal share, so Edit, PDF and Trash wrapped while Status and Date sat half empty. Status and Date now take what they hold, Actions what three buttons need, and the buttons keep an even gap. ### Changed diff --git a/assets/css/ffc-admin-submissions.css b/assets/css/ffc-admin-submissions.css index 44241e73c..c8578a17d 100644 --- a/assets/css/ffc-admin-submissions.css +++ b/assets/css/ffc-admin-submissions.css @@ -55,6 +55,27 @@ padding: var(--ffc-spacing-lg) var(--ffc-spacing-md); } +/* The fixed layout gave every column an equal share, so Status and Date + took far more than they hold while the action buttons wrapped. The two + short columns take what they hold and Actions what three buttons need; + the text columns share the rest. */ +.ffc-table-responsive table.wp-list-table .column-status, +.ffc-table-responsive table.wp-list-table .column-submission_date { + width: 9em; +} + +.ffc-table-responsive table.wp-list-table .column-actions { + width: 22em; +} + +/* The buttons sit on one line when they fit and wrap with an even gap when + they do not (a trashed row has four). */ +.ffc-submission-actions { + display: flex; + flex-wrap: wrap; + gap: var(--ffc-spacing-xs); +} + .ffc-table-responsive table.wp-list-table { border: 1px solid var(--ffc-border); border-radius: var(--ffc-radius-sm); diff --git a/assets/css/ffc-admin-submissions.min.css b/assets/css/ffc-admin-submissions.min.css index 0e88dc679..7367eb93d 100644 --- a/assets/css/ffc-admin-submissions.min.css +++ b/assets/css/ffc-admin-submissions.min.css @@ -1,2 +1,2 @@ -.ffc-submission-row-action{margin-right:var(--ffc-spacing-xs);margin-bottom:var(--ffc-spacing-2xs)}.ffc-empty-data{color:var(--ffc-text-muted);font-style:italic;font-size:var(--ffc-font-size-sm)}.ffc-data-preview{font-size:var(--ffc-font-size-sm);line-height:1.6;color:var(--ffc-text-secondary)}.ffc-data-preview strong{color:var(--ffc-text);font-weight:600}.ffc-table-responsive table.wp-list-table .column-id{width:6.5em}.ffc-table-responsive td.column-actions{white-space:normal;padding:var(--ffc-spacing-lg) var(--ffc-spacing-md)}.ffc-table-responsive table.wp-list-table{border:1px solid var(--ffc-border);border-radius:var(--ffc-radius-sm);overflow:hidden}.ffc-table-responsive table.wp-list-table thead th{background:var(--ffc-bg-alt);font-weight:600}.ffc-table-responsive table.wp-list-table tbody tr{transition:background .2s ease}.ffc-table-responsive table.wp-list-table tbody tr:hover{background:var(--ffc-bg-alt)}.ffc-badge-success{background:var(--ffc-success-bg);color:var(--ffc-success-text)}.ffc-badge-muted{background:var(--ffc-danger-bg);color:var(--ffc-danger-text)}.ffc-badge small{font-weight:400;font-size:var(--ffc-font-size-2xs)}@media screen and (max-width:782px){.ffc-submission-row-action{display:flex;width:100%;margin-bottom:var(--ffc-spacing-xs)}.ffc-table-responsive td.column-actions{padding:var(--ffc-spacing-md)}}@media screen and (max-width:600px){.ffc-data-preview{font-size:var(--ffc-font-size-xs)}.ffc-empty-data{font-size:var(--ffc-font-size-xs)}}.ffc-filter-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:var(--ffc-z-modal);display:flex;align-items:center;justify-content:center}.ffc-filter-overlay-backdrop{position:absolute;top:0;left:0;right:0;bottom:0;background:var(--ffc-bg-overlay)}.ffc-filter-overlay-content{position:relative;background:var(--ffc-bg-card);border-radius:var(--ffc-radius-md);box-shadow:var(--ffc-shadow-lg);max-width:480px;width:90%;max-height:80vh;display:flex;flex-direction:column}.ffc-filter-overlay-header{display:flex;justify-content:space-between;align-items:center;padding:var(--ffc-spacing-lg) var(--ffc-spacing-xl);border-bottom:1px solid var(--ffc-border)}.ffc-filter-overlay-header h3{margin:0;font-size:var(--ffc-font-size-lg);font-weight:600}.ffc-filter-overlay-body{padding:var(--ffc-spacing-sm) 0;overflow-y:auto;max-height:50vh}.ffc-filter-form-item{display:flex;align-items:center;gap:var(--ffc-spacing-md);padding:var(--ffc-spacing-md) var(--ffc-spacing-xl);cursor:pointer;transition:background .15s ease;border-bottom:1px solid var(--ffc-border-light)}.ffc-filter-form-item:last-child{border-bottom:none}.ffc-filter-form-item:hover{background:var(--ffc-bg-alt)}.ffc-filter-form-item input[type=checkbox]{margin:0;flex-shrink:0}.ffc-filter-form-title{flex:1;font-size:var(--ffc-font-size-base);color:var(--ffc-text)}.ffc-filter-form-id{font-size:var(--ffc-font-size-xs);color:var(--ffc-text-light);flex-shrink:0}.ffc-filter-overlay-footer{display:flex;justify-content:flex-end;gap:var(--ffc-spacing-sm);padding:var(--ffc-spacing-lg) var(--ffc-spacing-xl);border-top:1px solid var(--ffc-border)}.ffc-admin-top-actions{display:flex;gap:var(--ffc-spacing-lg);align-items:center;margin-bottom:var(--ffc-spacing-xl);flex-wrap:wrap}.ffc-admin-top-actions form{display:inline-block}.ffc-data-preview,.ffc-empty-data,.ffc-table-responsive table.wp-list-table tbody tr{transition:all .2s cubic-bezier(.4, 0, .2, 1)}@media (prefers-reduced-motion:reduce){.ffc-table-responsive tbody tr{transition:none}}@media print{.ffc-submission-row-action{display:none}.ffc-table-responsive table.wp-list-table{border:1px solid var(--ffc-text)}}@media (forced-colors:active){.ffc-badge-muted,.ffc-badge-success{border:1px solid CanvasText}} +.ffc-submission-row-action{margin-right:var(--ffc-spacing-xs);margin-bottom:var(--ffc-spacing-2xs)}.ffc-empty-data{color:var(--ffc-text-muted);font-style:italic;font-size:var(--ffc-font-size-sm)}.ffc-data-preview{font-size:var(--ffc-font-size-sm);line-height:1.6;color:var(--ffc-text-secondary)}.ffc-data-preview strong{color:var(--ffc-text);font-weight:600}.ffc-table-responsive table.wp-list-table .column-id{width:6.5em}.ffc-table-responsive td.column-actions{white-space:normal;padding:var(--ffc-spacing-lg) var(--ffc-spacing-md)}.ffc-table-responsive table.wp-list-table .column-status,.ffc-table-responsive table.wp-list-table .column-submission_date{width:9em}.ffc-table-responsive table.wp-list-table .column-actions{width:22em}.ffc-submission-actions{display:flex;flex-wrap:wrap;gap:var(--ffc-spacing-xs)}.ffc-table-responsive table.wp-list-table{border:1px solid var(--ffc-border);border-radius:var(--ffc-radius-sm);overflow:hidden}.ffc-table-responsive table.wp-list-table thead th{background:var(--ffc-bg-alt);font-weight:600}.ffc-table-responsive table.wp-list-table tbody tr{transition:background .2s ease}.ffc-table-responsive table.wp-list-table tbody tr:hover{background:var(--ffc-bg-alt)}.ffc-badge-success{background:var(--ffc-success-bg);color:var(--ffc-success-text)}.ffc-badge-muted{background:var(--ffc-danger-bg);color:var(--ffc-danger-text)}.ffc-badge small{font-weight:400;font-size:var(--ffc-font-size-2xs)}@media screen and (max-width:782px){.ffc-submission-row-action{display:flex;width:100%;margin-bottom:var(--ffc-spacing-xs)}.ffc-table-responsive td.column-actions{padding:var(--ffc-spacing-md)}}@media screen and (max-width:600px){.ffc-data-preview{font-size:var(--ffc-font-size-xs)}.ffc-empty-data{font-size:var(--ffc-font-size-xs)}}.ffc-filter-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:var(--ffc-z-modal);display:flex;align-items:center;justify-content:center}.ffc-filter-overlay-backdrop{position:absolute;top:0;left:0;right:0;bottom:0;background:var(--ffc-bg-overlay)}.ffc-filter-overlay-content{position:relative;background:var(--ffc-bg-card);border-radius:var(--ffc-radius-md);box-shadow:var(--ffc-shadow-lg);max-width:480px;width:90%;max-height:80vh;display:flex;flex-direction:column}.ffc-filter-overlay-header{display:flex;justify-content:space-between;align-items:center;padding:var(--ffc-spacing-lg) var(--ffc-spacing-xl);border-bottom:1px solid var(--ffc-border)}.ffc-filter-overlay-header h3{margin:0;font-size:var(--ffc-font-size-lg);font-weight:600}.ffc-filter-overlay-body{padding:var(--ffc-spacing-sm) 0;overflow-y:auto;max-height:50vh}.ffc-filter-form-item{display:flex;align-items:center;gap:var(--ffc-spacing-md);padding:var(--ffc-spacing-md) var(--ffc-spacing-xl);cursor:pointer;transition:background .15s ease;border-bottom:1px solid var(--ffc-border-light)}.ffc-filter-form-item:last-child{border-bottom:none}.ffc-filter-form-item:hover{background:var(--ffc-bg-alt)}.ffc-filter-form-item input[type=checkbox]{margin:0;flex-shrink:0}.ffc-filter-form-title{flex:1;font-size:var(--ffc-font-size-base);color:var(--ffc-text)}.ffc-filter-form-id{font-size:var(--ffc-font-size-xs);color:var(--ffc-text-light);flex-shrink:0}.ffc-filter-overlay-footer{display:flex;justify-content:flex-end;gap:var(--ffc-spacing-sm);padding:var(--ffc-spacing-lg) var(--ffc-spacing-xl);border-top:1px solid var(--ffc-border)}.ffc-admin-top-actions{display:flex;gap:var(--ffc-spacing-lg);align-items:center;margin-bottom:var(--ffc-spacing-xl);flex-wrap:wrap}.ffc-admin-top-actions form{display:inline-block}.ffc-data-preview,.ffc-empty-data,.ffc-table-responsive table.wp-list-table tbody tr{transition:all .2s cubic-bezier(.4, 0, .2, 1)}@media (prefers-reduced-motion:reduce){.ffc-table-responsive tbody tr{transition:none}}@media print{.ffc-submission-row-action{display:none}.ffc-table-responsive table.wp-list-table{border:1px solid var(--ffc-text)}}@media (forced-colors:active){.ffc-badge-muted,.ffc-badge-success{border:1px solid CanvasText}} /*# sourceMappingURL=ffc-admin-submissions.min.css.map */ \ No newline at end of file diff --git a/includes/admin/class-ffc-submissions-list.php b/includes/admin/class-ffc-submissions-list.php index 6c3a64b17..df4e7a09f 100644 --- a/includes/admin/class-ffc-submissions-list.php +++ b/includes/admin/class-ffc-submissions-list.php @@ -211,6 +211,16 @@ private function reveal_nonce(): string { * @return string */ private function render_actions( array $item ): string { + return '
' . $this->action_buttons( $item ) . '
'; + } + + /** + * The row's action buttons, by what the viewer may do. + * + * @param array $item Item. + * @return string + */ + private function action_buttons( array $item ): string { $base_url = admin_url( 'edit.php?post_type=ffc_form&page=ffc-submissions' ); // 3-state model: read-only viewers (ffc_view_certificates) get the PDF diff --git a/tests/Unit/SubmissionsListTest.php b/tests/Unit/SubmissionsListTest.php index b8758fd82..bb1ee17c8 100644 --- a/tests/Unit/SubmissionsListTest.php +++ b/tests/Unit/SubmissionsListTest.php @@ -425,6 +425,9 @@ public function test_actions_manage_publish_shows_edit_pdf_trash(): void { $this->assertStringContainsString( 'PDF', $out ); $this->assertStringContainsString( 'Trash', $out ); $this->assertStringNotContainsString( 'Restore', $out ); + // One flex container holds the buttons, so they keep one line and an + // even gap where the column fits them. + $this->assertMatchesRegularExpression( '#^
.*
$#s', $out ); } public function test_actions_manage_trash_shows_restore_delete(): void { From d1f451fdd47816df8111da41ef20b792e9a1c66b Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 24 Oct 2026 11:13:27 +0000 Subject: [PATCH 2/2] fix(pii): "Reveal this page" sits below a list's status links and search On the submissions screen the paragraph followed the status links and the search box, which WordPress floats left and right, and ran into the gap between them. It now carries ffc-pii-reveal-bar, which clears both; on the screens without floats it changes nothing. Refs #2050 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_018srx5hc431EYmG4MHUr2KA --- CHANGELOG.md | 2 +- assets/css/ffc-admin-components.css | 7 +++++++ assets/css/ffc-admin-components.min.css | 2 +- includes/core/class-ffc-pii-reveal.php | 2 +- tests/Unit/PiiRevealTest.php | 2 ++ 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5850c4ac5..1cdc8d0b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,7 +64,7 @@ The format follows [Keep a Changelog] (https://keepachangelog.com/en/1.1.0/). - **Audience Calendars: invitations find the form's page in any spelling and warn when there is none** (#2024). The page lookup accepts `id="N"`, `id='N'` and `id=N`; the calendar's Post-event form tab and the Attendance card say when no published page embeds the chosen form. Post-event invitations join Tools → Export and Erase Personal Data. - **Certificate forms: no silent failure when the browser cannot run them** (#2030). The form posts with `method="post"`, so without JavaScript the name, e-mail and CPF/RF stay out of the URL and the logs, and a notice says JavaScript is off. A form whose scripts, PDF libraries or captcha and nonce refresh did not load in 10 s shows "The form did not load completely" with a Reload button instead of a form that fails on submit. - **GPS forms no longer show "Location blocked" twice** (#2030). On a cached page, refreshing the captcha and security codes re-ran the checks while the browser was still answering the permission query, and both answers drew a banner. A stale answer is now dropped, and a banner replaces one with the same purpose. -- **The submissions list keeps a row's buttons on one line** (#2050). Every column of the fixed-layout table had an equal share, so Edit, PDF and Trash wrapped while Status and Date sat half empty. Status and Date now take what they hold, Actions what three buttons need, and the buttons keep an even gap. +- **The submissions list keeps a row's buttons on one line** (#2050). Every column of the fixed-layout table had an equal share, so Edit, PDF and Trash wrapped while Status and Date sat half empty. Status and Date now take what they hold, Actions what three buttons need, and the buttons keep an even gap. "Reveal this page" sits below the status links and the search box instead of between them. ### Changed diff --git a/assets/css/ffc-admin-components.css b/assets/css/ffc-admin-components.css index d4813f017..f91fc9169 100644 --- a/assets/css/ffc-admin-components.css +++ b/assets/css/ffc-admin-components.css @@ -480,3 +480,10 @@ display: none; } } + +/* "Reveal this page" sits below a list's status links and search box, which + WordPress floats left and right; without the clear it ran into the gap + between them (#2050). */ +.ffc-pii-reveal-bar { + clear: both; +} diff --git a/assets/css/ffc-admin-components.min.css b/assets/css/ffc-admin-components.min.css index aa56b8425..d08e1703a 100644 --- a/assets/css/ffc-admin-components.min.css +++ b/assets/css/ffc-admin-components.min.css @@ -1,2 +1,2 @@ -.ffc-sections{display:flex;flex-direction:column;gap:var(--ffc-spacing-sm)}.ffc-section{border:1px solid var(--ffc-border);border-radius:var(--ffc-radius-lg);background:var(--ffc-bg-card);color:var(--ffc-text)}.ffc-section__summary{display:flex;align-items:center;gap:var(--ffc-spacing-md);padding:var(--ffc-spacing-md) var(--ffc-spacing-lg);cursor:pointer;list-style:none}.ffc-section__summary::-webkit-details-marker{display:none}.ffc-section__summary::after{flex:0 0 auto;width:8px;height:8px;margin-left:auto;border-right:2px solid currentColor;border-bottom:2px solid currentColor;content:"";transform:rotate(45deg);transition:transform var(--ffc-transition-fast)}.ffc-section[open]>.ffc-section__summary::after{transform:rotate(-135deg)}.ffc-section__summary:focus-visible{border-radius:var(--ffc-radius-lg);outline:2px solid var(--ffc-border-focus);outline-offset:2px}.ffc-section__icon{display:flex;flex:0 0 auto;align-items:center;justify-content:center;width:40px;height:40px;border-radius:var(--ffc-radius-md);background:var(--ffc-accent-bg);color:var(--ffc-accent-text)}.ffc-section__text{display:flex;flex:1 1 auto;flex-direction:column;gap:var(--ffc-spacing-3xs);min-width:0}.ffc-section__title{font-size:var(--ffc-font-size-base);font-weight:600}.ffc-section__hint{font-size:var(--ffc-font-size-sm);color:var(--ffc-text-muted)}.ffc-section__body{padding:var(--ffc-spacing-md) var(--ffc-spacing-lg) var(--ffc-spacing-lg);border-top:1px solid var(--ffc-border-light)}.ffc-section__chip{flex:0 0 auto;padding:var(--ffc-spacing-3xs) var(--ffc-spacing-sm);border-radius:var(--ffc-radius-pill);background:var(--ffc-bg-alt);color:var(--ffc-text-secondary);font-size:var(--ffc-font-size-xs);font-weight:600}.ffc-section__chip.is-on{background:var(--ffc-success-bg);color:var(--ffc-success-text)}.ffc-section__body>.form-table:first-child{margin-top:0}.ffc-facts{display:grid;grid-template-columns:minmax(8em,auto) 1fr;gap:var(--ffc-spacing-xs) var(--ffc-spacing-lg);margin:0}.ffc-facts__label{color:var(--ffc-text-muted)}.ffc-facts__value{margin:0;min-width:0;overflow-wrap:anywhere}.ffc-facts__value.is-on{font-weight:600}.ffc-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(12em,1fr));gap:var(--ffc-spacing-lg);margin:var(--ffc-spacing-lg) 0}.ffc-stat-card{display:grid;grid-template-columns:auto 1fr;column-gap:var(--ffc-spacing-md);align-items:center;padding:var(--ffc-spacing-lg);border:1px solid var(--ffc-border);border-radius:var(--ffc-radius-lg);background:var(--ffc-bg-card);color:var(--ffc-text)}.ffc-stat-card__icon{grid-row:1/span 3;font-size:var(--ffc-font-size-lg)}.ffc-stat-card__value{font-size:var(--ffc-font-size-2xl);font-weight:600;line-height:1.2}.ffc-stat-card__label{font-size:var(--ffc-font-size-sm);color:var(--ffc-text-muted)}.ffc-stat-card__link{margin-top:var(--ffc-spacing-xs);font-size:var(--ffc-font-size-sm);text-decoration:none}.ffc-boxed .card,.ffc-settings-wrap .card{background:var(--ffc-bg-card);border:1px solid var(--ffc-border);border-radius:var(--ffc-radius-sm);padding:var(--ffc-spacing-2xl);margin-bottom:var(--ffc-spacing-2xl);min-width:255px;max-width:1500px;box-shadow:var(--ffc-shadow-sm)}.ffc-boxed .card:last-child,.ffc-settings-wrap .card:last-child{margin-bottom:0}.ffc-boxed .card h2,.ffc-settings-wrap .card h2,.ffc-settings-wrap .card>h3[id]{margin-top:0;margin-bottom:var(--ffc-spacing-xl);padding-bottom:var(--ffc-spacing-md);border-bottom:1px solid var(--ffc-border-light);font-size:var(--ffc-font-size-xl);font-weight:600;color:var(--ffc-text)}.ffc-boxed .card h3,.ffc-settings-wrap .card h3{margin-top:var(--ffc-spacing-2xl);margin-bottom:var(--ffc-spacing-xl);font-size:var(--ffc-font-size-lg);font-weight:600}.ffc-boxed .card>p.description,.ffc-settings-wrap .card>p.description{margin-top:0;margin-bottom:var(--ffc-spacing-xl);color:var(--ffc-text-muted)}.ffc-readonly-lock{min-width:0;margin:0;padding:0;border:0}.ffc-vtabs{display:flex;align-items:flex-start;margin:0 -12px -12px}.ffc-vtabs__nav{flex:0 0 200px;margin:0;padding:0;list-style:none;background:var(--ffc-bg-alt);border-right:1px solid var(--ffc-border-light)}.ffc-vtabs__nav-item{margin:0}.ffc-vtabs__tab{display:flex;align-items:center;gap:var(--ffc-spacing-sm);padding:var(--ffc-spacing-lg) var(--ffc-spacing-lg);color:var(--ffc-text-secondary);text-decoration:none;font-weight:500;line-height:1.3;border-left:3px solid transparent;border-bottom:1px solid var(--ffc-border-light)}.ffc-vtabs__tab:hover{background:var(--ffc-bg-card);color:var(--ffc-link-hover)}.ffc-vtabs__tab:focus{color:var(--ffc-link-hover);box-shadow:none}.ffc-vtabs__tab:focus-visible{outline:2px solid var(--ffc-primary);outline-offset:-2px}.ffc-vtabs__tab .ffc-vtabs__icon{flex:0 0 auto;font-size:var(--ffc-font-size-lg);color:var(--ffc-text-muted)}.ffc-vtabs__icon::before{margin-right:0}.ffc-vtabs__tab.is-active{background:var(--ffc-bg-card);color:var(--ffc-primary);border-left-color:var(--ffc-primary)}.ffc-vtabs__tab.is-active .ffc-vtabs__icon{color:var(--ffc-primary)}.ffc-vtabs__tab.has-error{color:var(--ffc-danger)}.ffc-vtabs__tab.has-error .ffc-vtabs__icon{color:var(--ffc-danger)}.ffc-vtabs__error-dot{width:8px;height:8px;margin-left:auto;border-radius:var(--ffc-radius-full);background:var(--ffc-danger)}.ffc-vtabs__state{flex:0 0 auto;width:8px;height:8px;margin-left:auto;border:1px solid var(--ffc-text-muted);border-radius:var(--ffc-radius-full);box-sizing:border-box}.ffc-vtabs__tab.is-on .ffc-vtabs__state{border-color:var(--ffc-success);background:var(--ffc-success)}.ffc-vtabs__tab.is-pending .ffc-vtabs__state{border-color:var(--ffc-warning);background:var(--ffc-warning)}.ffc-vtabs__tab.has-error .ffc-vtabs__state{display:none}.ffc-vtabs__panels{flex:1 1 auto;min-width:0;padding:var(--ffc-spacing-2xs) var(--ffc-spacing-xl) var(--ffc-spacing-xl)}.ffc-vtabs__panel-title{display:flex;align-items:center;gap:var(--ffc-spacing-sm);margin:var(--ffc-spacing-2xs) 0 var(--ffc-spacing-xl);padding-bottom:var(--ffc-spacing-md);font-size:var(--ffc-font-size-lg);font-weight:600;color:var(--ffc-text);border-bottom:2px solid var(--ffc-primary)}.ffc-vtabs__panel-title .ffc-vtabs__icon{flex:0 0 auto;color:var(--ffc-primary)}.ffc-vtabs__required-warning{margin:0 0 var(--ffc-spacing-xl)}.ffc-vtabs__required-warning code{background:var(--ffc-bg-alt)}.ffc-vtabs.is-ready .ffc-vtabs__panel{display:none}.ffc-vtabs.is-ready .ffc-vtabs__panel.is-active{display:block}.ffc-vtabs:not(.is-ready) .ffc-vtabs__panel+.ffc-vtabs__panel{margin-top:var(--ffc-spacing-xl);border-top:1px solid var(--ffc-border-light)}@media screen and (max-width:782px){.ffc-vtabs{flex-direction:column}.ffc-vtabs__nav{display:flex;flex:1 1 auto;flex-wrap:wrap;border-right:none;border-bottom:1px solid var(--ffc-border-light)}.ffc-vtabs__tab{border-left:none;border-bottom:3px solid transparent}.ffc-vtabs__tab.is-active{border-left:none;border-bottom-color:var(--ffc-primary)}}.ffc-admin-page .ffc-btn-icon[title]{position:relative}.ffc-admin-page .ffc-btn-icon[title]:not(.ffc-btn-loading):focus-visible::after,.ffc-admin-page .ffc-btn-icon[title]:not(.ffc-btn-loading):hover::after{content:attr(title);position:absolute;bottom:100%;left:50%;transform:translateX(-50%);margin-bottom:var(--ffc-spacing-sm);padding:var(--ffc-spacing-xs) var(--ffc-spacing-md);background:var(--ffc-inverse-surface);color:var(--ffc-inverse-on-surface);font-size:var(--ffc-font-size-xs);font-weight:400;white-space:nowrap;border-radius:var(--ffc-radius-sm);box-shadow:var(--ffc-shadow-md);z-index:var(--ffc-z-overlay);pointer-events:none}@media screen and (max-width:782px){.ffc-admin-page .ffc-btn-icon[title]:not(.ffc-btn-loading):focus-visible::after,.ffc-admin-page .ffc-btn-icon[title]:not(.ffc-btn-loading):hover::after{display:none}} +.ffc-sections{display:flex;flex-direction:column;gap:var(--ffc-spacing-sm)}.ffc-section{border:1px solid var(--ffc-border);border-radius:var(--ffc-radius-lg);background:var(--ffc-bg-card);color:var(--ffc-text)}.ffc-section__summary{display:flex;align-items:center;gap:var(--ffc-spacing-md);padding:var(--ffc-spacing-md) var(--ffc-spacing-lg);cursor:pointer;list-style:none}.ffc-section__summary::-webkit-details-marker{display:none}.ffc-section__summary::after{flex:0 0 auto;width:8px;height:8px;margin-left:auto;border-right:2px solid currentColor;border-bottom:2px solid currentColor;content:"";transform:rotate(45deg);transition:transform var(--ffc-transition-fast)}.ffc-section[open]>.ffc-section__summary::after{transform:rotate(-135deg)}.ffc-section__summary:focus-visible{border-radius:var(--ffc-radius-lg);outline:2px solid var(--ffc-border-focus);outline-offset:2px}.ffc-section__icon{display:flex;flex:0 0 auto;align-items:center;justify-content:center;width:40px;height:40px;border-radius:var(--ffc-radius-md);background:var(--ffc-accent-bg);color:var(--ffc-accent-text)}.ffc-section__text{display:flex;flex:1 1 auto;flex-direction:column;gap:var(--ffc-spacing-3xs);min-width:0}.ffc-section__title{font-size:var(--ffc-font-size-base);font-weight:600}.ffc-section__hint{font-size:var(--ffc-font-size-sm);color:var(--ffc-text-muted)}.ffc-section__body{padding:var(--ffc-spacing-md) var(--ffc-spacing-lg) var(--ffc-spacing-lg);border-top:1px solid var(--ffc-border-light)}.ffc-section__chip{flex:0 0 auto;padding:var(--ffc-spacing-3xs) var(--ffc-spacing-sm);border-radius:var(--ffc-radius-pill);background:var(--ffc-bg-alt);color:var(--ffc-text-secondary);font-size:var(--ffc-font-size-xs);font-weight:600}.ffc-section__chip.is-on{background:var(--ffc-success-bg);color:var(--ffc-success-text)}.ffc-section__body>.form-table:first-child{margin-top:0}.ffc-facts{display:grid;grid-template-columns:minmax(8em,auto) 1fr;gap:var(--ffc-spacing-xs) var(--ffc-spacing-lg);margin:0}.ffc-facts__label{color:var(--ffc-text-muted)}.ffc-facts__value{margin:0;min-width:0;overflow-wrap:anywhere}.ffc-facts__value.is-on{font-weight:600}.ffc-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(12em,1fr));gap:var(--ffc-spacing-lg);margin:var(--ffc-spacing-lg) 0}.ffc-stat-card{display:grid;grid-template-columns:auto 1fr;column-gap:var(--ffc-spacing-md);align-items:center;padding:var(--ffc-spacing-lg);border:1px solid var(--ffc-border);border-radius:var(--ffc-radius-lg);background:var(--ffc-bg-card);color:var(--ffc-text)}.ffc-stat-card__icon{grid-row:1/span 3;font-size:var(--ffc-font-size-lg)}.ffc-stat-card__value{font-size:var(--ffc-font-size-2xl);font-weight:600;line-height:1.2}.ffc-stat-card__label{font-size:var(--ffc-font-size-sm);color:var(--ffc-text-muted)}.ffc-stat-card__link{margin-top:var(--ffc-spacing-xs);font-size:var(--ffc-font-size-sm);text-decoration:none}.ffc-boxed .card,.ffc-settings-wrap .card{background:var(--ffc-bg-card);border:1px solid var(--ffc-border);border-radius:var(--ffc-radius-sm);padding:var(--ffc-spacing-2xl);margin-bottom:var(--ffc-spacing-2xl);min-width:255px;max-width:1500px;box-shadow:var(--ffc-shadow-sm)}.ffc-boxed .card:last-child,.ffc-settings-wrap .card:last-child{margin-bottom:0}.ffc-boxed .card h2,.ffc-settings-wrap .card h2,.ffc-settings-wrap .card>h3[id]{margin-top:0;margin-bottom:var(--ffc-spacing-xl);padding-bottom:var(--ffc-spacing-md);border-bottom:1px solid var(--ffc-border-light);font-size:var(--ffc-font-size-xl);font-weight:600;color:var(--ffc-text)}.ffc-boxed .card h3,.ffc-settings-wrap .card h3{margin-top:var(--ffc-spacing-2xl);margin-bottom:var(--ffc-spacing-xl);font-size:var(--ffc-font-size-lg);font-weight:600}.ffc-boxed .card>p.description,.ffc-settings-wrap .card>p.description{margin-top:0;margin-bottom:var(--ffc-spacing-xl);color:var(--ffc-text-muted)}.ffc-readonly-lock{min-width:0;margin:0;padding:0;border:0}.ffc-vtabs{display:flex;align-items:flex-start;margin:0 -12px -12px}.ffc-vtabs__nav{flex:0 0 200px;margin:0;padding:0;list-style:none;background:var(--ffc-bg-alt);border-right:1px solid var(--ffc-border-light)}.ffc-vtabs__nav-item{margin:0}.ffc-vtabs__tab{display:flex;align-items:center;gap:var(--ffc-spacing-sm);padding:var(--ffc-spacing-lg) var(--ffc-spacing-lg);color:var(--ffc-text-secondary);text-decoration:none;font-weight:500;line-height:1.3;border-left:3px solid transparent;border-bottom:1px solid var(--ffc-border-light)}.ffc-vtabs__tab:hover{background:var(--ffc-bg-card);color:var(--ffc-link-hover)}.ffc-vtabs__tab:focus{color:var(--ffc-link-hover);box-shadow:none}.ffc-vtabs__tab:focus-visible{outline:2px solid var(--ffc-primary);outline-offset:-2px}.ffc-vtabs__tab .ffc-vtabs__icon{flex:0 0 auto;font-size:var(--ffc-font-size-lg);color:var(--ffc-text-muted)}.ffc-vtabs__icon::before{margin-right:0}.ffc-vtabs__tab.is-active{background:var(--ffc-bg-card);color:var(--ffc-primary);border-left-color:var(--ffc-primary)}.ffc-vtabs__tab.is-active .ffc-vtabs__icon{color:var(--ffc-primary)}.ffc-vtabs__tab.has-error{color:var(--ffc-danger)}.ffc-vtabs__tab.has-error .ffc-vtabs__icon{color:var(--ffc-danger)}.ffc-vtabs__error-dot{width:8px;height:8px;margin-left:auto;border-radius:var(--ffc-radius-full);background:var(--ffc-danger)}.ffc-vtabs__state{flex:0 0 auto;width:8px;height:8px;margin-left:auto;border:1px solid var(--ffc-text-muted);border-radius:var(--ffc-radius-full);box-sizing:border-box}.ffc-vtabs__tab.is-on .ffc-vtabs__state{border-color:var(--ffc-success);background:var(--ffc-success)}.ffc-vtabs__tab.is-pending .ffc-vtabs__state{border-color:var(--ffc-warning);background:var(--ffc-warning)}.ffc-vtabs__tab.has-error .ffc-vtabs__state{display:none}.ffc-vtabs__panels{flex:1 1 auto;min-width:0;padding:var(--ffc-spacing-2xs) var(--ffc-spacing-xl) var(--ffc-spacing-xl)}.ffc-vtabs__panel-title{display:flex;align-items:center;gap:var(--ffc-spacing-sm);margin:var(--ffc-spacing-2xs) 0 var(--ffc-spacing-xl);padding-bottom:var(--ffc-spacing-md);font-size:var(--ffc-font-size-lg);font-weight:600;color:var(--ffc-text);border-bottom:2px solid var(--ffc-primary)}.ffc-vtabs__panel-title .ffc-vtabs__icon{flex:0 0 auto;color:var(--ffc-primary)}.ffc-vtabs__required-warning{margin:0 0 var(--ffc-spacing-xl)}.ffc-vtabs__required-warning code{background:var(--ffc-bg-alt)}.ffc-vtabs.is-ready .ffc-vtabs__panel{display:none}.ffc-vtabs.is-ready .ffc-vtabs__panel.is-active{display:block}.ffc-vtabs:not(.is-ready) .ffc-vtabs__panel+.ffc-vtabs__panel{margin-top:var(--ffc-spacing-xl);border-top:1px solid var(--ffc-border-light)}@media screen and (max-width:782px){.ffc-vtabs{flex-direction:column}.ffc-vtabs__nav{display:flex;flex:1 1 auto;flex-wrap:wrap;border-right:none;border-bottom:1px solid var(--ffc-border-light)}.ffc-vtabs__tab{border-left:none;border-bottom:3px solid transparent}.ffc-vtabs__tab.is-active{border-left:none;border-bottom-color:var(--ffc-primary)}}.ffc-admin-page .ffc-btn-icon[title]{position:relative}.ffc-admin-page .ffc-btn-icon[title]:not(.ffc-btn-loading):focus-visible::after,.ffc-admin-page .ffc-btn-icon[title]:not(.ffc-btn-loading):hover::after{content:attr(title);position:absolute;bottom:100%;left:50%;transform:translateX(-50%);margin-bottom:var(--ffc-spacing-sm);padding:var(--ffc-spacing-xs) var(--ffc-spacing-md);background:var(--ffc-inverse-surface);color:var(--ffc-inverse-on-surface);font-size:var(--ffc-font-size-xs);font-weight:400;white-space:nowrap;border-radius:var(--ffc-radius-sm);box-shadow:var(--ffc-shadow-md);z-index:var(--ffc-z-overlay);pointer-events:none}@media screen and (max-width:782px){.ffc-admin-page .ffc-btn-icon[title]:not(.ffc-btn-loading):focus-visible::after,.ffc-admin-page .ffc-btn-icon[title]:not(.ffc-btn-loading):hover::after{display:none}}.ffc-pii-reveal-bar{clear:both} /*# sourceMappingURL=ffc-admin-components.min.css.map */ \ No newline at end of file diff --git a/includes/core/class-ffc-pii-reveal.php b/includes/core/class-ffc-pii-reveal.php index 4ab886648..757b07ab8 100644 --- a/includes/core/class-ffc-pii-reveal.php +++ b/includes/core/class-ffc-pii-reveal.php @@ -41,7 +41,7 @@ public static function page_button( string $pii_cap ): string { return ''; } - return '

' . Button::html( + return '

' . Button::html( array( 'label' => __( 'Reveal this page', 'ffcertificate' ), 'icon' => 'eye', diff --git a/tests/Unit/PiiRevealTest.php b/tests/Unit/PiiRevealTest.php index 3b84526e2..fd0005f73 100644 --- a/tests/Unit/PiiRevealTest.php +++ b/tests/Unit/PiiRevealTest.php @@ -38,6 +38,8 @@ public function test_the_page_button_is_drawn_for_the_reveal_tier_with_the_revea $this->assertStringContainsString( '', $html ); $this->assertStringContainsString( 'recorded in the activity log', $html ); + // Below the floated status links and search box, never between them (#2050). + $this->assertStringStartsWith( '

', $html ); } public function test_the_field_button_carries_the_hook_and_its_data(): void {