Merge Aa/portrait layout continued into 'portrait layout' - #16482
Conversation
… to top and bottom of headline container, hide stripes above meta
Slim nav, display bylines in the right place, grid adjustments
…t-layout-continued
|
Hello 👋! When you're ready to run Chromatic, please apply the You will need to reapply the label each time you want to run Chromatic. |
|
@copilot rebase this pull request on the latest version of the |
The branch already incorporates the latest The code changes are identical to what a rebase would produce. If you'd like to clean up the history with a force push, you'd need to do that manually: |
b31f2df to
4f66342
Compare
There was a problem hiding this comment.
Pull request overview
This PR extends “immersive” metadata/title rendering so that specific immersive portrait/landscape layout variants can show contributor/avatar/section information, by threading layoutType through the relevant components and updating layout-specific styling.
Changes:
- Update
shouldShowAvatar/shouldShowContributorto considerlayoutTypefor immersive variants, and passlayoutTypethrough meta/title/headline components. - Adjust Standard layout grid/styling for immersive portrait/landscape variants and propagate a
contentLayoutNamevalue to layout/grid usage. - Update Series/Section label behaviour for immersive portrait/landscape variants.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| dotcom-rendering/src/lib/articleMeta.ts | Adds layoutType-aware logic for avatar/contributor visibility, especially for immersive variants. |
| dotcom-rendering/src/lib/articleMeta.test.ts | Extends contributor tests with immersive cases. |
| dotcom-rendering/src/layouts/StandardLayoutArticleGrid.tsx | Passes layoutType to title/headline/meta and adjusts immersive grid styling/conditions. |
| dotcom-rendering/src/layouts/StandardLayout.tsx | Introduces contentLayoutName variable, passes it to the grid, and changes MobileStickyContainer rendering. |
| dotcom-rendering/src/components/SeriesSectionLink.tsx | Adds layoutType support to render section link for immersive portrait/landscape variants. |
| dotcom-rendering/src/components/ArticleTitle.tsx | Threads layoutType down into SeriesSectionLink. |
| dotcom-rendering/src/components/ArticleMeta.web.tsx | Uses layoutType to control avatar/contributor display and adjusts immersive meta layout. |
| dotcom-rendering/src/components/ArticleMeta.apps.tsx | Uses layoutType to control avatar/contributor display in Apps meta. |
| dotcom-rendering/src/components/ArticleHeadline.tsx | Adds layoutType prop and derives inverted styling for a specific immersive landscape layout. |
Comments suppressed due to low confidence (3)
dotcom-rendering/src/lib/articleMeta.test.ts:78
shouldShowContributornow takeslayoutTypeas a second argument; without passing it, this expectation will fail.
expect(shouldShowContributor(immersivePortraitFeature)).toBe(true);
dotcom-rendering/src/lib/articleMeta.test.ts:82
shouldShowContributornow takeslayoutTypeas a second argument; without passing it, this expectation will fail.
expect(shouldShowContributor(immersiveLandscapeDefault)).toBe(true);
dotcom-rendering/src/lib/articleMeta.test.ts:86
shouldShowContributornow takeslayoutTypeas a second argument; without passing it, this expectation will fail.
expect(shouldShowContributor(immersiveLandscapeFeature)).toBe(true);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| }); | ||
|
|
||
| it('should return true if Immersive display and immersivePortraitDefault layout', () => { | ||
| expect(shouldShowContributor(immersivePortraitDefault)).toBe(true); |
| export const shouldShowAvatar = ( | ||
| format: ArticleFormat, | ||
| layoutType?: LayoutType, | ||
| ): boolean => { | ||
| switch (format.display) { |
b9e37fa to
457487d
Compare
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
What does this change?
Why?
How has this change been tested?
Screenshots