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

IPopoverSharedProps used by Popover and Tooltip, some prop renames #2617

Merged
merged 6 commits into from
Jun 20, 2018

Conversation

giladgray
Copy link
Contributor

@giladgray giladgray commented Jun 20, 2018

pulling out the renames from #2609 and unifying the props interfaces between Popover and Tooltip.

Changes proposed in this pull request:

  • IPopoverSharedProps for the common Popover/Tooltip bits
  • 🔥 rootElementTag => wrapperTagName
  • 🔥 targetElementTag => targetTagName
  • 🔥 tooltipClassName => popoverClassName

@blueprint-bot
Copy link

export popoverSharedProps, fix ContextMenu

Preview: documentation | landing | table

@@ -13,7 +13,8 @@ import * as Classes from "../../common/classes";
import { Position } from "../../common/position";
import { safeInvoke } from "../../common/utils";
import { IOverlayLifecycleProps } from "../overlay/overlay";
import { Popover, PopperModifiers } from "../popover/popover";
import { Popover } from "../popover/popover";
import { PopperModifiers } from "../popover/popoverSharedProps";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

thoughts on the best place for this symbol to live?

@blueprint-bot
Copy link

add upgrade script entries

Preview: documentation | landing | table

@giladgray giladgray merged commit f111cdc into develop Jun 20, 2018
@giladgray giladgray deleted the gg/popover-shared-props branch June 20, 2018 22:16
@@ -0,0 +1,140 @@
/*
Copy link
Member

Choose a reason for hiding this comment

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

not sure about conventions here but this file doesn't need to be a tsx file.

import { IOverlayableProps } from "../overlay/overlay";

// re-export this symbol for library consumers
export { PopperModifiers };
Copy link
Member

Choose a reason for hiding this comment

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

seems fine to live here

* The target element to which the popover content is attached.
* This can instead be provided as the first `children` element.
* The target to which the popover content is attached. This can instead be
* provided as the _first_ element in `children`.
*/
target?: string | JSX.Element;
Copy link
Member

Choose a reason for hiding this comment

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

Why are content and target not also shared?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you'll notice they work differently. Tooltip does not support a target prop (passed via children) and it requires content prop.

i guess they could be unified... thoughts?

Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason for the API difference even though behavior is the same?

MGHawes added a commit to MGHawes/blueprint that referenced this pull request Feb 10, 2019
In pr [palantir#2617](palantir#2617 the type of the `onInteraction` prop was [changed](palantir@f111cdc#diff-526f9b7061d074b106ee2b67a5dafc14L122) to no longer include the event as the second argument (added as part of [palantir#2340](palantir#2430)). However the the code still [conforms to the previous interface](https://github.com/palantir/blueprint/blob/9728e61b420eda381cedce06166a4caf6b958bc4/packages/core/src/components/popover/popover.tsx#L501). All I've done is change it back to what it was 🙂
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants