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

Tooltip - separate "floating" component and optimise documentation in code #860

Closed
10 tasks done
thrbnhrtmnn opened this issue Jan 31, 2024 · 3 comments · Fixed by #1076
Closed
10 tasks done

Tooltip - separate "floating" component and optimise documentation in code #860

thrbnhrtmnn opened this issue Jan 31, 2024 · 3 comments · Fixed by #1076
Assignees
Labels
⭕ core team issue This is for the core team and should not be done by contributors ⌨️ dev issue Task is for developers 🎓 junior issue Good for juniors 📋 task::ready Task is ready to be picked up or planned in
Milestone

Comments

@thrbnhrtmnn
Copy link
Contributor

thrbnhrtmnn commented Jan 31, 2024

Description / User story

After the discussion on 31.01. about #303 and #742 we made a few decisions how components should be structured. The goal is to also be aligned between design and code.

Currently the Tooltip is not aligned, as there are two components in code but only one in design. This ticket is to optimise the current situation and to follow the new rules.

One decision could be to completely rename the current Tooltip component in code, as it basically is just a reference to the tooltip and provides the needed logic to place the component for example in a slider.

Requirements

Acceptance Criteria

  • Tooltip Bubble has been removed in storybook and in the codebase
  • Tooltip is now the only tooltip component in Storybook and in the codebase
  • The tooltip documentation has been updated:
    • "Floating UI" in the intro text links to the floating ui documentation
    • The dependencies section has been removed (also in the Table of Content)
    • The placement prop description in the props panel has been updated to:

      Select preferred placement of the component to the related element. If the preferred placement is not in the viewport, the component will adjust the placement on its own.

    • The text in the placement documentation should be updated to:

      The Tooltip component can be positioned in any of the following placements: top, top-start, top-end, right, right-start, right-end, bottom, bottom-start, bottom-end, left, left-start, and left-end. Via the placement prop you can select your preferred placement, which the component will display when the viewport allows it. If the preferred placement is not in the viewport, the component will adjust the placement on its own.

Additional information

Pseudo Code / Architecture

Screenshot 2024-03-06 at 14 50 23

Code of Conduct

  • I agree to follow this project's Code of Conduct
@thrbnhrtmnn thrbnhrtmnn added 🎓 junior issue Good for juniors ⌨️ dev issue Task is for developers ⭕ core team issue This is for the core team and should not be done by contributors 🚫 blocked This issue is blocked labels Jan 31, 2024
@thrbnhrtmnn thrbnhrtmnn added this to the Beta Release milestone Jan 31, 2024
@thrbnhrtmnn thrbnhrtmnn modified the milestones: Beta Release, Release 1.0 Feb 1, 2024
@thrbnhrtmnn thrbnhrtmnn removed the 🚫 blocked This issue is blocked label Feb 22, 2024
@thrbnhrtmnn thrbnhrtmnn added the 📋 task::ready Task is ready to be picked up or planned in label Feb 29, 2024
@thrbnhrtmnn thrbnhrtmnn changed the title Tooltip - optimise documentation Tooltip - separate "floating" component and optimise documentation in code Feb 29, 2024
@veilvokay veilvokay self-assigned this Mar 4, 2024
@thrbnhrtmnn thrbnhrtmnn removed this from the Release 1.0 milestone Mar 7, 2024
@veilvokay veilvokay self-assigned this Mar 8, 2024
@thrbnhrtmnn thrbnhrtmnn added this to the v1.1 milestone Mar 15, 2024
@thrbnhrtmnn thrbnhrtmnn modified the milestones: v1.1, v0.4.0 Mar 26, 2024
@thrbnhrtmnn
Copy link
Contributor Author

@veilvokay was working on this before, so there might be something to work with then already when starting this task. It might make sense to check out the tooltipp-refactor-playground branch

@thrbnhrtmnn
Copy link
Contributor Author

Updated the ACs as discused @angsherpa456

@thrbnhrtmnn
Copy link
Contributor Author

thrbnhrtmnn commented Apr 17, 2024

As discussed with @faselbaum today, we should change the approach again, sorry for the confusion @angsherpa456 .

New idea: We remove the tooltip bubble and only keep the tooltip component. This makes more sense, as this component is way smarter then the tooltip bubble component. The argument, that the tooltip bubble is the equivalent to the tooltip in design is flawed, as most of our components like i.e. the number input have logic, which is not part of the component in design (i.e. clicking the stepper increases or decreases the value). Similar topic for the tooltip, here the logic for the placement of the tooltip is solved in code with the help of the floating ui library, whereas in design this is done by functionality in Figma (i.e. making the component wrapper hugging the referencing element).

This new approach would now lead to the following ACs (incl. minor optimisations of the documentation):

  • Tooltip Bubble has been removed in storybook and in the codebase
  • Tooltip is now the only tooltip component in Storybook and in the codebase
  • The tooltip documentation has been updated:
    • "Floating UI" in the intro text links to the floating ui documentation
    • The dependencies section has been removed (also in the Table of Content)
    • The placement prop description in the props panel has been updated to:

      Select preferred placement of the component to the related element. If the preferred placement is not in the viewport, the component will adjust the placement on its own.

    • The text in the placement documentation should be updated to:

      The Tooltip component can be positioned in any of the following placements: top, top-start, top-end, right, right-start, right-end, bottom, bottom-start, bottom-end, left, left-start, and left-end. Via the placement prop you can select your preferred placement, which the component will display when the viewport allows it. If the preferred placement is not in the viewport, the component will adjust the placement on its own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⭕ core team issue This is for the core team and should not be done by contributors ⌨️ dev issue Task is for developers 🎓 junior issue Good for juniors 📋 task::ready Task is ready to be picked up or planned in
Projects
None yet
3 participants