-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
docs(layouts): add layout examples #1039
docs(layouts): add layout examples #1039
Conversation
@levithomason Would like your thoughts on current implementation before i continue with the porting issues currently having
|
Codecov Report
@@ Coverage Diff @@
## master #1039 +/- ##
=======================================
Coverage 99.75% 99.75%
=======================================
Files 144 144
Lines 2463 2463
=======================================
Hits 2457 2457
Misses 6 6 Continue to review full report at Codecov.
|
Here's what I'm thinking. StructureWe put layout examples in I'm thinking the layouts need to render as a full page view without the sidebar in order to be effective. I'll need to rework some components to make this happen. Showing sourceAgain, I think this needs to be done differently that in the current examples. What if we showed a circular floating button in one of the corners of the every layout, when clicked, we could show the source. Perhaps we would show source in a modal over the layout itself, or, we could toggle the entire page from the rendered view to the source editor and back. I think the primary concern here is that the source will be very large so we'll likely need to take up the entire page, or at least most of it. If you can move the layout to be in the directory structure proposed above, I'll come back to this PR and update it to handle the routes and showing source for layouts as soon as I can. |
|
Great! If you want to take a stab at any of that, please do. Otherwise, I'll get to this as soon as I am able. |
docs/app/Views/Layouts.js
Outdated
import { Header, Segment, Container, Divider, Card } from 'semantic-ui-react' | ||
|
||
const LayoutsExample = () => ( | ||
<Container as='div'> |
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.
Heads up, the default component class is div
so we can remove all as='div'
props since it is redundant.
docs/app/Views/Layouts.js
Outdated
|
||
const LayoutsExample = () => ( | ||
<Container as='div'> | ||
<Segment masthead vertical> |
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 is no masthead
prop, let's remove that.
docs/app/Views/Layouts.js
Outdated
<Divider hidden /> | ||
</Container> | ||
</Segment> | ||
<Container as='div' className='main intro'> |
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.
Let's also remove className='main intro'
, we shouldn't have any extra classNames on the layouts as we have no additional styles to apply. If the layouts require additional custom styling on top of the default theme, then we'll have to reconsider how we go about that.
docs/app/Views/Layouts.js
Outdated
<Segment masthead vertical> | ||
<Container as='div'> | ||
<Header as='h1'> Layouts | ||
<div className='sub header'>Examples of using Semantic UI React</div> |
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.
Here we can use <Header.Subheader />
instead of className
.
I'm adding route support for the view ATM, I'll address some of the other issues as well. |
OK, I've stubbed out the routes and layout files themselves. I also included a back button automatically for the layout views. You should be good to simply update the layout files. Let me know if you run into any issues 👍 |
@levithomason thanks alot |
No problem, ping me when the other layouts are in and I'll make sure to get the full page source and editor going. |
@levithomason I was updating the stream from master but alot has changed quite significantly and I have alot of conflicts. |
Yep, I'll label this issue for assistance and @layershifter or myself will get to it soon. |
@layershifter managed to get all the layouts up but without styling |
…-React into layout_examples
…antic-UI-React into layout_examples
…React into layout_examples # Conflicts: # docs/app/Components/DocsLayout.js
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.
Updated all examples, fixed styling and merge conflicts. @levithomason we're ready for initial review there
BTW, @iamcaleberic thanks for your work there!
@layershifter thanks for the assist in completing this.... |
Thank you @iamcaleberic and @layershifter for pushing this one over the finish line! |
Released in |
This is awesome! Thank you so much for this contribution, I've been looking for full blown layout examples. I was wondering, I noticed the "Home Page" example on regular SUI has a responsive hamburger menu, does SUI React not support this? |
Yeah, I think @jackjwilliams found a bug. https://semantic-ui.com/examples/homepage.html |
TODO
Fixes #836