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

ToggleTip #10280

Closed
Tracked by #9901
tay1orjones opened this issue Dec 13, 2021 · 0 comments · Fixed by #10365
Closed
Tracked by #9901

ToggleTip #10280

tay1orjones opened this issue Dec 13, 2021 · 0 comments · Fixed by #10365
Assignees
Labels
component: tooltip package: @carbon/react @carbon/react version: 11 Issues pertaining to Carbon v11

Comments

@tay1orjones
Copy link
Member

tay1orjones commented Dec 13, 2021

About

This component replaces the interactive use-case of the Tooltip component. Specifically, tooltips may no longer have interactive descendants. As a result, this component allows users to have interactive descendants in popovers using a disclosure pattern. This component toggles the visibility of the popover by clicking on the trigger.

Behavior

  • The trigger for the toggletip receives focus
  • The trigger toggles the visibility of the toggletip through:
    • Mouse click
    • Keyboard enter, space
  • The toggletip may be dismissed on:
    • Keyboard Escape
    • Blur
    • Click away from toggletip or trigger
  • Customizable icon?

Public API

We will deliver several components for Toggletip:

  • Toggletip
  • ToggletipLabel
  • ToggletipButton
  • ToggletipContent

Existing API

<Tooltip triggerText="..." renderIcon={...}>
  <p>Lorem ipsum</p>
  <div className="bx--tooltip__footer">
    <Link />
    <Button />
  </div>
</Tooltip>

Proposed API

<ToggletipLabel>Label</ToggletipLabel>
<Toggletip>
  <ToggletipButton>ICON</ToggletipButton>
  <ToggletipContent>
    ...
    <ToggletipActions>
    </ToggletipActions>
  </ToggletipContent>
</Toggletip>

Open questions

  • How do we allow this component to be flexible for different targets and layouts?
  • What specific layouts would we like to provide?
  • What layering rules should this component adhere to? Is it always on top, z-index wise?

Links & Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: tooltip package: @carbon/react @carbon/react version: 11 Issues pertaining to Carbon v11
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants