Skip to content

feat: make My Account button only show icon on mobile#406

Merged
laurelfulford merged 5 commits intotrunkfrom
feat/switch-my-account-to-icon
Feb 11, 2026
Merged

feat: make My Account button only show icon on mobile#406
laurelfulford merged 5 commits intotrunkfrom
feat/switch-my-account-to-icon

Conversation

@laurelfulford
Copy link
Contributor

@laurelfulford laurelfulford commented Feb 2, 2026

All Submissions:

Changes proposed in this Pull Request:

This either needs to be tested with Automattic/newspack-plugin#4443, or after it's merged.

See NPPD-1183.

How to test the changes in this Pull Request:

  1. Apply this PR and feat[my-account-block]: add option to toggle off icon/text, and update tests newspack-plugin#4443 if needed.
  2. Navigate to the Site Editor and edit the Header (Mobile) pattern; reset it first if it has any changes saved.
  3. Confirm that the default pattern (pattern 1) uses an icon for the My Account Button block:
CleanShot 2026-02-02 at 11 00 17@2x
  1. In the Template Part tab, switch the template part to use Header Mobile (Style 3). Confirm it also uses just the icon for the My Account Block button.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@thomasguillot thomasguillot force-pushed the feat/switch-my-account-to-icon branch from b6f279e to e84e192 Compare February 4, 2026 12:18
@thomasguillot
Copy link
Contributor

@laurelfulford I updated the patterns based on the new classname approach.

I've also included a (future) fix (9322328). Related: #409

Copy link
Member

@rbcorrales rbcorrales left a comment

Choose a reason for hiding this comment

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

Tested all three mobile header styles with RAS enabled and compared against trunk. Left inline comments with questions on a few things I noticed. Not all of them might necessarily be issues.

@thomasguillot
Copy link
Contributor

@rbcorrales I’ve updated all the mobile patterns. The if/else checks were intentional, but on reflection they don’t really make sense. I’d rather offer a few more patterns with small variations than rely on conditional logic like that.

I also removed the “Donate” label from the button. I think that could have been confusing for publishers, since it looked like the button would work out of the box, which isn’t the case as they still need to add a link. With no default label, they can now customise it to whatever they want (Donate, Subscribe, etc...) and add a link as needed.

Oh, and I made sure the My Account button block can’t be removed.

@thomasguillot
Copy link
Contributor

Note: we’ll need to update the desktop patterns as well, but that can be done in a separate PR.

Copy link
Member

@rbcorrales rbcorrales left a comment

Choose a reason for hiding this comment

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

Thanks for addressing all the feedback @thomasguillot! Looks good. The new approach of offering more pattern variations instead of conditional logic is cleaner.

@laurelfulford
Copy link
Contributor Author

Sweet! Thanks for taking care of all those fixes, @thomasguillot, and for the review, @rbcorrales!

I'm going to go ahead and merge this one!

@laurelfulford laurelfulford merged commit c04788b into trunk Feb 11, 2026
6 checks passed
@laurelfulford laurelfulford deleted the feat/switch-my-account-to-icon branch February 11, 2026 23:29
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.

3 participants