chore: Added size prop to TitleLeft component#24913
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsThis PR adds a new optional
Why no E2E tags are needed:
|
georgewrmarshall
left a comment
There was a problem hiding this comment.
LGTM! Not sure how I feel about our testing approach for this one. I understand we want solid coverage for our components, and without these tests, we don't reach 100%. That said, mocking our Text component and testing internal props feels like a code smell, even if the intention makes sense. I'm wondering if a snapshot test might be more appropriate here. I don’t have a strong answer, but it’s something to think about. Is this the pattern we want to follow for app components that use MMDS components under the hood? Something to align on going forward.
| export enum TitleLeftSize { | ||
| Md = 'Md', | ||
| Sm = 'Sm', | ||
| } |
There was a problem hiding this comment.
non-blocking: @amandaye0h have we got any code comments we can add here on when to use each size?
|



Description
Added a
sizeprop to theTitleLeftcomponent to support different title sizes. This allows consumers to choose between medium (Md) and small (Sm) variants:TitleLeftSize.Md(default): UsesTextVariant.DisplayMdfor the titleTitleLeftSize.Sm: UsesTextVariant.HeadingLgfor the titleThis provides more flexibility when using
TitleLeftin different contexts where a smaller title is needed.Changelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2026-01-19.at.15.02.45.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Introduces configurable sizing to
TitleLeftfor flexible typography.sizeprop andTitleLeftSizeenum (defaultMd) mapping title toDisplayMd(Md) orHeadingLg(Sm) inTitleLeft.tsxsizecontrol and examples inTitleLeft.stories.tsxTextinTitleLeft.test.tsxTitleLeftSizeviaindex.ts; updates types and JSDoc inTitleLeft.types.tsWritten by Cursor Bugbot for commit 26994a7. This will update automatically on new commits. Configure here.