Skip to content

Commit

Permalink
Add always-showing success tooltip
Browse files Browse the repository at this point in the history
I’m trying out this UX as seen on GitHub PR pages. Easily
removed if undesirable!
  • Loading branch information
backspace committed Jul 5, 2019
1 parent 190a20a commit 11afd99
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 4 additions & 2 deletions ui/app/styles/components/tooltip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@
transition: top 0.1s ease-in-out;
}

.tooltip:hover::after {
.tooltip:hover::after,
.tooltip.always-active::after {
opacity: 1;
bottom: 120%;
}

.tooltip:hover::before {
.tooltip:hover::before,
.tooltip.always-active::before {
opacity: 1;
top: -20%;
}
6 changes: 5 additions & 1 deletion ui/app/templates/components/x-copy-button.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{{! FIXME copy-button is taken by ember-cli-clipboard, but… 🤔 }}
{{#if (eq state 'success')}}
<div class='button is-borderless is-small'>{{x-icon 'copy-success'}}</div>
<div class='button is-borderless is-small'>
<span class="tooltip text-center always-active" role="tooltip" aria-label="Copied!">
{{x-icon 'copy-success'}}
</span>
</div>
{{else if (eq state 'error')}}
{{x-icon 'alert-triangle'}}
{{else}}
Expand Down

0 comments on commit 11afd99

Please sign in to comment.