-
Notifications
You must be signed in to change notification settings - Fork 74
[LG-844] feat(collection-toolbar): CollectionToolbar Title SubComponent #3420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[LG-844] feat(collection-toolbar): CollectionToolbar Title SubComponent #3420
Conversation
|
|
Size Change: +1.87 kB (+0.1%) Total Size: 1.83 MB
ℹ️ View Unchanged
|
44bcebd to
9279070
Compare
packages/collection-toolbar/src/CollectionToolbar/CollectionToolbar.types.ts
Outdated
Show resolved
Hide resolved
packages/collection-toolbar/src/CollectionToolbar/CollectionToolbar.tsx
Outdated
Show resolved
Hide resolved
packages/collection-toolbar/src/CollectionToolbar/CollectionToolbar.tsx
Outdated
Show resolved
Hide resolved
...s/collection-toolbar/src/CollectionToolbar/CollectionToolbarTitle/CollectionToolbarTitle.tsx
Outdated
Show resolved
Hide resolved
...lection-toolbar/src/CollectionToolbar/CollectionToolbarTitle/CollectionToolbarTitle.types.ts
Outdated
Show resolved
Hide resolved
...lection-toolbar/src/CollectionToolbar/CollectionToolbarTitle/CollectionToolbarTitle.types.ts
Outdated
Show resolved
Hide resolved
...lection-toolbar/src/CollectionToolbar/CollectionToolbarTitle/CollectionToolbarTitle.spec.tsx
Outdated
Show resolved
Hide resolved
...lection-toolbar/src/CollectionToolbar/CollectionToolbarTitle/CollectionToolbarTitle.spec.tsx
Outdated
Show resolved
Hide resolved
stephl3
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update the README as you implement different pieces to colocate docs and related code in the same PRs?
packages/collection-toolbar/src/CollectionToolbar/CollectionToolbar.types.ts
Show resolved
Hide resolved
packages/collection-toolbar/src/CollectionToolbar/CollectionToolbar.tsx
Outdated
Show resolved
Hide resolved
| import { getCollectionToolbarStyles } from './CollectionToolbar.styles'; | ||
| import { CollectionToolbarProps } from './CollectionToolbar.types'; | ||
|
|
||
| export const CollectionToolbar = CompoundComponent( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to include a forwardRef for this component?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrapped in forwardRef now, but we're still missing a ref being passed to the root <div>
packages/collection-toolbar/src/CollectionToolbar/CollectionToolbar.tsx
Outdated
Show resolved
Hide resolved
packages/collection-toolbar/src/CollectionToolbar/CollectionToolbar.types.ts
Outdated
Show resolved
Hide resolved
stephl3
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just the missing ref forwarding but overall LGTM
| import { getCollectionToolbarStyles } from './CollectionToolbar.styles'; | ||
| import { CollectionToolbarProps } from './CollectionToolbar.types'; | ||
|
|
||
| export const CollectionToolbar = CompoundComponent( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrapped in forwardRef now, but we're still missing a ref being passed to the root <div>
|
Coverage after merging ar/LG-5844-collection-toolbar-title into ar/LG-5830-collection-toolbar will be
Coverage Report for Changed Files
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
…nt (#3420) * [LG-844] feat(collection-toolbar): Title component * updated lintin * updated tests, linitng cleanup * feedback updates * fixed type exports * updated collectionToolbar ref, updated added types docs * added context provider * fixed storybook darkmode, updated defaul theading element * reverted heading * added refs
…nt (#3420) * [LG-844] feat(collection-toolbar): Title component * updated lintin * updated tests, linitng cleanup * feedback updates * fixed type exports * updated collectionToolbar ref, updated added types docs * added context provider * fixed storybook darkmode, updated defaul theading element * reverted heading * added refs
…nt (#3420) * [LG-844] feat(collection-toolbar): Title component * updated lintin * updated tests, linitng cleanup * feedback updates * fixed type exports * updated collectionToolbar ref, updated added types docs * added context provider * fixed storybook darkmode, updated defaul theading element * reverted heading * added refs
…nt (#3420) * [LG-844] feat(collection-toolbar): Title component * updated lintin * updated tests, linitng cleanup * feedback updates * fixed type exports * updated collectionToolbar ref, updated added types docs * added context provider * fixed storybook darkmode, updated defaul theading element * reverted heading * added refs
✍️ Proposed changes
This PR introduces the
CollectionToolbar.Titlecompound subcomponent for theCollectionToolbarpackage.This component:
CompoundComponentandCompoundSubComponentutilities) to integrate with the parentCollectionToolbarH3typography element for the title content, while allowing the user to change the elment via anaspropCollectionToolbarvariant is set toCollapsibleSizeandVariantenums for better component API ergonomicsAdditionally, this PR improves the Storybook configuration with proper
StoryMetaType, argument types, and aLiveExamplestory that demonstrates the title component usage.🎟️ Jira ticket: LG-5844
NOTE: The
CollectionToolbarProviderwhich controls the darkmode value for the Title will be added in a future PR✅ Checklist
pnpm changesetand documented my changes🧪 How to test changes
pnpm storybookand navigate to Components / CollectionToolbarCollectionToolbar.Titlein actionvariantcontrol toCollapsible- the title should appearvariantcontrol toDefault- the title should be hiddensizeanddarkModecombinations