primer / react

An implementation of GitHub's Primer Design System using React
https://primer.style/guides/react
MIT License
3.02k stars 520 forks source link

PageHeader: Fixes layout issues on title and sub components #4669

Closed broccolinisoup closed 1 week ago

broccolinisoup commented 2 weeks ago

[!IMPORTANT]
For release coordinator: I would need two commits (commit1, commit2) to be added to the upgrade PR

Reported internally on Slack (Hubbers link only) that there is a layout shift happening on titles and sub components. (font-size (for titles) and the height of the actions change after the initial render)

Video describes the layout shift issue in the prod storybook and how this PR fixes it on the local environment. Especially the actions on the right side jumps quite visibly.

https://github.com/primer/react/assets/1446503/63211e18-6442-44c7-8d73-c2ec40665c5f

Changelog

New

Changed

Removed

Rollout strategy

Testing & Reviewing

Merge checklist

changeset-bot[bot] commented 2 weeks ago

🦋 Changeset detected

Latest commit: 4ce72c207e0117eaae6744f76e0093a8254bb018

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ------------- | ----- | | @primer/react | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

github-actions[bot] commented 2 weeks ago

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 91.1 KB (0%)
packages/react/dist/browser.umd.js 91.35 KB (0%)
broccolinisoup commented 1 week ago

@mperrotti yeah it is interesting! I can confirm that I see the same thing as you shared. It might be because of the font settings etc are different where these snapshots are generated.