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

fix(tooltip): allow manual trigger, access to tippy.js props #2769

Merged
merged 1 commit into from Aug 26, 2019

Conversation

@jeff-phillips-18
Copy link
Member

jeff-phillips-18 commented Aug 23, 2019

What:
Allows passing properties through to PopoverBase and hence tippy.js
Adds the manual trigger option with the isVisible prop.

@patternfly-build

This comment has been minimized.

Copy link
Contributor

patternfly-build commented Aug 23, 2019

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

@jeff-phillips-18 jeff-phillips-18 force-pushed the jeff-phillips-18:tooltip-props branch from 28dcad7 to 4f26d39 Aug 23, 2019
@jeff-phillips-18 jeff-phillips-18 changed the title fix(tooltip): allow manul trigger, access to tippy.js props fix(tooltip): allow manual trigger, access to tippy.js props Aug 23, 2019
/** z-index of the tooltip */
zIndex?: number;
/** additional Props to pass through to tippy.js */
tippyProps?: TippyProps;

This comment has been minimized.

Copy link
@jschuler

jschuler Aug 23, 2019

Collaborator

i think we should just add what we need in terms of props instead of a passthrough? otherwise could be more maintenance if some tippy props don't behave as expected in our component

This comment has been minimized.

Copy link
@jeff-phillips-18

jeff-phillips-18 Aug 23, 2019

Author Member

I think it's better to allow the full set to be passed thru. How can we know up front which props consumers want to customize? Limiting the options will cause limits to its adoptability. If there are any issues with using a particular prop, then an issue can be raised.

This comment has been minimized.

Copy link
@jschuler

jschuler Aug 23, 2019

Collaborator

what about the fact that there'll be duplicate props, for example we expose enableFlip which would be the same as tippyProps.flip

This comment has been minimized.

Copy link
@jeff-phillips-18

jeff-phillips-18 Aug 23, 2019

Author Member

whatever props we accept/set will override what is in the tippyProps

This comment has been minimized.

Copy link
@jschuler

jschuler Aug 23, 2019

Collaborator

okay let's go with this, can you also add the passthrough to the Popover component as well then? Thanks

@jeff-phillips-18 jeff-phillips-18 force-pushed the jeff-phillips-18:tooltip-props branch from 4f26d39 to 2e2f35a Aug 26, 2019
@jeff-phillips-18

This comment has been minimized.

Copy link
Member Author

jeff-phillips-18 commented Aug 26, 2019

@jschuler @dtaylor113 Added passthru props to the Popover component as well.

@jeff-phillips-18 jeff-phillips-18 force-pushed the jeff-phillips-18:tooltip-props branch from 2e2f35a to c62200a Aug 26, 2019
@jschuler jschuler merged commit de6b211 into patternfly:master Aug 26, 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 26, 2019

Your changes have been released in:

  • @patternfly/react-core@3.92.1
  • @patternfly/react-docs@4.10.26
  • @patternfly/react-inline-edit-extension@2.11.1
  • demo-app-ts@2.21.5
  • @patternfly/react-table@2.19.1
  • @patternfly/react-topology@2.8.1
  • @patternfly/react-virtualized-extension@1.1.132

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
4 participants
You can’t perform that action at this time.