Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Add interactive tooltip style #3131

Merged
merged 4 commits into from
Jun 24, 2019
Merged

Add interactive tooltip style #3131

merged 4 commits into from
Jun 24, 2019

Conversation

jryans
Copy link
Collaborator

@jryans jryans commented Jun 21, 2019

The adds the basic look and feel of a new interactive tooltip to used for reactions and editing. There's currently no usage code in this PR, but that will be added shortly as part of further work in element-hq/element-web#9753.

2019-06-21 at 15 11

Part of element-hq/element-web#9716
Part of element-hq/element-web#9753

As part of reactions and editing work, we're adding a new style of tooltip that
allows interacting with the content of the tooltip.  `ContextualMenu` is closest
out of the things we have today, but it doesn't position in quite the way we
want and it's already quite complex.

To get started, let's first clone that to a new `InteractiveTooltip`.

Part of element-hq/element-web#9753
Part of element-hq/element-web#9716
This adjusts the positioning to work more the way we want:

* Tooltip is position on the top or bottom edge of the target depending on where
  space is available
* Tooltip and chevron are centered

In addition, more bits borrowed from `ContextualMenu` are not needed, so they
have been removed for simplicity.

Part of element-hq/element-web#9753
Part of element-hq/element-web#9716
This tweaks the tooltip to match the color, spacing, etc. seen in the designs.

Part of element-hq/element-web#9753
Part of element-hq/element-web#9716
We'd like to have a rounded point on the chevron for an extra level of polish.
This implements that look for browsers that support `clip-path`.

Part of element-hq/element-web#9716
@t3chguy
Copy link
Member

t3chguy commented Jun 21, 2019

I feel like this one would fit well for the Copied! in the Share Dialog :D

@jryans
Copy link
Collaborator Author

jryans commented Jun 24, 2019

I'll go ahead and merge this, but I am planning to rework the API surface to improve interactivity and make it feel more like a normal React component, so you may want to check with me first if you really want to use in the next few days to avoid conflicts.

@jryans jryans merged commit f366f7d into develop Jun 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants