Skip to content

feat: settings → smtp, declutter admin navigation (#20) - #21

Merged
ifahimreza merged 4 commits into
mainfrom
feat/20-settings-smtp-declutter
Oct 9, 2026
Merged

ifahimreza merged 4 commits into
mainfrom
feat/20-settings-smtp-declutter

Conversation

@ifahimreza

@ifahimreza ifahimreza commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Closes #20

What

Mailyard no longer takes a top-level wp-admin menu. It now lives at Settings → SMTP (options-general.php?page=mailyard), and the admin screen has a single navigation: a slim top bar (brand · Overview · Connections · Email log · Deliverability · Settings · Help) in place of the app sidebar. Inside Settings, the grouped left rail is replaced by one header with a tab row. Previously the screen stacked wp-admin's sidebar, the Mailyard menu with 5 submenu entries, the app sidebar repeating them, and the Settings rail.

Why

Mailyard is a simple SMTP plugin now (#17). A top-level menu plus three stacked navigations was more chrome than the plugin needs (#20).

How

  • Menu: add_options_page(); screen id/hook settings_page_mailyard (Settings::SCREEN). The top-level menu, its submenu entries, the base64 menu icon and the inline submenu click interceptor are gone.
  • One URL helper: Settings::url( $route ) is used by the plugin action link, alert and weekly-summary emails, the failure notice and the OAuth return.
  • Old URLs keep working: admin.php?page=mailyard… 302s to options-general.php with every query arg kept (an OAuth return carries its outcome there). Browsers carry the #/… fragment, so deep links in alert emails already sent still land on the right view.
  • Shell: AppShell variant="topbar". Sidebar.jsx becomes Nav.jsx (flat items, no icons, no collapse). The App-side submenu highlight sync is removed.
  • Settings: PageHeader with a Tabs row (scrolls sideways on narrow screens, labels don't wrap). Each section opens with a one-line SectionIntro instead of repeating its name as a page title. "Data & danger" is shortened to "Data".
  • Admin notices: the send-failure notice shows on the WordPress Dashboard and Plugins screens only (was every admin screen). It has one dismiss path, the per-user Dismiss link; the is-dismissible × only hid it until the next page load and is gone. The stray empty %s in its markup is fixed. The conflict notice follows the new screen id.
  • Non-obvious CSS fix: the base #mailyard-admin * { border-color } rule had id specificity. It repainted the top bar's transparent and active underlines grey, and it also silently overrode every authored border-* / divide-* colour utility in the app. It is now :where(#mailyard-admin) * (zero specificity). Side effect: those utilities render as written, e.g. the selected SMTP preset chip now gets its intended blue border.
  • Dashboard is labelled Overview, to avoid confusion with WordPress's own Dashboard. Docs and readme paths are updated. The changelog entry is under the unreleased 1.1.0; no version bump.

Testing

  • WP Playground (latest WP, PHP 8.3), plugin built and mounted
  • admin.php?page=mailyard#/logs → options-general.php?page=mailyard#/logs; Settings → SMTP is highlighted in wp-admin
  • OAuth-style return through the old URL keeps mailyard_oauth + message server-side (checked with fetch); Connections shows the toast and tidies the URL
  • Plugins screen: the "Settings" action link points at options-general.php?page=mailyard
  • Failure notice (seeded): shown on the Dashboard and Plugins screens, not on Posts; links to …#/logs?status=failed; Dismiss hides it
  • Every top-level view and every Settings tab renders; active top-bar and tab underlines are correct; 600px and 380px widths have no page overflow
  • php -l clean on every PHP file; wp-scripts build passes (same 2 pre-existing size warnings); no changed JS file has more lint errors than on main
  • Tested with the plugin's known conflict list (conflict notice not exercised, since no other SMTP plugin was installed in the Playground)
  • Free vs Pro gating: n/a (no Pro since Simple SMTP: drop Pro, reach Meow Mailer feature parity #17)

Found on the way, filed separately: #22 (WordPress core strips the OAuth message arg before the app reads it; this already happened on the old URL).

Screenshots

Not attached (the gh CLI can't upload images). Visual QA was done in the Playground: top bar with the active underline, Settings header with the tab row.

⚠️ Needs your OK before merge

  • Ships to WordPress.org: this PR touches readme.txt, so merging to main triggers assets.yml, which syncs readme.txt to wp.org SVN (trunk + stable tag) right away. The readme on main already carries the unreleased 1.1.0 changelog and Stable tag: 1.0.2. Merge with [skip actions] in the squash title (as feat: simple SMTP — drop Pro, Meow Mailer parity (#17) #18 did) if the readme shouldn't go live before the release.
  • Size: ~517 changed lines (over the ~400 threshold).

🤖 Generated with Claude Code

Registers the page with add_options_page() (screen settings_page_mailyard)
and drops the top-level menu, its five submenu entries, the menu icon and
the submenu click interceptor. Old admin.php?page=mailyard URLs redirect
with their query args; every internal link goes through Settings::url().

The send-failure notice now shows on the Dashboard and Plugins screens only,
with one dismiss path.

Refs #20

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ifahimreza ifahimreza linked an issue Oct 9, 2026 that may be closed by this pull request
9 tasks
The app shell switches to the design system's topbar variant (brand ·
Overview · Connections · Email log · Deliverability · Settings · Help), so
wp-admin's own sidebar is the only vertical nav. The submenu-highlight
sync and the sidebar divider CSS go with the old menu.

Settings drops its grouped left rail for one header with a tab row; each
section opens with a one-line intro (SectionIntro) instead of repeating
its name as a page title. Tabs scroll sideways on narrow screens.

The base border-color rule now has zero specificity (:where), so library
components keep their own border colors (the top bar's underlines) and
authored border-* utilities render as written.

Docs and readme paths follow the move; Dashboard is now Overview.

Refs #20

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ifahimreza
ifahimreza marked this pull request as ready for review October 9, 2026 10:14
@ifahimreza
ifahimreza merged commit d41d422 into main Oct 9, 2026
1 check passed
@ifahimreza
ifahimreza deleted the feat/20-settings-smtp-declutter branch October 9, 2026 13:24
@ifahimreza ifahimreza mentioned this pull request Oct 9, 2026
1 task done
ifahimreza added a commit that referenced this pull request Oct 9, 2026
Refs #20

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

Move admin UI to Settings → SMTP and declutter navigation

1 participant