OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Update Tooltip.stories.mdx
Parimal Satyal6bb7d12ae732
diff --git a/frontend/src/app/spot/components/tooltip/stories/Tooltip.stories.mdx b/frontend/src/app/spot/components/tooltip/stories/Tooltip.stories.mdxindex 2b384d52e91..2907fc8bdb6 100644--- a/frontend/src/app/spot/components/tooltip/stories/Tooltip.stories.mdx+++ b/frontend/src/app/spot/components/tooltip/stories/Tooltip.stories.mdx@@ -25,23 +25,21 @@ import { SbTooltipComponent } from './Tooltip.component';# Tooltip-> Example of a tooltip+> Example of a tooltip, configurable (info tooltip, text: "This is the current project you are in.")The tooltip provides additional textual context on hover over interactive elements.This context can be used to provide additional information (hover over a "help" icon) or to signal state information (for example, if a certain item is disabled).-By default, they take 100% of the width of the containing element. However, max-width should be specified manually for each tooltip, depending on the circumstances and placement of the element.+By default, the tooltip takes 80% of the width of the container. This can be overridden if needed.> Eg. Tooltip on a file list, on a file that is not available due to permissions issues## Structure and Options-The tooltip is simply a text label.+Tooltips have a sky blue background in the default theme (_Feedback/Info/Light_). A darker version is available is but currently not used.-Tooltips by default have a dark gray background (_Gray 1: #333_), but a lighter version is also available with a sky blue background in the default theme (_Feedback/Info/Light_).--> Example of a tooltip with a light background+> Example of the darker oneexport const Template = (args) => ({parameters: {@@ -71,19 +69,33 @@ export const Template = (args) => ({## Behaviour-The tooltip appears next to the item being hovered (which must never be covered), but does not follow the cursor. Hovering out of the element that triggered it will cause the tooltip disappear.+The tooltip should appear either above or below the item being hovered. By default, it will be displayed above, left-aligned. This can be manually changed to these alternative positions:-Tooltips automatically align themselves to the top or the bottom of the element it is attached to, depending on the positioning of the element in the viewport.+- Above, left-aligned+- Above, center-aligned+- Above, right-aligned+- Below, left-aligned+- Below, center-aligned+- Below, right- aligned-## Margins and Spacing+The item over which the user is hovering itself must never be covered. A tooltip' does not follow the cursor; its position is fixed as long as the user is hovering over the item. Hovering out of the element will cause the tooltip to disappear.++The tooltip will appear 200 ms after the user starts hovering and disappear 200 ms after the user has moved the cursor away, to avoid jittery behaviour.++The tooltip will automatically become multi-line if necessary (i.e, if the container does not have sufficient space).-A tooltip's width is generally determined by the containing text.+> Example: multi-line tooltip (so a very long one). Text: ""-However, due to technical limitations, there is a hard min-width of 20-rem and a max-width of 90vw. Tooltips shorter than 20-rem will have additional space on the rigth.+## Dos and Don'ts-The minimum width of the tooltip depends on the length of the text, and the maximum width depends on the width of the containing element.+A tooltip is, in its basic form, a line of text. However, it can also contain icons.++It must never contain interactive elements (a mouse pointer will not always be able to reach it).++## Margins and Spacing-A tooltip can be multi-line if necessary. It is never truncated.+A tooltip will never hug either side of the container; it will respect the internal padding of the that container.-> Eg. A long multi-line tooltip+> Position, in-tree or out-of-tree to be decided+Due to technical limitations, the minimum width of a tooltip is defined by its container (i.e, 80% of it). Tooltips with content shorter this width will have additional space on the right.