-
Notifications
You must be signed in to change notification settings - Fork 198
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
Add source and provider definition tooltips #3407
Conversation
Size Change: +15.6 kB (+2%) Total Size: 1.04 MB
ℹ️ View Unchanged
|
11f5aa6
to
ca3307b
Compare
0fd143e
to
e42599b
Compare
ca3307b
to
cdc5bf4
Compare
66a8fb0
to
ba5db45
Compare
697941e
to
cfbb408
Compare
cfbb408
to
b12da11
Compare
b12da11
to
de98800
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looked over the code and it (mostly) makes sense to me 😄 tool tips show up great when testing locally!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed two minor details that polish the layout. All the rest look great 👌
<template> | ||
<dt> | ||
{{ $t(datum.label) }} | ||
<VTooltip placement="top" :describedby="describedby" class="ms-2"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this class adds a margin-left of 8px instead of 4px. ms-1
should fix it I think.
<dl v-if="isSm" class="metadata grid gap-8" :style="columnCount"> | ||
<div v-for="datum in metadata" :key="`${datum.label}`"> | ||
<dt class="label-regular mb-1 ps-1">{{ $t(datum.label) }}</dt> | ||
<div v-for="datum in metadata" :key="datum.label"> | ||
<VSourceProviderTooltip | ||
v-if="tooltipId(datum)" | ||
:describedby="tooltipId(datum)" | ||
class="label-regular mb-1 flex flex-row ps-1" | ||
:datum="datum" | ||
/> | ||
<dt v-else class="label-regular mb-1 flex flex-row ps-1"> | ||
{{ $t(datum.label) }} | ||
</dt> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The info icon is not horizontally centered. I tried the following in Chrome inspector, and it looked good:
- Added
items-center
- Just in
xs
, I added a padding of 4px to top, right, and bottom indt
element. For bigger breakpoints,ps-1
works correctly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, @fcoveram , I didn't mean to re-request your review yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem!
0e776d2
to
f3a88b0
Compare
Based on the high urgency of this PR, the following reviewers are being gently reminded to review this PR: @fcoveram Excluding weekend1 days, this PR was ready for review 19 day(s) ago. PRs labelled with high urgency are expected to be reviewed within 2 weekday(s)2. @obulat, if this PR is not ready for a review, please draft it to prevent reviewers from getting further unnecessary pings. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, except to small notes. Nothing to block!
return i18n.t( | ||
props.datum.name === "source" | ||
? "mediaDetails.sourceDescription" | ||
: "mediaDetails.providerDescription" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return i18n.t( | |
props.datum.name === "source" | |
? "mediaDetails.sourceDescription" | |
: "mediaDetails.providerDescription" | |
) | |
return i18n.t(`mediaDetails.${props.datum.name}Description`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Static keys can be checked by vue-i18n-extract
`. It does not handle dynamic keys like this well.
f3a88b0
to
cca1c12
Compare
Signed-off-by: Olga Bulat <obulat@gmail.com>
Signed-off-by: Olga Bulat <obulat@gmail.com>
Signed-off-by: Olga Bulat <obulat@gmail.com>
cca1c12
to
3c29195
Compare
Fixes
Fixes #2775 by @fcoveram
Fixes #2840 by @fcoveram
Description
Adds the tooltip that opens when you focus or hover over the (i) symbol next to the Provider or Source in the single result page:
I just realized that the provider definition would not be correct when/if we extract sources from Europeana: here, Europeana is an aggregator which allows us to search for images, but the images themselves are hosted on the source sites, not Europeana.
The tooltip
Here are the Figma links to:
hover
stateAccessibility considerations
WAI ARIA guidelines
Testing Instructions
Checklist
Update index.md
).main
) or a parent feature branch.Developer Certificate of Origin
Developer Certificate of Origin