RFC: Page component API #562
lucasaarcoverde
started this conversation in
Technical RFCs
Replies: 2 comments 1 reply
-
If we are leaving the layout to the user, does it still make sense to have some layout components like |
Beta Was this translation helpful? Give feedback.
0 replies
-
I don't understand what you mean by code language. Do you mean like examples of code that match the common design specs? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem
The Page component has now been reviewed at the design level and is working as it should.
The main issue with this component is that we are trying to match some design specs, which should be at the documentation/Figma level, at the code level, and this ended up creating complexity in the component usage.
For example, to use a button on the Page you don’t need to check for the
Button
component doc but for thePageHeaderButton
doc, and is necessary also to understand what’s the difference between them.Why this matters?
Using a simple page layout requires a lot of understanding of the component itself (
PageHeaderTop
,PageHeaderTitle
,PageHeaderButton
,PageHeaderActions
, etc.) which brings an unnecessary complexity.Proposal
My proposal is to give more power to the user and let them guide how they will implement the
PageHeader
layout while avoiding specific components with hidden styles and properties.Full Example
Before
After
Title
Before
After
With tags
Before
After
With actions
Before
After
Pros
PageHeaderButton
,PageHeaderMenuButton
, orPageHeaderTag
.Cons
Unresolved questions
What's next
Beta Was this translation helpful? Give feedback.
All reactions