-
Notifications
You must be signed in to change notification settings - Fork 171
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
Display generated tags separately #4291
base: main
Are you sure you want to change the base?
Conversation
720dbc2
to
a4a043a
Compare
@obulat this looks great with the exception of an (existing) spacing issue that becomes more apparent when we add a text label above the tags. Observe that the "Source" and "Source Tags" text labels are not in alignment. "Source" is 0.25rem to the right of "Source Tags". I think we just need to remove horizontal padding from the |
I think an IP would still be good, even just as a decision log for some of the questions/points that were made in the project proposal. It would not have to be a big document IMO! |
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.
This looks good when I run it locally! One question about some other information we have available for the generated tags.
<li v-for="tag in visibleTags" :key="tag"> | ||
<VTag :href="localizedTagPath(tag)">{{ tag }}</VTag> | ||
</li> |
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.
Since we have accuracy
and provider
information available on the tags, one of the thoughts I had when thinking about how these results would manifest in the frontend was how we might be able to convey that information too. I mentioned it in the initial design issue, but I'm wondering - could the individual tags (at least for the generated section) maybe also have Source: <provider>, Accuracy: <accuracy>%
tooltips available on them?
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 like the idea of a tooltip. That should probably be decided on in the IP though 🤔
This PR is simple enough as is, and improves the current frontend (we disclose the clarifai tags) that maybe we should get it merged as is? Alternatively, we draft it and wait for the IP.
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 drafting and waiting for the IP is the best move IMO!
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 don't fully understand the idea. Would you mind sharing an example or making a quick draw?
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.
Forgive the poor design quality, but this is the sort of thing I had in mind when I wrote this comment:
I imagine there might be some way to include this information in an accessible way, like perhaps as part of the item's label? But this felt like a good way to still surface that information without visual overload.
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.
Very clear mockup. Thanks @AetherUnbound
c8b39e0
to
f262ee9
Compare
To @zackkrida's point
If I recall correctly, we intentionally added this spacing to avoid cropping links' focus ring. In this case, the We can add the same spacing in this section to make it look align. Or perhaps, and correct me if I'm wrong, investigate how to fix this site-wise issue and stop us from adding empty spacings that could break the layout. |
cc4dabd
to
12bdfa4
Compare
I added a negative margin to the "Source" or "Provider" (whichever comes first) to fix this. You can see in the snapshots that they are aligned now. Now, I looked at the snapshots again, and I feel like the tags headings are fine when there are both source and generated tags. However, when there are only source tags, the "Source tags" heading is not very clear. Why are they called "source" tags? And since the "What it is?" link is only available on the Generated tags, it is not possible to navigate to the explanation page. What do you think, @fcoveram? |
I think we can safely remove the "Source tags" heading when there are no machine-generated tags. The pill set in the media details area is common content in stock and other similar services and does not need further explanation. |
97fd532
to
15cb517
Compare
Updated in 15cb517. I also added a screen-reader-only "Tags" heading. |
Signed-off-by: Olga Bulat <obulat@gmail.com>
Signed-off-by: Olga Bulat <obulat@gmail.com>
Signed-off-by: Olga Bulat <obulat@gmail.com>
Signed-off-by: Olga Bulat <obulat@gmail.com>
15cb517
to
ad2eb8b
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>
Signed-off-by: Olga Bulat <obulat@gmail.com>
Signed-off-by: Olga Bulat <obulat@gmail.com>
ad2eb8b
to
2e40317
Compare
Fixes
Fixes #4192 by @fcoveram
Description
This PR adds a separate display of machine-generated tags and tags provided by sources on the single result page following the Figma mockups.
Based on @fcoveram's suggestion, if the item only has source tags, the tags section doesn't have a visible heading.
I started to write the implementation plan for the frontend feature, but realized that this can be done in a single PR. As the project lead, do you think we need a frontend IP, @AetherUnbound?This PR is blocked on #4379 because it has a link to the "About tags" page, but the page is not ready.
Another blocker is the text for this link. Currently, the link says "What is this?"; suggestions for the text are welcome.
The PR can be reviewed but should not be merged before #4379 is done.
Testing instructions
Run the app using
just frontend/run dev
(runningdev:only
would not update the English strings, so you would need to rundev
at least once)Go to http://localhost:8443/image/a487f4eb-ce05-43e1-acae-73c4ab090cc9 to see how machine-generated and source tags are displayed.