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(PF4 - Drawer): Update drawer to expose all parts #2733

Merged
merged 2 commits into from Aug 30, 2019

Conversation

@karelhala
Copy link
Contributor

karelhala commented Aug 20, 2019

What:

Thank you @dlabaj for experimental Drawer component! Usage is nice and straight forward, what do you think about exposing DrawerContent as well? This way users can add the DrawerPanelContent when they want to, for instance when data in it should be loaded from server so they want to show it only when user clicks on some element to show it. Also special classes and attributes can be aplied to Content so for instance if app has some special attributes to track where user is located they can do that easilly with this.

It's essentially the same, except that content is not part of Drawer itself, but special component and Panel is not sent trough prop but as child.

@karelhala karelhala requested review from jschuler, dlabaj, tlabaj and redallen Aug 20, 2019
@patternfly-build

This comment has been minimized.

Copy link
Contributor

patternfly-build commented Aug 20, 2019

PatternFly-React preview: https://patternfly-react-pr-2733.surge.sh

Copy link
Contributor

redallen left a comment

This mirrors components like Card and Accordion better.

@@ -11,24 +11,19 @@ export interface DrawerProps extends React.HTMLProps<HTMLDivElement> {
isExpanded?: boolean;
/** Indicates if the content element and panel element are displayed side by side. */
isInline?: boolean;
/** Content rendered in the drawer */
panelContent?: React.ReactNode;

This comment has been minimized.

Copy link
@redallen

redallen Aug 20, 2019

Contributor

Experimental 🎉

This comment has been minimized.

Copy link
@karelhala

karelhala Aug 20, 2019

Author Contributor

Exactly! Good way we added it in experimental so we can improve the API before it's full fledged component.

className="pf-c-drawer__content"
>

<Component>

This comment has been minimized.

Copy link
@jschuler

jschuler Aug 23, 2019

Collaborator

Should change test to use mount instead of shallow so we can get more info here

This comment has been minimized.

Copy link
@karelhala

karelhala Aug 26, 2019

Author Contributor

Sure thing!

@karelhala karelhala force-pushed the karelhala:drawer-improvements branch from 4c1ab7d to c76b11b Aug 26, 2019
@karelhala karelhala requested review from redallen and jschuler Aug 26, 2019
Copy link
Contributor

redallen left a comment

LGTM

Copy link
Contributor

kmcfaul left a comment

LGTM

@dlabaj
dlabaj approved these changes Aug 30, 2019
Copy link
Contributor

dlabaj left a comment

Thanks @karelhala I like this better then the original. Thanks for making the updates.

@dlabaj dlabaj merged commit fad9cc6 into patternfly:master Aug 30, 2019
8 checks passed
8 checks passed
ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: build_integration Your tests passed on CircleCI!
Details
ci/circleci: build_pf3_docs Your tests passed on CircleCI!
Details
ci/circleci: build_pf4_docs Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: test_jest_other Your tests passed on CircleCI!
Details
ci/circleci: test_jest_pf4 Your tests passed on CircleCI!
Details
ci/circleci: upload_docs Your tests passed on CircleCI!
Details
@patternfly-build

This comment has been minimized.

Copy link
Contributor

patternfly-build commented Aug 30, 2019

Your changes have been released in:

  • @patternfly/react-core@3.95.0
  • @patternfly/react-docs@4.10.35
  • @patternfly/react-inline-edit-extension@2.11.10
  • demo-app-ts@2.21.14
  • @patternfly/react-table@2.19.10
  • @patternfly/react-topology@2.8.10
  • @patternfly/react-virtualized-extension@1.1.141

Thanks for your contribution! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.