Skip to content
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

Merged
merged 21 commits into from Feb 13, 2020
Merged

feat(master-detail): added master detail demo #2645

merged 21 commits into from Feb 13, 2020

Conversation

@patternfly-build
Copy link

PatternFly-Next preview: https://patternfly-next-pr-2645.surge.sh

@mattnolting mattnolting requested review from mcoker and christiemolloy and removed request for mcoker January 30, 2020 21:48
{{/data-toolbar-content}}
{{/data-toolbar}}

{{!--
Copy link
Contributor

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") {
Copy link
Contributor

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
Copy link
Contributor

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;
Copy link
Contributor

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

Screen Shot 2020-02-06 at 3 05 09 PM

Typically whatever is to the left of the button stays to the left of the button, like the modal or popover here

Screen Shot 2020-02-06 at 3 09 39 PM

Screen Shot 2020-02-06 at 3 08 52 PM

what do you think @mcarrano @mceledonia?

Copy link
Contributor Author

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"')}}
Copy link
Contributor

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} {
Copy link
Contributor

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
Copy link
Contributor

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}}
Copy link
Contributor

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"'}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{{#> 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;
}

Copy link
Contributor

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.
Copy link
Contributor

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}}"
Copy link
Contributor

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?

Copy link
Contributor Author

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.

https://marvelapp.com/9iefh5b/screen/63567619

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Member

@mcarrano mcarrano left a 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.

Screen Shot 2020-02-07 at 11 51 24 AM

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?

@mcoker
Copy link
Contributor

mcoker commented Feb 7, 2020

@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.

@mattnolting
Copy link
Contributor Author

These look mostly great @mattnolting . There were just a couple of things that seemed off.

Thanks!

  • In the first example (using a table in the master panel), the detail item, Node 2, should be shown selected in the table.

We don't have a selectable table row yet.

  • In the Simple List example, the list does not seem to display with correct styling.

Updated

Screen Shot 2020-02-07 at 11 51 24 AM

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?

pf-c-drawer__panel is always secondary to pf-c-drawer__content and always contains the dynamic, supporting content. If a table row is selected in __content, the __panel displays the supporting info. On the mobile view, their is only one layout. That is __panel is hidden by default, an element is selected (like a data-list row) then the __panel expands from the right and overlaps the __content. Past the medium breakpoint, __panel will respond to any of the provided modifiers.

@lboehling can you also take a look here and see if the demos are consistent with your design intent?

@christiemolloy
Copy link
Member

Screen Shot 2020-02-07 at 1 50 05 PM

list is getting cut off

@mattnolting
Copy link
Contributor Author

Screen Shot 2020-02-07 at 1 50 05 PM

list is getting cut off

That's the default padding for simple list

@@ -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");
Copy link
Contributor

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);
Copy link
Contributor

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

Screen Shot 2020-02-07 at 4 23 35 PM

Copy link
Contributor Author

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 {
Copy link
Contributor

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);
Copy link
Contributor

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)? I would expect it to. This is what it looks like currently in a demo with the page component and a table.

Screen Shot 2020-02-07 at 5 22 51 PM

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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);
Copy link
Contributor

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);
Copy link
Contributor

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.

Screen Shot 2020-02-07 at 5 26 08 PM

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

Screen Shot 2020-02-07 at 5 28 08 PM

Copy link
Contributor

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.

@mcarrano
Copy link
Member

@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?

@mattnolting
Copy link
Contributor Author

@mcarrano @LHinson demos are using data-list now

@mattnolting
Copy link
Contributor Author

@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);
Copy link
Contributor

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
Copy link
Contributor

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);
}

Copy link
Contributor Author

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>&nbsp;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
Copy link
Contributor

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;
Copy link
Contributor

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?

Copy link
Contributor Author

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}}
Copy link
Contributor

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?

Copy link
Contributor Author

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}}"
Copy link
Member

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
Copy link
Member

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}}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that the actions are vertically centered with the text, the text isn't aligning with the content on the left

Screen Shot 2020-02-12 at 9 31 56 AM

Copy link
Contributor Author

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
Copy link
Member

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 modified width here

Screen Shot 2020-02-12 at 9 50 42 AM

{{#> drawer
drawer--id=(concat master-detail-template--id '-drawer')
drawer-panel--IsOpen="true"
drawer--modifier="pf-m-inline-on-2xl"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok does this relate to this? When inline, you would click an item in the list and then the content would appear on top?
Screen Shot 2020-02-12 at 9 58 58 AM

{{#> drawer
drawer--id=(concat master-detail-template--id '-drawer')
drawer-panel--IsOpen="true"
drawer--modifier="pf-m-inline-on-2xl"
Copy link
Member

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?

@christiemolloy
Copy link
Member

Should the close button be in the markup here?

Screen Shot 2020-02-12 at 1 54 25 PM

@mattnolting
Copy link
Contributor Author

mattnolting commented Feb 12, 2020

Should the close button be in the markup here?

Screen Shot 2020-02-12 at 1 54 25 PM

Yes, it's necessary for the mobile view, although React may opt to remove. I doubt they will as it would be another thing to manage w/JS.

Copy link
Member

@christiemolloy christiemolloy left a 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}}"
Copy link
Member

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!!!

Copy link

@lboehling lboehling left a 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!

@mcarrano
Copy link
Member

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.

@mattnolting
Copy link
Contributor Author

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?

@lboehling Nice catch! I'll update

@mattnolting
Copy link
Contributor Author

Capturing remaining issues here: #2708

Copy link
Contributor

@matthewcarleton matthewcarleton left a 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 {
Copy link
Contributor

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

Copy link
Contributor Author

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>
Copy link
Contributor

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?

Copy link
Contributor

@matthewcarleton matthewcarleton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

Copy link
Member

@mcarrano mcarrano left a 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.

Copy link

@lboehling lboehling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fantastic! :)

@christiemolloy christiemolloy merged commit db30305 into patternfly:master Feb 13, 2020
@redallen
Copy link
Contributor

🎉 This PR is included in version 2.64.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants