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

Popover design for popovers in in text #2781

Closed
2 tasks
Tracked by #2825
eirikbacker opened this issue Nov 14, 2024 · 6 comments · Fixed by #2915
Closed
2 tasks
Tracked by #2825

Popover design for popovers in in text #2781

eirikbacker opened this issue Nov 14, 2024 · 6 comments · Fixed by #2915
Assignees
Labels
🎨 figma Everything related to changes in Figma 🕵️ investigate Needs investigation

Comments

@eirikbacker
Copy link
Contributor

eirikbacker commented Nov 14, 2024

Tooltips can be placed around raw text. This is how Mattilsynet is using Tooltip in most situations: we have so many complicated terms, or terms that can be interpreted in different ways, or used in different was across different countries, but we need to use them due to legal regulations. In these scenarios, we use tooltip like:

Please contact the <Tooltip content="…">freight forwarder</Tooltip>
for information about the <Tooltip content="…">export certificate</Tooltip>.

But there is no design for how this should look. Maybe we should have a standard if placed around text? dashed underline is a pretty wide spread convention :)

Tasks

Preview Give feedback
@eirikbacker eirikbacker converted this from a draft issue Nov 14, 2024
@eirikbacker eirikbacker moved this from 🔵 Inbox to 📄 Todo in Team Designsystemet Nov 14, 2024
@eirikbacker eirikbacker added 🎨 figma Everything related to changes in Figma 🕵️ investigate Needs investigation labels Nov 14, 2024
@mrosvik
Copy link
Member

mrosvik commented Nov 22, 2024

@eirikbacker

Should we use popover instead of tooltip for word definitions? 🤔

Example from vg:
Image

I think we need a common understanding of when to use tooltip and when to use popovers.

@eirikbacker
Copy link
Contributor Author

Good point, and maybe even consolidate or make a good distinction for the team? This might be easier to discuss live in a meeting?

@mrosvik
Copy link
Member

mrosvik commented Dec 9, 2024

Meeting Notes 29.11.24
Viveca, Lasse, Marianne, Eirik

We agreed to recommend using popovers for word explanations.

The reason is that tooltips appear on hover, have an inverted background, and should therefore not contain more than 4 words. Popovers, on the other hand, can include a paragraph of text and interactive elements such as buttons. For example, in a situation where we ask the user to confirm the deletion of a row in a table, the popover can include confirmation text along with a "Delete" button and a "Cancel" button.

To indicate that a word in an article has an associated popover, we will use a dashed underline for the word. This style will be created as a typography style called popover-link(?), which can be applied to a word. We must ensure that this is documented.

Tooltip Guidelines:

  • Should explain that tooltips are used only for short and concise information, typically a few words to to clarify a symbol.

Popover Guidelines:

  • Should explain that popovers are used for more extensive information (but maximum one paragraph) or when interaction is required (e.g., links, buttons, or choices).
  • Should include guidance on using the popover-link typography style alongside popovers for word explanations.
  • Suggest adding an example in Storybook demonstrating this use case.

HelpText Documentation:

  • Should be updated to reflect that if a word needs to be explained, the recommended approach is to use popover-link + popover.

@Febakke @eirikbacker @Viveca24 Feel free to add anything if I've missed or misunderstood something.

@mrosvik mrosvik changed the title Tooltip design for tooltips in in text Popover design for popovers in in text Dec 13, 2024
@mrosvik
Copy link
Member

mrosvik commented Dec 16, 2024

Name: popover.triggertext ?

@Barsnes
Copy link
Member

Barsnes commented Dec 16, 2024

Meeting 2024.12.16 @mrosvik @Barsnes @mimarz @Viveca24
We have decided to go with a class as a first step.
Will be put directly on our trigger (button)

@Barsnes Barsnes moved this from 🏗 In progress to 👀 Ready for review in Team Designsystemet Dec 19, 2024
@github-project-automation github-project-automation bot moved this from 👀 Ready for review to ✅ Done in Team Designsystemet Dec 19, 2024
@Febakke
Copy link
Member

Febakke commented Dec 20, 2024

Figma component is still not completed. Reopening this.

@Febakke Febakke reopened this Dec 20, 2024
@github-project-automation github-project-automation bot moved this from ✅ Done to 🔵 Inbox in Team Designsystemet Dec 20, 2024
@Febakke Febakke moved this from 🔵 Inbox to 🏗 In progress in Team Designsystemet Dec 20, 2024
@mimarz mimarz modified the milestones: V1 - Must-have, V1 - Helhetlig komponentbibliotek Jan 3, 2025
@Viveca24 Viveca24 moved this from 🏗 In progress to 👀 Ready for review in Team Designsystemet Jan 3, 2025
@mrosvik mrosvik closed this as completed Jan 6, 2025
@github-project-automation github-project-automation bot moved this from 👀 Ready for review to ✅ Done in Team Designsystemet Jan 6, 2025
@mrosvik mrosvik modified the milestones: Helhetlig komponentbibliotek, V1 - Lansering Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎨 figma Everything related to changes in Figma 🕵️ investigate Needs investigation
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

6 participants