Skip to content

Closes #1316: Make the activation banner header span the full available width - #1344

Merged
remyperona merged 2 commits into
developfrom
enhancement/1316-make-the-activation-banner
Nov 24, 2026
Merged

remyperona merged 2 commits into
developfrom
enhancement/1316-make-the-activation-banner

Conversation

@remyperona

@remyperona remyperona commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

🤖 AI-generated — created by an automated pipeline. Review before acting on this.

Closes #1316

Description

The "Welcome to Imagify" activation banner's dark header now spans the full width of the admin content area, aligned with the white section below it. Previously the header stopped short on the right, next to the WordPress "Screen Options / Help" tabs.

Type of change

  • New feature (non-breaking change which adds functionality).
  • Bug fix (non-breaking change which fixes an issue).
  • Enhancement (non-breaking change which improves an existing functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as before).
  • Sub-task of #(issue number)
  • Chore
  • Release

Detailed scenario

What was done

  • assets/css/notices.css: added clear: both; to the .imagify-welcome rule.
  • assets/css/notices.min.css: regenerated with npm run build.
  • No PHP or markup change.
  • Tests/e2e/specs/welcome-banner-full-width.spec.ts: new Playwright regression spec. It checks that the header and the white section share left/right edges and width at 1440, 900 and 600px, with Screen Options closed and open. It backs up the API key server-side, blanks it so the notice renders, and restores it afterwards.

What was tested

Browser QA with Playwright against the local wp-env serving this branch (served notices.min.css confirmed to contain .imagify-welcome{clear:both;…}), no API key saved, welcome notice not dismissed. Bounding boxes of .imagify-welcome .imagify-title (dark header) vs .imagify-welcome .imagify-settings-section (white section):

Viewport Screen Options Header / section width Left–right edges
1400px (desktop) closed and open 1200 / 1200 180–1380, equal
900px (tablet, 783–960) closed and open 824 / 824 56–880, equal
600px (mobile, ≤782) closed and open 570 / 570 10–580, equal
  • Pages: plugins.php and index.php at all three viewports.

  • Bug reproduced before the fix (rule disabled with clear:none !important): header shrank to 966 / 590 / 338px while the section stayed at 1200 / 824 / 570px.

  • Top gap: notice top offset moved from 62px to 64px (about 2px), so no padding-top adjustment was needed.

  • Regression: Imagify settings page (no welcome notice, its own .imagify-title unchanged), Imagify bulk page (notice full width, header = section), options-general.php (full width, aligned).

  • Lead review: PASS, no blockers. Minified CSS differs from develop only by the added declaration.

  • Regression spec welcome-banner-full-width.spec.ts: 6/6 pass with the fix; 6/6 fail with clear: both removed (header about 234px narrower than the section). A seeded dummy API key was restored after the run.

Full QA report: #1344 (comment)

welcome-banner-desktop-1440 welcome-banner-mobile-600 welcome-banner-tablet-900

How to test

  1. Make sure no Imagify API key is saved and the welcome notice has not been dismissed.
  2. Open http://localhost:8888/wp-admin/plugins.php at a desktop width (above 960px).
  3. Check that the dark "Welcome to Imagify" header ends at the same right edge as the white section below it, with no gap beside "Screen Options / Help". The dismiss icon sits at the far right of the header.
  4. Open the "Screen Options" and "Help" panels and check the banner stays full width below them.
  5. Resize to a tablet width (783px to 960px) and a mobile width (782px or less, admin bar 46px, folded menu). Check that the header and the white section share the same left and right edges.
  6. Check that other Imagify admin pages (settings, bulk optimization) and other WordPress admin screens look unchanged.

Affected Features & Quality Assurance Scope

  • Welcome / activation banner (views/notice-welcome-steps.php, .imagify-welcome), shown on admin pages where the notice is displayed.
  • Styles loaded through the imagify-notices stylesheet.
  • Regression scope: other Imagify admin pages and WordPress admin screens that use the #screen-meta-links tabs.

Technical description

Documentation

The .imagify-title header (assets/css/admin.css) uses display: flex, which establishes a block formatting context. WordPress core floats #screen-meta-links to the right. A block formatting context must not overlap floats, so when the two overlap vertically the header shrinks to sit beside the float. The white .imagify-settings-section below is a plain block whose box ignores the float (only its line boxes shrink), so it stays full width. This creates the visible mismatch.

The fix adds clear: both to the .imagify-welcome wrapper. The wrapper clears the core float, so the header is placed below it and receives the full container width. The rule is scoped to .imagify-welcome, a class used only by this notice, so the settings and bulk .imagify-title headers and other WordPress screens are not affected. The existing margin and the mobile margin-right rule are unchanged.

New dependencies

None.

Risks

  • Visual only. No security, performance, or API impact.
  • Clearance can absorb the top margin of the wrapper. Measured in the browser: the banner moves down by about 2px, so the existing margin is kept as is.
  • Pages without #screen-meta-links are unaffected (clear has no effect without a float).

Mandatory Checklist

Code validation

  • I validated all the Acceptance Criteria. If possible, provide screenshots or videos.
  • I triggered all changed lines of code at least once without new errors/warnings/notices.
  • I implemented built-in tests to cover the new/changed code.

Code style

  • I wrote a self-explanatory code about what it does.
  • I protected entry points against unexpected inputs.
  • I did not introduce unnecessary complexity.
  • Output messages (errors, notices, logs) are explicit enough for users to understand the issue and are actionnable.

Unticked items justification

  • Entry points and output messages: not applicable, no PHP, input handling or user-facing message is changed.
  • Comments, observability, error handling: not applicable to a one-declaration CSS change.

Additional Checks

  • In the case of complex code, I wrote comments to explain it.
  • When possible, I prepared ways to observe the implemented system (logs, data, etc.)
  • I added error handling logic when using functions that could throw errors (HTTP/API request, filesystem, etc.)

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@remyperona remyperona self-assigned this Nov 12, 2026
@codacy-production

codacy-production Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Coverage ∅ diff coverage

Metric Results
Coverage variation Report missing for eaaee9e1
Diff coverage ✅ ∅ diff coverage (50.00%)

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (eaaee9e) Report Missing Report Missing Report Missing
Head commit (6bcd869) 20592 2874 13.96%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#1344) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

1 Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@remyperona

Copy link
Copy Markdown
Contributor Author

Note

Generated by the AI delivery pipeline (lead-reviewer · Claude Opus 5.5).

Review: ✅ PASS

Nice-to-haves:

  • assets/css/notices.css — With clear: both, the 30px top margin is absorbed by clearance when the float is taller, so the gap below the screen-meta buttons may be a few px different. Visually confirm in a browser; not a blocker.

@remyperona

Copy link
Copy Markdown
Contributor Author

Note

Generated by the AI delivery pipeline (qa-engineer · Claude Opus 5.5).

QA: ✅ PASS

Acceptance Criterion Method Result
Dark header spans the full available width Browser (Chrome, local wp-env serving this branch; clear:both confirmed in served notices.min.css) ✅ .imagify-title 1200px wide = section 1200px (plugins.php, index.php; Screen Options closed and open). Without the rule (same page, DevTools toggle) the header was 966px / 590px / 338px at 1400 / 900 / 600px viewports.
Responsive at desktop / tablet / mobile Browser ✅ At 1400 / 900 / 600px, title and section have identical left/right edges (180-1380, 56-880, 10-580).
Header aligned with the content section below Browser ✅ Left and right edges equal in every case.
No regression on other Imagify / WP admin screens Browser ✅ Imagify settings page (no welcome notice, its own .imagify-title unchanged), bulk page (notice full width) and options-general.php render normally. The top offset of the notice grew by about 2px (62 to 64px), which is negligible.

Screenshots were captured locally but not published to public hosting.

@remyperona
remyperona requested a review from a team November 12, 2026 18:56
@remyperona
remyperona marked this pull request as ready for review November 12, 2026 18:57
Assert the welcome-steps notice header shares its left/right edges and
width with the section below at 1440, 900 and 600px, with Screen Options
closed and open. The API key is backed up server-side, blanked so the
notice renders, and restored afterwards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@jeawhanlee jeawhanlee 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.

@remyperona Can you please attach a screenshot of the fix and move it directly to "Ready for QA" after this.

@Mai-Saad

Copy link
Copy Markdown
Contributor

@remyperona Thanks for the PR. If we are good here then we can merge https://group-onecom.slack.com/archives/C08F4LZB2QG/p1795455945671229

@remyperona
remyperona added this pull request to the merge queue Nov 24, 2026
Merged via the queue into develop with commit 105b579 Nov 24, 2026
17 checks passed
@remyperona
remyperona deleted the enhancement/1316-make-the-activation-banner branch November 24, 2026 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make the activation banner header span the full available width

3 participants