Skip to content

Fix mobile layout issues in admin bar and themes#656

Merged
akirk merged 5 commits into
mainfrom
fix/mobile-masterbar-friends-icon
Apr 16, 2026
Merged

Fix mobile layout issues in admin bar and themes#656
akirk merged 5 commits into
mainfrom
fix/mobile-masterbar-friends-icon

Conversation

@akirk

@akirk akirk commented Apr 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • Admin bar: the Friends icon was hidden on mobile because the mobile-only CSS targeted #wp-admin-bar-friends, but the node is registered with id friends-menu, so the selector never matched and WP's default mobile rules (hiding .ab-icon/.ab-label) won. The same style was also only emitted on wp_head, so wp-admin screens didn't get it at all. Fixed both.
  • Google Reader theme: on narrow screens the search field kept its full width and squeezed the chips section so tight that each chip wrapped to its own line. Added a @media (max-width: 640px) block that stacks the two navbar sections vertically and zeroes the search section's left margin.
  • Twitter theme: the collapsible mobile panel unfolded a "What's on your mind" compose form, but the center column already renders an always-visible "What's happening?" inline compose box. Removed the duplicated compose form from the mobile panel, leaving just the search form there (which still serves a purpose because the right column — which owns search on desktop — is hidden at ≤1000px).

Test plan

  • On a mobile-width viewport (≤782px), confirm the Friends icon appears in the admin bar on both the frontend and in wp-admin.
  • In the Google Reader theme, resize to ≤640px and confirm chips sit on one or more horizontal rows above a full-width search field instead of stacking into a single column.
  • In the Twitter theme, resize to ≤1000px and confirm the collapsible user panel only exposes the search field, while the inline "What's happening?" compose box remains in the center column.
Changelog
  • Automatically create a changelog entry from the details below

Type

  • Fixed

Message

Mobile fixes: show the Friends icon in the admin bar on mobile; stack chips and search on separate rows in the Google Reader theme on narrow screens; remove duplicate compose box from the Twitter theme mobile panel.

- Admin bar: correct selector (#wp-admin-bar-friends-menu) and emit
  the mobile style in wp-admin too, so the Friends icon shows on
  mobile on both the frontend and admin screens.
- Google Reader: stack header sections vertically below 640px so the
  chips no longer wrap into a column when the search field fills the
  row.
- Twitter: drop the duplicated compose form from the mobile panel;
  the always-visible inline compose box already handles posting.
@github-actions

github-actions Bot commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

Test this PR in WordPress Playground

You can test this pull request directly in WordPress Playground:

Launch WordPress Playground

This will install and activate the plugin with the changes from this PR.

akirk added 4 commits April 16, 2026 20:05
Extracts the stylized "F" path from assets/friends-logo.svg, drops the
gradient and decorations, and inlines it with fill=currentColor so it
inherits the admin bar's text color (including color schemes and dark
mode). Sized for both the desktop bar and the wider mobile bar.
- Render the Friends logo via a CSS mask on .ab-icon:before so
  background-color: currentColor picks up the admin color scheme's
  dashicon color (including hover tints); the inline SVG variant
  couldn't inherit those because the colors are set on :before.
- Tighten the mask viewBox to the shape's bounds so it centers
  horizontally, and drop the desktop margin-top to 2px so it sits
  centered vertically in the 32px bar.
- Reserve 46px (the mobile admin bar height) below 782px in the
  Twitter and Google Reader themes so content isn't hidden behind
  the masterbar.
@akirk akirk merged commit f103e20 into main Apr 16, 2026
26 checks passed
@akirk akirk deleted the fix/mobile-masterbar-friends-icon branch April 16, 2026 18:22
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