contentful / forma-36

A design system by Contentful
https://f36.contentful.com
MIT License
329 stars 81 forks source link

Header: Remove unwanted margin from title, release as stable component #2777

Closed stephanLeece closed 2 months ago

stephanLeece commented 2 months ago

Purpose of PR

Left margin on Header’s title prop is no longer rendered when there’s no element to the left of the title

Screenshot 2024-06-03 at 12 31 06

Screenshot 2024-06-03 at 12 31 23

I updated the noWrap class styling so that the margin is only applied if the element is not first-child. This follows the existing approach we use for the title class

I had done something similar when working on the Updated Layout component, in this commit.

Tickets: https://contentful.atlassian.net/browse/CFISO-1571

PR Checklist

vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
forma-36 ✅ Ready (Inspect) Visit Preview Jun 4, 2024 2:45pm
changeset-bot[bot] commented 2 months ago

🦋 Changeset detected

Latest commit: b08cc9d13ff7d61c8446d2c30dbb14749cd49cde

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

This PR includes changesets to release 36 packages | Name | Type | | ---------------------------- | ----- | | @contentful/f36-components | Patch | | @contentful/f36-header | Patch | | @contentful/f36-accordion | Patch | | @contentful/f36-asset | Patch | | @contentful/f36-autocomplete | Patch | | @contentful/f36-badge | Patch | | @contentful/f36-button | Patch | | @contentful/f36-card | Patch | | @contentful/f36-collapse | Patch | | @contentful/f36-copybutton | Patch | | @contentful/f36-core | Patch | | @contentful/f36-datetime | Patch | | @contentful/f36-datepicker | Patch | | @contentful/f36-drag-handle | Patch | | @contentful/f36-entity-list | Patch | | @contentful/f36-empty-state | Patch | | @contentful/f36-forms | Patch | | @contentful/f36-icon | Patch | | @contentful/f36-list | Patch | | @contentful/f36-menu | Patch | | @contentful/f36-modal | Patch | | @contentful/f36-navbar | Patch | | @contentful/f36-note | Patch | | @contentful/f36-notification | Patch | | @contentful/f36-pagination | Patch | | @contentful/f36-pill | Patch | | @contentful/f36-popover | Patch | | @contentful/f36-skeleton | Patch | | @contentful/f36-spinner | Patch | | @contentful/f36-table | Patch | | @contentful/f36-tabs | Patch | | @contentful/f36-text-link | Patch | | @contentful/f36-tooltip | Patch | | @contentful/f36-typography | Patch | | @contentful/f36-image | Patch | | @contentful/f36-avatar | 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 months ago

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
CommonJS 135.71 KB (+0.7% 🔺) 2.8 s (+0.7% 🔺) 121 ms (+80.34% 🔺) 2.9 s
Module 132.05 KB (+0.67% 🔺) 2.7 s (+0.67% 🔺) 140 ms (+57.52% 🔺) 2.8 s