Skip to content

Move conditional rendering logic for the share button to remove styling#16177

Open
dskamiotis wants to merge 1 commit into
mainfrom
ds/move-shouldIncludeShareButton-element-location-in-dom
Open

Move conditional rendering logic for the share button to remove styling#16177
dskamiotis wants to merge 1 commit into
mainfrom
ds/move-shouldIncludeShareButton-element-location-in-dom

Conversation

@dskamiotis

@dskamiotis dskamiotis commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

What does this change?

Moves the share-button conditional rendering logic outside the parent container so the container is not rendered when the share button is omitted.
This prevents the unused top padding from being applied when no share button is shown.

Why?

A related PR introduced conditional rendering for the share button: #16139
In the current implementation, when the share button is not rendered, the parent container still renders and applies padding-top, leaving unnecessary spacing.
This is a small cleanup that avoids that layout side effect.

@dskamiotis dskamiotis changed the title Move conditional rendering logic for the share button so we can omit … Move conditional rendering logic for the share button to omit styling Jun 16, 2026
@github-actions

Copy link
Copy Markdown

Hello 👋! When you're ready to run Chromatic, please apply the run_chromatic label to this PR.

You will need to reapply the label each time you want to run Chromatic.

Click here to see the Chromatic project.

@dskamiotis dskamiotis changed the title Move conditional rendering logic for the share button to omit styling Move conditional rendering logic for the share button to remove styling Jun 16, 2026
@dskamiotis dskamiotis added maintenance Departmental tracking: maintenance work, not a fix or a feature fix Departmental tracking: fix run_chromatic Runs chromatic when label is applied and removed maintenance Departmental tracking: maintenance work, not a fix or a feature labels Jun 16, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Departmental tracking: fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants