-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tooltips for contextual help in ping and metric fields (fixes #293)…
… (#300) Co-authored-by: William Lachance <[email protected]>
- Loading branch information
Showing
7 changed files
with
93 additions
and
5 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<script> | ||
import tippy from "sveltejs-tippy"; | ||
import InfoIcon from "./icons/InfoIcon.svelte"; | ||
export let content; | ||
export let link; | ||
let props = { | ||
content, | ||
allowHTML: true, | ||
placement: "top", | ||
}; | ||
</script> | ||
|
||
<style> | ||
.main { | ||
@apply inline-block; | ||
@apply text-gray-500; | ||
} | ||
</style> | ||
|
||
<div class="main"> | ||
<a href={link} use:tippy={props}> | ||
<InfoIcon /> | ||
</a> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
viewBox="0 0 20 20" | ||
fill="currentColor" | ||
class="w-5 inline-block"> | ||
<path | ||
fill-rule="evenodd" | ||
d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" | ||
clip-rule="evenodd" /> | ||
</svg> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export default { | ||
bugs: { | ||
text: | ||
"Required. A list of bugs (e.g. Bugzilla or GitHub) that are relevant to this metric. For example, bugs that track its original implementation or later changes to it.", | ||
link: "https://mozilla.github.io/glean/book/user/metric-parameters.html", | ||
}, | ||
lifetime: { | ||
text: | ||
"Defines the lifetime of the metric. Different lifetimes affect when the metrics value is reset.", | ||
link: "https://mozilla.github.io/glean/book/user/metric-parameters.html", | ||
}, | ||
send_in_pings: { | ||
text: | ||
"Defines which pings the metric should be sent on. If not specified, the metric is sent on the 'default ping', which is the events ping for events and the metrics ping for everything else. Most metrics don't need to specify this unless they are sent on custom pings.", | ||
link: "https://mozilla.github.io/glean/book/user/metric-parameters.html", | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters