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
feat(master-detail): added master detail demo #2645
feat(master-detail): added master detail demo #2645
Conversation
PatternFly-Next preview: https://patternfly-next-pr-2645.surge.sh |
{{/data-toolbar-content}} | ||
{{/data-toolbar}} | ||
|
||
{{!-- |
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 remove this if it isn't needed?
@@ -192,3 +192,65 @@ | |||
#{$value}: #{$prop}; | |||
} | |||
} | |||
|
|||
@mixin pf-label-list-builder($namespace, $row-gap: "sm", $column-gap: "sm", $grid-gap: "md") { |
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 pull this out of this PR and put it in a separate issue or whatever you think is appropriate since we're just exploring the idea currently?
|
||
## Demos | ||
|
||
### isFullscreen |
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.
did you mean to add isFullscreen
to the end of the ```hbs lines?
.pf-c-drawer__content-body, | ||
.pf-c-drawer__panel-body { | ||
.pf-c-drawer__action { | ||
float: right; |
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 could create a layout like this where text wraps around the button. like this
Typically whatever is to the left of the button stays to the left of the button, like the modal or popover here
what do you think @mcarrano @mceledonia?
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.
I updated this. The developer will be responsible for placing the close button as some instances control the panel outside of the panel, possibly in the __content
or in page header.
{{#if drawer-action--attribute}} | ||
{{{drawer-action--attribute}}} | ||
{{/if}}> | ||
{{#> button button--modifier="pf-m-plain" button--id=(concat drawer--id '-close-button') button--attribute=(concat 'id="' drawer--id '-close-button" aria-labelledby="' drawer--id '-close-button ' drawer--id '-label" aria-label="Close drawer panel"')}} |
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.
should we only use aria-labelledby
if the -label
element exists? That element may not always exist, since the -label
isn't an element of the drawer component. (like it isn't in any of these examples https://patternfly-next-pr-2645.surge.sh/documentation/core/beta/drawer)
.pf-c-drawer__panel.pf-m-width-#{$width-value}#{$breakpoint-name} { | ||
--pf-c-drawer__panel--FlexBasis: #{percentage($width-value / 100)}; | ||
// Drawer inline | ||
.pf-c-drawer.pf-m-inline#{$breakpoint-name} { |
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.
I wonder, if the CSS is the same between pf-m-inline
and pf-m-static
, if we could either include pf-m-static
in this loop as a selector if the breakpoint is "base", or maybe make a mixin for the common styles.
display: flex; | ||
flex-direction: column; | ||
} | ||
// // stylelint-disable max-nesting-depth, selector-max-class, selector-max-compound-selectors |
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 need to keep the commented code?
{{/drawer-panel}} | ||
{{/drawer}} | ||
{{/page-drawer}} | ||
{{#if drawer-demo-default--NoPageWrapper}} |
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.
Is there a benefit to doing this with and without the page element? If not I think we should pick one way.
@@ -0,0 +1,107 @@ | |||
{{#> data-list data-list--id=(concat master-detail-template--id 'data-list') data-list--attribute='aria-label="Selectable rows data list example"'}} |
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.
{{#> data-list data-list--id=(concat master-detail-template--id 'data-list') data-list--attribute='aria-label="Selectable rows data list example"'}} | |
{{#> data-list data-list--id=(concat master-detail-template--id '-data-list') data-list--attribute='aria-label="Selectable rows data list example"'}} |
body .ws-example { | ||
max-width: none; | ||
} | ||
|
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 you need any of this anymore? Looks like it was needed when the examples weren't full screen
{{/master-detail-template}} | ||
``` | ||
|
||
To initiate independently scrollable content and panel sections simply omit `.pf-c-page__section` or other height managed parent element. |
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 neat. I wonder if this should be an enhancement to the page section though - that might be useful in other contexts, too. like pf-m-scrollable
that sets overflow: auto
on the page section. You could define a header or some content in the first page section, then the next page section scrolls, versus the whole content area scrolling. wdyt?
@@ -0,0 +1,6 @@ | |||
<div class="pf-c-drawer__header{{#if drawer-header--modifier}} {{drawer-header--modifier}}{{/if}}" |
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.
What is this element used for?
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.
It's part of the master/detail layout concept. This example uses it.
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.
Ah, does that need to be a part of the drawer component though? It looks kinda random. I would expect the space between the text and paragraph in that demo to come from something like a stack layout or a content component that wraps the header text and paragraph and the header text is some sort of heading element.
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.
Doesn't exist anymore. drawer__body
goes directly in drawer__content
and drawer__panel
and replaces drawer__header
.
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.
These look mostly great @mattnolting . There were just a couple of things that seemed off.
-
In the first example (using a table in the master panel), the detail item, Node 2, should be shown selected in the table.
-
In the Simple List example, the list does not seem to display with correct styling.
I'm also not completely clear on whether this is doing the right thing in mobile state. How do I navigate between the master and detail?
@lboehling can you also take a look here and see if the demos are consistent with your design intent?
@mcarrano @mattnolting the simple list (and notification drawer) styles should be fixed on master now via this PR - #2684. You'll just need to rebase. |
Thanks!
We don't have a selectable table row yet.
Updated
|
@@ -1,26 +1,36 @@ | |||
$pf-c-drawer--breakpoint-map: build-breakpoint-map("base", "lg", "xl", "2xl"); | |||
$pf-c-drawer__panel--width-list: (25, 33, 50, 66, 75); | |||
$pf-c-drawer-width--breakpoint-map: build-breakpoint-map("base", "lg", "xl", "2xl"); |
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.
that might be better as $pf-c-drawer--breakpoint-map--width
(with "width" as a modifier/variation of "breakpoint-map")
|
||
// Action | ||
--pf-c-drawer__action--MarginRight: var(--pf-global--spacer--md); | ||
--pf-c-drawer__panel-body--c-drawer__action--MarginRight: calc(var(--pf-global--spacer--md) * -1); |
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.
I wonder if we should even offer this button if we aren't going to position it for them? I wonder if we should do something like the card - when it has an action menu you use .pf-c-card__head
with .pf-c-card__main
and .pf-c-card__action
, and you put whatever you want to show up on the left in __main
. And if you have nothing to put beside the close button, maybe you just leave it blank like this example
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.
I expect a close button to be part of the React implementation, so I'll leave for the demo and remove for the component.
@@ -422,6 +422,10 @@ | |||
} | |||
} | |||
|
|||
.pf-c-page__sidebar + .pf-c-drawer { |
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.
Were we going to look at using .pf-c-page__drawer
here? Seems like we would still want to maintain the other page styles that are in the .pf-c-page__main, .pf-c-page__drawer
selector, and for the ability to use page sections and things like that.
|
||
// Toolbar in drawer | ||
.pf-c-drawer .pf-c-data-toolbar { | ||
--pf-c-data-toolbar__content--PaddingRight: var(--pf-c-drawer__panel-body--PaddingRight); |
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.
Also that would allow someone to use the toolbar somewhere else in the drawer in another context without getting these styles inadvertently, since the current styling will apply to all toolbars in a drawer.
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.
Why doesn't the data-toolbar have left/right padding that match the page gutter system (lg on desktop, md on mobile)?
.pf-c-page
left/right padding doesn't match most elements within which pf-c-toolbar
can/will be used (.pf-c-card
, .pf-c-tab-content
, .pf-c-wizard
, etc) or that it applies to (.pf-c-data-list
, .pf-c-table
, etc). If that's the expected behavior, then all components with built in padding need to follow that pattern.
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.
|
||
.pf-c-simple-list__item-link { | ||
--pf-c-simple-list__item-link--PaddingRight: var(--pf-c-drawer--c-simple-list__item-link--PaddingRight); | ||
--pf-c-simple-list__item-link--PaddingLeft: var(--pf-c-drawer--c-simple-list__item-link--PaddingLeft); |
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.
I think with the title and link padding, we can make the same change as I mentioned below re: the toolbar's default left/right padding. Have the spacing adjust with the page gutter system so it's 24px on desktop and 16px on mobile. And that could go in the simple list, so we shouldn't need to update it here.
height: 100%; | ||
overflow-x: hidden; | ||
|
||
.pf-c-simple-list__title { | ||
--pf-c-simple-list__title--PaddingTop: var(--pf-c-drawer--c-simple-list__title--PaddingTop); |
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.
I wonder if we can build this in to the simple list itself or maybe create some sort of drawer__panel-nav
element or something like that, that is used to create space for some sort of list like this inside of it, similar to this in the sidebar that spaces the nav component from the top.
Then we don't have to re-style the simple list in the drawer, since I presume most drawers don't have a simple list, and it creates a dependency. Also that could add padding to the bottom so we don't end up with this lack of space at the end of the list that looks off
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.
Also that would allow someone to use the simple list somewhere else in the drawer in another context without getting these styles inadvertently, since the current styling will apply to all simple lists in a drawer.
@mattnolting Thanks for your reply on the issues I raised. Regarding the master-detail with table example, I'm wondering if we should just pull that out if we don't have the ability to select a row in a table. It does not seem very useful in that case. @LHinson are you aware that we have a priority need for this? Is there currently a plan to add selectable rows to the Table component? |
@matthewcarleton big ask, but can you review this behemoth? |
--pf-c-drawer__panel-body--PaddingLeft: var(--pf-c-drawer__panel-body--md--PaddingLeft); | ||
@media screen and (min-width: $pf-global--breakpoint--xl) { | ||
--pf-c-drawer__panel--FlexBasis: var(--pf-c-drawer__panel--xl--FlexBasis); | ||
--pf-c-drawer__panel--MinWidth: var(--pf-c-drawer__panel--xl--MinWidth); |
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.
Should this var be defined outside of this media query? It's used in a declaration but undefined below this breakpoint.
// Panel body | ||
.pf-c-drawer__panel-body { | ||
padding: var(--pf-c-drawer__panel-body--PaddingTop) var(--pf-c-drawer__panel-body--PaddingRight) var(--pf-c-drawer__panel-body--PaddingBottom) var(--pf-c-drawer__panel-body--PaddingLeft); | ||
// Modified content children |
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 an observation, but this is creating some pretty hefty selectors.
.pf-c-drawer__head,
.pf-c-drawer__header,
.pf-c-drawer__body {
padding: var(--pf-c-drawer--child--PaddingTop) var(--pf-c-drawer--child--PaddingRight) var(--pf-c-drawer--child--PaddingBottom) var(--pf-c-drawer--child--PaddingLeft);
}
.pf-c-drawer__panel .pf-c-drawer__head:not(.pf-m-no-padding)+.pf-c-drawer__head,
.pf-c-drawer__panel .pf-c-drawer__header:not(.pf-m-no-padding)+.pf-c-drawer__head,
.pf-c-drawer__panel .pf-c-drawer__body:not(.pf-m-no-padding)+.pf-c-drawer__head,
.pf-c-drawer__panel .pf-c-drawer__head:not(.pf-m-no-padding)+.pf-c-drawer__header,
.pf-c-drawer__panel .pf-c-drawer__header:not(.pf-m-no-padding)+.pf-c-drawer__header,
.pf-c-drawer__panel .pf-c-drawer__body:not(.pf-m-no-padding)+.pf-c-drawer__header,
.pf-c-drawer__panel .pf-c-drawer__head:not(.pf-m-no-padding)+.pf-c-drawer__body,
.pf-c-drawer__panel .pf-c-drawer__header:not(.pf-m-no-padding)+.pf-c-drawer__body,
.pf-c-drawer__panel .pf-c-drawer__body:not(.pf-m-no-padding)+.pf-c-drawer__body {
--pf-c-drawer--child--PaddingTop: 0;
}
.pf-c-drawer__content .pf-c-drawer__head.pf-m-padding+.pf-c-drawer__head.pf-m-padding,
.pf-c-drawer__content .pf-c-drawer__header.pf-m-padding+.pf-c-drawer__head.pf-m-padding,
.pf-c-drawer__content .pf-c-drawer__body.pf-m-padding+.pf-c-drawer__head.pf-m-padding,
.pf-c-drawer__content .pf-c-drawer__head.pf-m-padding+.pf-c-drawer__header.pf-m-padding,
.pf-c-drawer__content .pf-c-drawer__header.pf-m-padding+.pf-c-drawer__header.pf-m-padding,
.pf-c-drawer__content .pf-c-drawer__body.pf-m-padding+.pf-c-drawer__header.pf-m-padding,
.pf-c-drawer__content .pf-c-drawer__head.pf-m-padding+.pf-c-drawer__body.pf-m-padding,
.pf-c-drawer__content .pf-c-drawer__header.pf-m-padding+.pf-c-drawer__body.pf-m-padding,
.pf-c-drawer__content .pf-c-drawer__body.pf-m-padding+.pf-c-drawer__body.pf-m-padding {
--pf-c-drawer--child--PaddingTop: 0;
}
.pf-c-drawer__content .pf-c-drawer__head,
.pf-c-drawer__content .pf-c-drawer__header,
.pf-c-drawer__content .pf-c-drawer__body {
--pf-c-drawer--child--PaddingTop: 0;
--pf-c-drawer--child--PaddingRight: 0;
--pf-c-drawer--child--PaddingBottom: 0;
--pf-c-drawer--child--PaddingLeft: 0;
}
.pf-c-drawer__head>.pf-c-drawer__head,
.pf-c-drawer__header>.pf-c-drawer__head,
.pf-c-drawer__body>.pf-c-drawer__head,
.pf-c-drawer__head>.pf-c-drawer__header,
.pf-c-drawer__header>.pf-c-drawer__header,
.pf-c-drawer__body>.pf-c-drawer__header,
.pf-c-drawer__head>.pf-c-drawer__body,
.pf-c-drawer__header>.pf-c-drawer__body,
.pf-c-drawer__body>.pf-c-drawer__body {
--pf-c-drawer--child--PaddingTop: 0;
--pf-c-drawer--child--PaddingRight: 0;
--pf-c-drawer--child--PaddingBottom: 0;
--pf-c-drawer--child--PaddingLeft: 0;
}
.pf-c-drawer__head.pf-m-no-padding,
.pf-c-drawer__header.pf-m-no-padding,
.pf-c-drawer__body.pf-m-no-padding {
--pf-c-drawer--child--PaddingTop: 0;
--pf-c-drawer--child--PaddingRight: 0;
--pf-c-drawer--child--PaddingBottom: 0;
--pf-c-drawer--child--PaddingLeft: 0;
}
.pf-c-drawer__head.pf-m-padding,
.pf-c-drawer__header.pf-m-padding,
.pf-c-drawer__body.pf-m-padding {
--pf-c-drawer--child--PaddingTop: var(--pf-c-drawer--child--m-padding--PaddingTop);
--pf-c-drawer--child--PaddingRight: var(--pf-c-drawer--child--m-padding--PaddingRight);
--pf-c-drawer--child--PaddingBottom: var(--pf-c-drawer--child--m-padding--PaddingBottom);
--pf-c-drawer--child--PaddingLeft: var(--pf-c-drawer--child--m-padding--PaddingLeft);
}
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 to:
.pf-c-drawer__header,
.pf-c-drawer__body {
padding: var(--pf-c-drawer--child--PaddingTop) var(--pf-c-drawer--child--PaddingRight) var(--pf-c-drawer--child--PaddingBottom) var(--pf-c-drawer--child--PaddingLeft); }
.pf-c-drawer__header.pf-m-no-padding,
.pf-c-drawer__body.pf-m-no-padding {
--pf-c-drawer--child--PaddingTop: 0;
--pf-c-drawer--child--PaddingRight: 0;
--pf-c-drawer--child--PaddingBottom: 0;
--pf-c-drawer--child--PaddingLeft: 0; }
.pf-c-drawer__header.pf-m-padding,
.pf-c-drawer__body.pf-m-padding {
--pf-c-drawer--child--PaddingTop: var(--pf-c-drawer--child--m-padding--PaddingTop);
--pf-c-drawer--child--PaddingRight: var(--pf-c-drawer--child--m-padding--PaddingRight);
--pf-c-drawer--child--PaddingBottom: var(--pf-c-drawer--child--m-padding--PaddingBottom);
--pf-c-drawer--child--PaddingLeft: var(--pf-c-drawer--child--m-padding--PaddingLeft); }
.pf-c-drawer__header:not(.pf-m-no-padding) + *,
.pf-c-drawer__body:not(.pf-m-no-padding) + * {
--pf-c-drawer--child--PaddingTop: 0; }
<b>Drawer content padding.</b> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat, nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate. | ||
{{/drawer-content}} | ||
{{> drawer-example-panel}} | ||
{{/drawer-main}} | ||
{{/drawer}} | ||
``` | ||
|
||
```hbs title=Modified-panel-padding |
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.
I don't see any panel modifiers used in this example
// Panel head | ||
.pf-c-drawer__head { | ||
display: flex; | ||
align-items: center; |
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.
What about creating a __head-main
element that is used in __head
to contain any content adjacent to the __actions
element - similar to what we just added to card?
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.
I'm doing that with display: grid
@@ -0,0 +1,15 @@ | |||
{{#> drawer-head}} | |||
{{#> drawer-actions}} |
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.
should you wrap this in {{#unless drawer--IsStatic}}{{/unless}}
so it isn't in static drawers?
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.
No, the responsive layout needs requires a close button.
@@ -0,0 +1,6 @@ | |||
<div class="pf-c-drawer__section{{#if drawer-section--modifier}} {{drawer-section--modifier}}{{/if}}" |
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.
@mattnolting I still see this here, are you intending to keep it
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat, nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate. | ||
{{/drawer-content}} | ||
{{> drawer-example-panel}} | ||
{{/drawer-main}} | ||
{{/drawer}} | ||
``` | ||
|
||
```hbs title=Panel-on-left |
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.
Change to: closed-panel-left-example
@@ -0,0 +1,6 @@ | |||
<div class="pf-c-drawer__head{{#if drawer-head--modifier}} {{drawer-head--modifier}}{{/if}}" |
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.
Fixed
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat, nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate. | ||
{{/drawer-content}} | ||
{{> drawer-example-panel}} | ||
{{/drawer-main}} | ||
{{/drawer}} | ||
``` | ||
|
||
```hbs title=Modified-panel-width |
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.
{{#> drawer | ||
drawer--id=(concat master-detail-template--id '-drawer') | ||
drawer-panel--IsOpen="true" | ||
drawer--modifier="pf-m-inline-on-2xl" |
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.
{{#> drawer | ||
drawer--id=(concat master-detail-template--id '-drawer') | ||
drawer-panel--IsOpen="true" | ||
drawer--modifier="pf-m-inline-on-2xl" |
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.
I wonder if you should show an example of this at that breakpoint where the content is expanded on top of the list items?
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.
PERFECT
@@ -0,0 +1,6 @@ | |||
<div class="pf-c-drawer__section{{#if drawer-section--modifier}} {{drawer-section--modifier}}{{/if}}" |
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.
AH got it!! Okay thank you so much for explaining that!!!
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 looks really great @mattnolting!!! Only one thing... In the "master detail collapsed" version, I don't think there needs to be a selected row. Collapsing the drawer would deselect the active item and reselecting an item would open the drawer again. @mcarrano do you think we need this version of the demo?
this looks awesome!
That's a good question @lboehling . Normally I would say no, however next steps would be to create a React demo that shows the interaction, so it that case would React need this screen to represent the return state after the panel is closed? @mattnolting @christiemolloy I'll defer to you on this one. |
@lboehling Nice catch! I'll update |
Capturing remaining issues here: #2708 |
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.
LGTM! Just a couple questions :) Nice work on a huge effort @mattnolting
transition-duration: var(--pf-c-drawer__panel--TransitionDuration); | ||
transition-property: var(--pf-c-drawer__panel--TransitionProperty); | ||
-webkit-overflow-scrolling: touch; | ||
|
||
&::after { |
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.
What is the purpose of this? It doesn't seem to do anything when removed
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.
It's the border container. When .pf-m-border
is applied to parent, the background of this element is painted.
{{#> page-main}} | ||
{{#> page-template-breadcrumb}} | ||
{{/page-template-breadcrumb}} | ||
<a id="main-content-{{page--id}}"></a> |
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.
should we include href="#"
here?
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.
This all looks great @mattnolting !
One small note for React implementation, I understand that toolbars cannot me made to respond correctly here. But this is something that should be corrected in the React demo.
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.
Looks fantastic! :)
🎉 This PR is included in version 2.64.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
closes #2471
https://patternfly-next-pr-2645.surge.sh/documentation/core/experimental/drawer
https://patternfly-next-pr-2645.surge.sh/documentation/core/demos/masterdetail
https://patternfly-next-pr-2645.surge.sh/documentation/core/demos/drawer