feat: add tag labels to the Carousel block#429
Open
jason10lee wants to merge 5 commits into
Open
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All Submissions:
Changes proposed in this Pull Request:
A polish pass that fills a component gap (tag labels in the Carousel block) and makes the label treatment consistent across every context that renders post labels.
Carousel block (
newspack-blocks)showTagLabels, defaulttrue) in the Carousel's Post Meta settings, mirroring the Content Loop (Homepage Posts) block.view.php) render tag labels above the headline, after the category/sponsor labels. The taxonomy fetch is gated on the attribute, and the labels-only case (categories off, no sponsors) renders correctly..wpnbpcadded to the inline color selector).Label order + layout (
newspack-theme) — also corrects the already-merged Content Loop block + single-post / archive / search renderingentry-header.php,content-archive.php,content-excerpt.php), matching the "after any category or sponsorship labels" intent..wpnbha/.wpnbpc .cat-links{display:flex}beat the generic inline rule on specificity; this adds block-scoped rules at higher specificity (excluding sponsor rows so their own flex/gap layout wins deterministically). The editor-preview SCSS was updated to match.Rollout note:
showTagLabelsdefaults totrue(consistent with Content Loop). Any existing Carousel block on a site that already uses flagged tag labels will begin rendering them on next load. Worth a release-notes mention.Related: NPPD-383: "Breaking News" or "Developing" Label. Builds on parent PRs Automattic/newspack-plugin#4381, Automattic/newspack-blocks#2282, Automattic/newspack-theme#2613.
How to test the changes in this Pull Request:
Other information: