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

Move tooltips to the design package #49544

Merged
merged 10 commits into from
Dec 4, 2024
Merged

Move tooltips to the design package #49544

merged 10 commits into from
Dec 4, 2024

Conversation

bl-nero
Copy link
Contributor

@bl-nero bl-nero commented Nov 28, 2024

They will be later required in the SlideTabs component, and that one is in design, too.

Requires #49543 (not on its own, but because it's a part of a larger PR train)
Followed up by #49545
Followed up by https://github.com/gravitational/teleport.e/pull/5593 (cleanup)
Contributes to #46612

Adds a model-level validation capability to our validation library.
They will be later required in the SlideTabs component
@bl-nero bl-nero added the no-changelog Indicates that a PR does not require a changelog entry label Nov 28, 2024
@bl-nero bl-nero marked this pull request as ready for review November 28, 2024 15:16
@github-actions github-actions bot requested review from avatus and kiosion November 28, 2024 15:17
web/packages/design/src/ToolTip/ToolTip.story.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you know what's the difference between HoverTooltip and ToolTipInfo? They seem to behave identical in the story 🤔 Maybe we should remove or deprecate one of them?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They behave in a similar, if not identical manner, but they have different interfaces, because ToolTipInfo is a specialized case for displaying icons with tooltips. It's used in places like field labels. I was there once, when I was working on modernizing these, and I also had a brief reflex to unify them. To my surprise, the result of my unification attempt was uglier and more complex than the original, and required a lot of refactoring of its usage, so I decided to keep these two separate.

Copy link
Contributor

Choose a reason for hiding this comment

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

What would you think of renaming TooltipInfo to IconTooltip then? I'm not sure if Info provides any value.
But if it's too much for this PR we can leave it as is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems like a good idea. I'll do it.

web/packages/design/src/ToolTip/ToolTip.tsx Outdated Show resolved Hide resolved
@bl-nero bl-nero requested a review from gzdunek November 28, 2024 17:58
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from kiosion December 2, 2024 14:51
Base automatically changed from bl-nero/validation to master December 4, 2024 15:07
@bl-nero bl-nero added this pull request to the merge queue Dec 4, 2024
Merged via the queue into master with commit db9505d Dec 4, 2024
41 checks passed
@bl-nero bl-nero deleted the bl-nero/tooltips branch December 4, 2024 18:11
@public-teleport-github-review-bot

@bl-nero See the table below for backport results.

Branch Result
branch/v17 Failed

bl-nero added a commit that referenced this pull request Dec 5, 2024
* Validation

Adds a model-level validation capability to our validation library.

* Move tooltips to the design package

They will be later required in the SlideTabs component

* Review

* Also, rename the tooltip directory

* Also, rename the tooltip component

* review

* Never return undefined from useValidation()
github-merge-queue bot pushed a commit that referenced this pull request Dec 6, 2024
* Validation

Adds a model-level validation capability to our validation library.

* Move tooltips to the design package

They will be later required in the SlideTabs component

* Review

* Also, rename the tooltip directory

* Also, rename the tooltip component

* review

* Never return undefined from useValidation()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/branch/v17 no-changelog Indicates that a PR does not require a changelog entry size/sm ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants