feat: Add My Account button block #400
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds styling and configuration for a new "My Account" button block that integrates with Newspack's Reader Activation feature. The block is conditionally displayed in the header when Reader Activation is enabled.
Changes:
- Added block styling configuration in theme.json for the newspack/my-account-button block
- Created SCSS styles for the button with small size and outline variants
- Updated header-desktop-style-1 pattern to include the my-account button alongside the Donate button
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| theme.json | Adds block-level styling configuration for the my-account-button including colors, spacing, typography, and border radius |
| src/scss/blocks/newspack/_my-account-button.scss | Defines SCSS styles for small size variant and outline style of the my-account button |
| src/scss/blocks/_blocks.scss | Imports the new my-account-button SCSS file |
| patterns/header/header-desktop-style-1.php | Updates header pattern to wrap Donate button and add conditional my-account button when Reader Activation is enabled |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Pushed some changes, related to Automattic/newspack-plugin#4409 (comment) |
|
|
||
| ?> | ||
| <!-- wp:group {"lock":{"move":true,"remove":true},"metadata":{"name":"<?php esc_html_e( 'Header (Desktop)', 'newspack-block-theme' ); ?>"},"style":{"spacing":{"padding":{"top":"var:preset|spacing|30","bottom":"0","right":"var:preset|spacing|30","left":"var:preset|spacing|30"},"blockGap":"var:preset|spacing|30","margin":{"bottom":"var:preset|spacing|80"}}},"backgroundColor":"base","layout":{"type":"constrained"}} --> | ||
| <!-- wp:group {"lock":{"move":true,"remove":true},"metadata":{"name":"Header (Desktop)"},"style":{"spacing":{"padding":{"top":"var:preset|spacing|30","bottom":"0","right":"var:preset|spacing|30","left":"var:preset|spacing|30"},"blockGap":"var:preset|spacing|30","margin":{"bottom":"var:preset|spacing|80"}}},"backgroundColor":"base","layout":{"type":"constrained"}} --> |
There was a problem hiding this comment.
Was this change in pattern strings intentional? That prevents translations.
There was a problem hiding this comment.
Eep, definitely not intentional! Reinstated in f5cc8d2.
# [1.24.0-alpha.1](v1.23.0...v1.24.0-alpha.1) (2026-02-05) ### Bug Fixes * dequeue some Woo styles from the theme ([#401](#401)) ([821f81c](821f81c)) * update single post template widths ([#407](#407)) ([a99b2cf](a99b2cf)) ### Features * Add My Account button block ([#400](#400)) ([7c99f35](7c99f35)) * add My Account button block to all header patterns ([#404](#404)) ([d7b8b4a](d7b8b4a))
|
🎉 This PR is included in version 1.24.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
# [1.24.0](v1.23.0...v1.24.0) (2026-02-16) ### Bug Fixes * dequeue some Woo styles from the theme ([#401](#401)) ([821f81c](821f81c)) * update single post template widths ([#407](#407)) ([a99b2cf](a99b2cf)) ### Features * Add My Account button block ([#400](#400)) ([7c99f35](7c99f35)) * add My Account button block to all header patterns ([#404](#404)) ([d7b8b4a](d7b8b4a))
|
🎉 This PR is included in version 1.24.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
All Submissions:
Changes proposed in this Pull Request:
See Automattic/newspack-plugin#4409
Closes # .
How to test the changes in this Pull Request:
Other information: