-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[Divider] Add support for middle divider #13574
Conversation
@joshwooding I believe it's a breaking change. We will have to way ~3 months before being able to merge. Maybe you can make it a non breaking change (backward compatible) with a warning? |
e1646df
to
58b43d8
Compare
@oliviertassinari That should do it :) |
5fd79cf
to
d5c57ef
Compare
classes: PropTypes.object.isRequired, | ||
}; | ||
|
||
export default withStyles(styles)(MiddleDividers); |
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.
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.
Yes, I agree
[Divider] Add more tests [docs] Updated Divider documentation
[Divider] Added deprecation warning when using inset property [Divier] Re-added tests for inset property and added warning test
720886a
to
c3d54ce
Compare
64ef674
to
547be2c
Compare
547be2c
to
1cd659c
Compare
I have made some changes. I have removed the subheader property. It's important to have a simple Divider component that people can override. |
So, I've been working on the demos and I've noticed some pain points:
Big ScreenSmall ScreenStyling Subheader Dividers are a bit fiddly at the moment, due to a them being composed of two different components, maybe a composition pattern would work better:
this would allow for more customisability and easier styling, but would differ from the patterns we already have. As an example of less than ideal styling currently to add a border at the bottom of a Subheader Divider you need to add the margin to the text. We also always keep the current pattern and change the underlying components |
You are right, but it's not directly related. We are already impacted by the problem, there is a listitem issue open to solve it. The solution is 👌, it's described in the related issue: #10044. As far as I remember, we can make the spacing screen size invariant. |
ef367d5
to
78f8ebf
Compare
@joshwooding Thank you |
I have followed (at least) the PR section of the contributing guide.
[Divider] Added other dividers from spec
[Divider] Added more tests
[docs] Updated Divider documentation
Thought adding these would be a quick win :) Sadly changing to variant makes this a breaking change. The old props can be added in an a warning shown to change this.
Upgrade path
We are introducing a new variant to the divider component:
middle
. Following our API guideline, we can no longer use a boolean property, it needs to be an enum, hence the introduction of thevariant
property.