Skip to content

Fix SlimEmail page structure and styling to match other admin pages#177

Merged
parhumm merged 4 commits intodevelopmentfrom
fix/slimemail-page-structure
Mar 12, 2026
Merged

Fix SlimEmail page structure and styling to match other admin pages#177
parhumm merged 4 commits intodevelopmentfrom
fix/slimemail-page-structure

Conversation

@parhumm
Copy link
Copy Markdown
Contributor

@parhumm parhumm commented Mar 12, 2026

Summary

  • Structure: Move header + notification sidebar inside .wrap-slimstat on the email report page, matching the pattern used by all other SlimStat admin pages (index.php, layout.php, upgrade-pro.php, config)
  • Background: Add slimstat_page_slimemail to body background selectors so the page gets the same #f5f6fa background
  • Styling: Add scoped .slimstat-email-report SCSS rules to fix double margin/padding between the white content container and inner form-table, match submit button styling to settings page, and tighten heading spacing

Test plan

  • Open WP admin → SlimStat → Email Reports (free path: verify modal + blur layout is correct)
  • Open WP admin → SlimStat → Email Reports (pro path: verify form styling matches Settings page)
  • Inspect DOM: .slimstat-header and .slimstat-notification-sidebar should be inside .wrap-slimstat
  • Compare page background color with Settings page — both should be #f5f6fa
  • Verify no double spacing between heading and form content

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Style

    • Updated the Email Report page visuals to match the Settings page: refreshed container appearance, spacing, and primary button styling.
  • Bug Fixes

    • Adjusted header rendering so the page header displays after the modal/content container, improving visual flow for both free and premium views.

parhumm added 3 commits March 12, 2026 08:52
The header template (slimstat-header + notification-sidebar) was rendered
outside .backdrop-container and .wrap-slimstat, unlike all other admin
pages. Move it inside to match the consistent structure used by index.php,
layout.php, and upgrade-pro.php.
Add slimstat_page_slimemail to body background selectors so the page
gets the same #f5f6fa background as other SlimStat admin pages. Add
white background with rounded corners to .slimstat-email-report-content
to match settings page form styling.
Replace flat .slimstat-email-report-content styling with scoped
.slimstat-email-report rules that fix double margin-top (container +
form-table), remove redundant border-radius on inner form-table, adjust
container padding to avoid double-padding with form cells, tighten h2
margin, and add brand-styled submit button matching settings page.
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 12, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 639cfc5e-d521-47c6-9b69-68fd27c4f896

📥 Commits

Reviewing files that changed from the base of the PR and between 3c24876 and 6b9ab0b.

📒 Files selected for processing (2)
  • admin/assets/css/admin.css
  • admin/assets/scss/admin.scss

📝 Walkthrough

Walkthrough

Added admin CSS for an Email Report page and moved header rendering in the email-report template so the header loads after modal/content containers for both free and premium flows.

Changes

Cohort / File(s) Summary
Admin styles for Email Report
admin/assets/scss/admin.scss
Added body.slimstat_page_slimemail selector occurrences and a new .slimstat-email-report block (h2 margins, .slimstat-email-report-content container, .form-table, and .submit .button-primary) to mirror Settings page visuals.
Email report view markup
admin/view/email-report.php
Repositioned header rendering: moved header load to after modal/content containers in both free and premium code paths; no public API changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

I hopped through styles, a tiny tweak,
Moved headers where the modals speak,
Buttons gleam and margins sing,
🐇 A polished admin, bells will ring,
Email reports in tidy spring.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: fixing the SlimEmail page structure and styling to match other admin pages, which aligns with the three primary objectives (structure reorganization, background styling, and SCSS rules).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/slimemail-page-structure

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@admin/assets/scss/admin.scss`:
- Around line 3285-3288: The visible rounding persists because
.slimstat-options-section-header still has top border-radius; update the
stylesheet to explicitly remove that radius (e.g., set border-top-left-radius
and border-top-right-radius to 0 or set border-radius: 0) for the
.slimstat-options-section-header selector (or a more specific selector if
needed) so it overrides the rules at Lines ~3147–3150; ensure specificity (or
use !important only if necessary) so the header no longer renders the inner top
curve while keeping .form-table modifications.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3fe8af10-af26-47ae-96b0-40b1d953fad9

📥 Commits

Reviewing files that changed from the base of the PR and between ffa53eb and 3c24876.

📒 Files selected for processing (3)
  • admin/assets/css/admin.css
  • admin/assets/scss/admin.scss
  • admin/view/email-report.php

…rt page

The .slimstat-options-section-header inside .slimstat-email-report-content
still inherited border-radius: 10px 10px 0 0 from the general .form-table
tr:first-of-type rule. Add an explicit reset to border-radius: 0 within
the email report content scope.
@parhumm parhumm merged commit 3089ba0 into development Mar 12, 2026
1 check was pending
@parhumm parhumm deleted the fix/slimemail-page-structure branch March 12, 2026 08:43
parhumm added a commit that referenced this pull request Mar 14, 2026
…218 fix

- Added PR #218: Fix 500 errors on REST/admin-ajax tracking endpoints
- Added PR links for consent fixes (#172, #178), CSS (#175), email layout (#177),
  GeoIP timestamp (#185), admin performance (#189), visitor counting (#178)
@parhumm parhumm mentioned this pull request Mar 14, 2026
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.

1 participant