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

Add source, creator and tag links to the single result page media info #3338

Merged
merged 33 commits into from
Nov 27, 2023

Conversation

obulat
Copy link
Contributor

@obulat obulat commented Nov 11, 2023

Fixes

Fixes #2730 by @obulat

Description

This PR updates the single result page's creator, source and tag links to the new designs, linking them to the collection pages.

Audio

Screenshot 2023-11-13 at 12 33 00 PM

Image

Screenshot 2023-11-13 at 12 34 38 PM

If the creator and source names are longer than the page width, they become scrollable. Setting up the scrolling to work in both LTR and RTL was a bit complex.

Note that the link URLs will be updated after #3140 is merged because it's impossible to add a link to a localized page that does not exist (and we don't currently have pages for source/creator/tag collections).

Testing Instructions

Run the app
Go to localhost:8443/preferences and switch the additional_search_views flag on
Go to single result pages for audio and image.
The source, creator and tag should have an updated style with correct links (/image/tag/cat, /image/source/flickr, /image/source/flickr/creator/name). Note that i18n (linking to the correct locale if you are not on the English one) does not work yet because the pages for tag/source/creator do not exist yet. The links also do not open the pages because the pages are created in #3140
When the creator and the source name are longer than the available width, they become scrollable. To check, see http://localhost:8443/image/8c8f2318-acc8-477c-a059-34f44901933e?q=cat

Checklist

  • My pull request has a descriptive title (not a vague title likeUpdate index.md).
  • My pull request targets the default branch of the repository (main) or a parent feature branch.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.
  • I ran the DAG documentation generator (if applicable).

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@github-actions github-actions bot added 🧱 stack: documentation Related to Sphinx documentation 🧱 stack: frontend Related to the Nuxt frontend labels Nov 11, 2023
@openverse-bot openverse-bot added the 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work label Nov 11, 2023
Copy link

github-actions bot commented Nov 11, 2023

Size Change: +34.9 kB (+4%)

Total Size: 1.01 MB

Filename Size Change
./frontend/.nuxt/dist/client/242.js 0 B -343 B (removed) 🏆
./frontend/.nuxt/dist/client/242.modern.js 0 B -346 B (removed) 🏆
./frontend/.nuxt/dist/client/243.js 0 B -1.85 kB (removed) 🏆
./frontend/.nuxt/dist/client/app.js 132 kB +180 B (0%)
./frontend/.nuxt/dist/client/app.modern.js 123 kB +242 B (0%)
./frontend/.nuxt/dist/client/components/v-audio-track.js 5.15 kB -848 B (-14%) 👏
./frontend/.nuxt/dist/client/components/v-audio-track.modern.js 5.1 kB -859 B (-14%) 👏
./frontend/.nuxt/dist/client/components/v-full-layout.js 3.76 kB +2.1 kB (+127%) 🆘
./frontend/.nuxt/dist/client/components/v-full-layout.modern.js 3.74 kB +2.08 kB (+126%) 🆘
./frontend/.nuxt/dist/client/components/v-media-details.js 5.88 kB +37 B (+1%)
./frontend/.nuxt/dist/client/components/v-media-details.modern.js 5.73 kB +37 B (+1%)
./frontend/.nuxt/dist/client/components/v-media-tags.js 885 B +55 B (+7%) 🔍
./frontend/.nuxt/dist/client/components/v-media-tags.modern.js 883 B +59 B (+7%) 🔍
./frontend/.nuxt/dist/client/components/v-sources-table.js 15.2 kB +183 B (+1%)
./frontend/.nuxt/dist/client/components/v-sources-table.modern.js 15.3 kB +181 B (+1%)
./frontend/.nuxt/dist/client/pages/audio/_id/index.js 21 kB +3.48 kB (+20%) 🚨
./frontend/.nuxt/dist/client/pages/audio/_id/index.modern.js 19.7 kB +3.31 kB (+20%) 🚨
./frontend/.nuxt/dist/client/pages/image/_id/index.js 18.1 kB +1.92 kB (+12%) ⚠️
./frontend/.nuxt/dist/client/pages/image/_id/index.modern.js 16.7 kB +1.89 kB (+13%) ⚠️
./frontend/.nuxt/dist/client/runtime.js 2.87 kB +64 B (+2%)
./frontend/.nuxt/dist/client/runtime.modern.js 2.87 kB +62 B (+2%)
./frontend/.nuxt/dist/client/vendors/app.js 69 kB +495 B (+1%)
./frontend/.nuxt/dist/client/vendors/app.modern.js 68.5 kB +514 B (+1%)
./frontend/.nuxt/dist/client/247.js 343 B +343 B (new file) 🆕
./frontend/.nuxt/dist/client/247.modern.js 346 B +346 B (new file) 🆕
./frontend/.nuxt/dist/client/248.js 1.85 kB +1.85 kB (new file) 🆕
./frontend/.nuxt/dist/client/components/v-by-line.js 2.34 kB +2.34 kB (new file) 🆕
./frontend/.nuxt/dist/client/components/v-by-line.modern.js 2.32 kB +2.32 kB (new file) 🆕
./frontend/.nuxt/dist/client/components/v-copy-license/components/v-license-tab-panel/components/v-media-reuse/pages/image/_id/index.js 3.8 kB +3.8 kB (new file) 🆕
./frontend/.nuxt/dist/client/components/v-copy-license/components/v-license-tab-panel/components/v-media-reuse/pages/image/_id/index.modern.js 3.81 kB +3.81 kB (new file) 🆕
./frontend/.nuxt/dist/client/components/v-media-info.js 2.56 kB +2.56 kB (new file) 🆕
./frontend/.nuxt/dist/client/components/v-media-info.modern.js 2.54 kB +2.54 kB (new file) 🆕
./frontend/.nuxt/dist/client/components/v-scroller.js 596 B +596 B (new file) 🆕
./frontend/.nuxt/dist/client/components/v-scroller.modern.js 592 B +592 B (new file) 🆕
./frontend/.nuxt/dist/client/components/v-source-creator-button.js 547 B +547 B (new file) 🆕
./frontend/.nuxt/dist/client/components/v-source-creator-button.modern.js 550 B +550 B (new file) 🆕
ℹ️ View Unchanged
Filename Size Change
./frontend/.nuxt/dist/client/commons/app.js 105 kB +3 B (0%)
./frontend/.nuxt/dist/client/commons/app.modern.js 87.5 kB +1 B (0%)
./frontend/.nuxt/dist/client/commons/components/v-error-section/components/v-external-search-form/components/v-external-source-li/4e2d09e1.js 5.18 kB -2 B (0%)
./frontend/.nuxt/dist/client/commons/components/v-error-section/components/v-external-search-form/components/v-external-source-li/4e2d09e1.modern.js 5.62 kB -3 B (0%)
./frontend/.nuxt/dist/client/components/loading-icon.js 731 B -1 B (0%)
./frontend/.nuxt/dist/client/components/loading-icon.modern.js 734 B -2 B (0%)
./frontend/.nuxt/dist/client/components/table-sort-icon.js 514 B 0 B
./frontend/.nuxt/dist/client/components/table-sort-icon.modern.js 518 B 0 B
./frontend/.nuxt/dist/client/components/v-all-results-grid.js 6.85 kB +3 B (0%)
./frontend/.nuxt/dist/client/components/v-all-results-grid.modern.js 6.68 kB +2 B (0%)
./frontend/.nuxt/dist/client/components/v-audio-collection.js 4.5 kB 0 B
./frontend/.nuxt/dist/client/components/v-audio-collection.modern.js 4.38 kB +7 B (0%)
./frontend/.nuxt/dist/client/components/v-audio-list.js 1.43 kB 0 B
./frontend/.nuxt/dist/client/components/v-audio-list.modern.js 1.41 kB +2 B (0%)
./frontend/.nuxt/dist/client/components/v-audio-result.js 1.12 kB 0 B
./frontend/.nuxt/dist/client/components/v-audio-result.modern.js 1.1 kB 0 B
./frontend/.nuxt/dist/client/components/v-audio-track-skeleton.js 957 B +1 B (0%)
./frontend/.nuxt/dist/client/components/v-audio-track-skeleton.modern.js 960 B 0 B
./frontend/.nuxt/dist/client/components/v-back-to-search-results-link.js 632 B -2 B (0%)
./frontend/.nuxt/dist/client/components/v-back-to-search-results-link.modern.js 639 B -1 B (0%)
./frontend/.nuxt/dist/client/components/v-bone.js 632 B 0 B
./frontend/.nuxt/dist/client/components/v-bone.modern.js 636 B 0 B
./frontend/.nuxt/dist/client/components/v-box-layout.js 1.16 kB +1 B (0%)
./frontend/.nuxt/dist/client/components/v-box-layout.modern.js 1.16 kB -2 B (0%)
./frontend/.nuxt/dist/client/components/v-collection-header.js 1.49 kB 0 B
./frontend/.nuxt/dist/client/components/v-collection-header.modern.js 1.5 kB -2 B (0%)
./frontend/.nuxt/dist/client/components/v-content-link.js 1.06 kB 0 B
./frontend/.nuxt/dist/client/components/v-content-link.modern.js 1.06 kB 0 B
./frontend/.nuxt/dist/client/components/v-content-page.js 531 B +1 B (0%)
./frontend/.nuxt/dist/client/components/v-content-page.modern.js 536 B 0 B
./frontend/.nuxt/dist/client/components/v-content-report-button.js 493 B 0 B
./frontend/.nuxt/dist/client/components/v-content-report-button.modern.js 497 B +1 B (0%)
./frontend/.nuxt/dist/client/components/v-content-report-form.js 3.35 kB -1 B (0%)
./frontend/.nuxt/dist/client/components/v-content-report-form.modern.js 3.23 kB -1 B (0%)
./frontend/.nuxt/dist/client/components/v-content-report-popover.js 3.82 kB -1 B (0%)
./frontend/.nuxt/dist/client/components/v-content-report-popover.modern.js 3.69 kB -1 B (0%)
./frontend/.nuxt/dist/client/components/v-copy-button.js 3.8 kB +2 B (0%)
./frontend/.nuxt/dist/client/components/v-copy-button.modern.js 3.81 kB +5 B (0%)
./frontend/.nuxt/dist/client/components/v-copy-license.js 2.34 kB 0 B
./frontend/.nuxt/dist/client/components/v-copy-license.modern.js 2.31 kB -1 B (0%)
./frontend/.nuxt/dist/client/components/v-dmca-notice.js 795 B 0 B
./frontend/.nuxt/dist/client/components/v-dmca-notice.modern.js 801 B 0 B
./frontend/.nuxt/dist/client/components/v-error-image.js 2.51 kB +1 B (0%)
./frontend/.nuxt/dist/client/components/v-error-image.modern.js 2.47 kB -3 B (0%)
./frontend/.nuxt/dist/client/components/v-error-section.js 5.22 kB -2 B (0%)
./frontend/.nuxt/dist/client/components/v-error-section.modern.js 4.58 kB -4 B (0%)
./frontend/.nuxt/dist/client/components/v-external-search-form.js 4.1 kB -2 B (0%)
./frontend/.nuxt/dist/client/components/v-external-search-form.modern.js 3.44 kB 0 B
./frontend/.nuxt/dist/client/components/v-external-source-list.js 2.63 kB 0 B
./frontend/.nuxt/dist/client/components/v-external-source-list.modern.js 1.99 kB +1 B (0%)
./frontend/.nuxt/dist/client/components/v-get-media-button.js 623 B +1 B (0%)
./frontend/.nuxt/dist/client/components/v-get-media-button.modern.js 628 B 0 B
./frontend/.nuxt/dist/client/components/v-grid-skeleton.js 1.55 kB -1 B (0%)
./frontend/.nuxt/dist/client/components/v-grid-skeleton.modern.js 1.55 kB +5 B (0%)
./frontend/.nuxt/dist/client/components/v-hide-button.js 594 B 0 B
./frontend/.nuxt/dist/client/components/v-hide-button.modern.js 592 B 0 B
./frontend/.nuxt/dist/client/components/v-home-gallery.js 4.28 kB +1 B (0%)
./frontend/.nuxt/dist/client/components/v-home-gallery.modern.js 4.26 kB 0 B
./frontend/.nuxt/dist/client/components/v-homepage-content.js 1.82 kB 0 B
./frontend/.nuxt/dist/client/components/v-homepage-content.modern.js 1.79 kB 0 B
./frontend/.nuxt/dist/client/components/v-image-cell.js 2.24 kB -1 B (0%)
./frontend/.nuxt/dist/client/components/v-image-cell.modern.js 2.23 kB -1 B (0%)
./frontend/.nuxt/dist/client/components/v-image-grid.js 4.53 kB +4 B (0%)
./frontend/.nuxt/dist/client/components/v-image-grid.modern.js 4.4 kB +5 B (0%)
./frontend/.nuxt/dist/client/components/v-license-tab-panel.js 641 B 0 B
./frontend/.nuxt/dist/client/components/v-license-tab-panel.modern.js 648 B -1 B (0%)
./frontend/.nuxt/dist/client/components/v-load-more.js 1.18 kB 0 B
./frontend/.nuxt/dist/client/components/v-load-more.modern.js 1.07 kB 0 B
./frontend/.nuxt/dist/client/components/v-media-license.js 931 B +1 B (0%)
./frontend/.nuxt/dist/client/components/v-media-license.modern.js 938 B 0 B
./frontend/.nuxt/dist/client/components/v-media-reuse.js 3 kB +1 B (0%)
./frontend/.nuxt/dist/client/components/v-media-reuse.modern.js 2.97 kB +1 B (0%)
./frontend/.nuxt/dist/client/components/v-media-tag.js 416 B 0 B
./frontend/.nuxt/dist/client/components/v-media-tag.modern.js 420 B +1 B (0%)
./frontend/.nuxt/dist/client/components/v-metadata-value.js 604 B 0 B
./frontend/.nuxt/dist/client/components/v-metadata-value.modern.js 609 B 0 B
./frontend/.nuxt/dist/client/components/v-metadata.js 1.32 kB +3 B (0%)
./frontend/.nuxt/dist/client/components/v-metadata.modern.js 1.32 kB +1 B (0%)
./frontend/.nuxt/dist/client/components/v-modal.js 982 B +1 B (0%)
./frontend/.nuxt/dist/client/components/v-modal.modern.js 973 B 0 B
./frontend/.nuxt/dist/client/components/v-no-results.js 2.67 kB -2 B (0%)
./frontend/.nuxt/dist/client/components/v-no-results.modern.js 2.03 kB +1 B (0%)
./frontend/.nuxt/dist/client/components/v-old-icon-button.js 853 B 0 B
./frontend/.nuxt/dist/client/components/v-old-icon-button.modern.js 846 B 0 B
./frontend/.nuxt/dist/client/components/v-radio.js 1.02 kB 0 B
./frontend/.nuxt/dist/client/components/v-radio.modern.js 1.02 kB 0 B
./frontend/.nuxt/dist/client/components/v-related-audio.js 824 B +1 B (0%)
./frontend/.nuxt/dist/client/components/v-related-audio.modern.js 745 B +2 B (0%)
./frontend/.nuxt/dist/client/components/v-related-audio/pages/search/audio.js 4.5 kB +1 B (0%)
./frontend/.nuxt/dist/client/components/v-related-audio/pages/search/audio.modern.js 4.37 kB +7 B (0%)
./frontend/.nuxt/dist/client/components/v-related-images.js 802 B -1 B (0%)
./frontend/.nuxt/dist/client/components/v-related-images.modern.js 718 B -1 B (0%)
./frontend/.nuxt/dist/client/components/v-report-desc-form.js 996 B 0 B
./frontend/.nuxt/dist/client/components/v-report-desc-form.modern.js 999 B 0 B
./frontend/.nuxt/dist/client/components/v-row-layout.js 2.05 kB +1 B (0%)
./frontend/.nuxt/dist/client/components/v-row-layout.modern.js 2.05 kB 0 B
./frontend/.nuxt/dist/client/components/v-safety-wall.js 1.45 kB -2 B (0%)
./frontend/.nuxt/dist/client/components/v-safety-wall.modern.js 1.46 kB 0 B
./frontend/.nuxt/dist/client/components/v-scroll-button.js 891 B 0 B
./frontend/.nuxt/dist/client/components/v-scroll-button.modern.js 891 B -1 B (0%)
./frontend/.nuxt/dist/client/components/v-search-results-title.js 616 B 0 B
./frontend/.nuxt/dist/client/components/v-search-results-title.modern.js 621 B 0 B
./frontend/.nuxt/dist/client/components/v-single-result-controls.js 1.18 kB 0 B
./frontend/.nuxt/dist/client/components/v-single-result-controls.modern.js 1.18 kB -1 B (0%)
./frontend/.nuxt/dist/client/components/v-sketch-fab-viewer.js 1.02 kB 0 B
./frontend/.nuxt/dist/client/components/v-sketch-fab-viewer.modern.js 916 B 0 B
./frontend/.nuxt/dist/client/components/v-snackbar.js 1.06 kB +3 B (0%)
./frontend/.nuxt/dist/client/components/v-snackbar.modern.js 1.07 kB +2 B (0%)
./frontend/.nuxt/dist/client/components/v-tag.js 411 B 0 B
./frontend/.nuxt/dist/client/components/v-tag.modern.js 416 B +1 B (0%)
./frontend/.nuxt/dist/client/components/v-warning-suppressor.js 307 B +1 B (0%)
./frontend/.nuxt/dist/client/components/v-warning-suppressor.modern.js 311 B 0 B
./frontend/.nuxt/dist/client/pages/about.js 1.42 kB 0 B
./frontend/.nuxt/dist/client/pages/about.modern.js 1.42 kB +1 B (0%)
./frontend/.nuxt/dist/client/pages/feedback.js 1.36 kB 0 B
./frontend/.nuxt/dist/client/pages/feedback.modern.js 1.36 kB -2 B (0%)
./frontend/.nuxt/dist/client/pages/image/_id/report.js 5 kB +1 B (0%)
./frontend/.nuxt/dist/client/pages/image/_id/report.modern.js 4.75 kB -1 B (0%)
./frontend/.nuxt/dist/client/pages/index.js 6.41 kB -1 B (0%)
./frontend/.nuxt/dist/client/pages/index.modern.js 6.35 kB +3 B (0%)
./frontend/.nuxt/dist/client/pages/preferences.js 1.46 kB 0 B
./frontend/.nuxt/dist/client/pages/preferences.modern.js 1.46 kB +1 B (0%)
./frontend/.nuxt/dist/client/pages/privacy.js 1.26 kB 0 B
./frontend/.nuxt/dist/client/pages/privacy.modern.js 1.26 kB 0 B
./frontend/.nuxt/dist/client/pages/search-help.js 1.64 kB 0 B
./frontend/.nuxt/dist/client/pages/search-help.modern.js 1.62 kB 0 B
./frontend/.nuxt/dist/client/pages/search.js 5.82 kB 0 B
./frontend/.nuxt/dist/client/pages/search.modern.js 8.13 kB -3 B (0%)
./frontend/.nuxt/dist/client/pages/search/audio.js 499 B +1 B (0%)
./frontend/.nuxt/dist/client/pages/search/audio.modern.js 501 B 0 B
./frontend/.nuxt/dist/client/pages/search/image.js 452 B -1 B (0%)
./frontend/.nuxt/dist/client/pages/search/image.modern.js 454 B 0 B
./frontend/.nuxt/dist/client/pages/search/index.js 316 B 0 B
./frontend/.nuxt/dist/client/pages/search/index.modern.js 320 B 0 B
./frontend/.nuxt/dist/client/pages/search/model-3d.js 242 B -1 B (0%)
./frontend/.nuxt/dist/client/pages/search/model-3d.modern.js 246 B 0 B
./frontend/.nuxt/dist/client/pages/search/video.js 240 B 0 B
./frontend/.nuxt/dist/client/pages/search/video.modern.js 243 B -1 B (0%)
./frontend/.nuxt/dist/client/pages/sensitive-content.js 1.52 kB +1 B (0%)
./frontend/.nuxt/dist/client/pages/sensitive-content.modern.js 1.53 kB 0 B
./frontend/.nuxt/dist/client/pages/sources.js 1.53 kB +1 B (0%)
./frontend/.nuxt/dist/client/pages/sources.modern.js 1.54 kB -1 B (0%)

compressed-size-action

Copy link

github-actions bot commented Nov 11, 2023

Full-stack documentation: https://docs.openverse.org/_preview/3338

Please note that GitHub pages takes a little time to deploy newly pushed code, if the links above don't work or you see old versions, wait 5 minutes and try again.

You can check the GitHub pages deployment action list to see the current status of the deployments.

@obulat obulat added 🟨 priority: medium Not blocking but should be addressed soon 🌟 goal: addition Addition of new feature 🕹 aspect: interface Concerns end-users' experience with the software and removed 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work labels Nov 12, 2023
@obulat obulat force-pushed the audio-control/row-box-full branch from 8ecdd46 to 28eaa66 Compare November 13, 2023 09:30
@obulat obulat force-pushed the additional_search_views/VByLine branch from 646faca to 46122e1 Compare November 13, 2023 09:31
@obulat obulat self-assigned this Nov 13, 2023
Base automatically changed from audio-control/row-box-full to main November 13, 2023 15:35
@obulat obulat force-pushed the additional_search_views/VByLine branch 2 times, most recently from 0148bd7 to 069e32f Compare November 14, 2023 16:53
@obulat obulat marked this pull request as ready for review November 14, 2023 17:00
@obulat obulat requested a review from a team as a code owner November 14, 2023 17:00
@obulat obulat changed the title Add links to the collection pages from the single result page media info Add source, creator and tag links to the single result page media info Nov 14, 2023
Copy link
Contributor

@fcoveram fcoveram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides the comment shared, I noticed two more things.

  • The column and row distance between tag items should be 12px instead of 8px. Here is what I see.
  • In xs, the author and source area don't have the gradient and spacing applied as in the design. Here is what I see. Below you can find the specs for both elements.

Gradient

width: 64px; height: 32px. The white fill goes from 100% to 0% opacity.

Spacing

12px between filter buttons and left and right arrows

@@ -16,6 +16,21 @@
</div>
</div>
<div
v-if="additionalSearchViews"
class="mx-auto grid grid-cols-1 grid-rows-[auto,1fr] gap-y-6 p-6 pb-0 sm:grid-cols-[1fr,auto] sm:grid-rows-1 sm:gap-x-6 lg:mb-6 lg:max-w-5xl"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think here we need to add here the items-center class to align all elements in the middle from sm to beyond. Otherwise they're top aligned, here is what I see.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After discussing this synchronously, we decided to add a top margin of 4px to the CTA (Get media button) to make it well-balance both for single line titles and longer titles.

@obulat obulat force-pushed the additional_search_views/VByLine branch from 069e32f to eb757de Compare November 16, 2023 17:32
Signed-off-by: Olga Bulat <[email protected]>
Signed-off-by: Olga Bulat <[email protected]>
Signed-off-by: Olga Bulat <[email protected]>
Signed-off-by: Olga Bulat <[email protected]>
@obulat obulat force-pushed the additional_search_views/VByLine branch from 792afd0 to 9a4c298 Compare November 21, 2023 08:10
…s/openverse into additional_search_views/VByLine
Signed-off-by: Olga Bulat <[email protected]>
Copy link
Contributor

@fcoveram fcoveram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spacing changes in sm and beyond are correct, and the scrolling interaction works well.

The only remaining points in xs are:

  • Gradient is still not fully white on the sides. As in this screenshot.
  • Spacing between left and right action and filter buttons is still tight. As in this screenshot.
  • Shaking effect in the pill when the scroll reaches its end. As in this screenshot.
  • Left and right buttons don't show up immediately. As in this screenshot.

I can create a new ticket for that as this PR addresses the main changes and the above is more subtle.

Signed-off-by: Olga Bulat <[email protected]>
Copy link
Collaborator

@sarayourfriend sarayourfriend left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if the shaking that Francisco refers to in his review is what I'm seeing in the video below, but I think it presents a major usability issue that looks really easy to run into.

Screencast_20231122_095132.webm

The scenario is basically: I want to scroll all the way to the end of the provider to read the provider name. To do this, I'm repeatedly and quickly clicking the arrow to scroll the view. However, because the arrow disappears at the end and the region I was clicking is now the provider link, I'm suddenly taken to a completely different page. When using normal scrolling arrows, my experience has always been that once you reach the end, the arrow just stops working, rather than disappearing.

The jittering that I think Francisco is also referring to is really jarring if you're trying to read the scrolling text, because the text moves rapidly twice, once to make room for the arrows and then again to actually start scrolling. It'd be one thing if they ended up in the same location, which would at least not cause the jarring effect, but it's ever so slightly different, which means your eyes end up tracking the entire movement and noticing it more.

I don't know how to fix the disappearing arrows usability issue. It feels unavoidable given the design of the arrows appearing. The jittering though, looks like it could be solved by rendering the arrows "above" the scrolling pills, rather than next to them, so that the browser doesn't try to move the contents of the element to make room for the arrows, with the JS update to scroll the contents based on the arrow click coming after the browser paint.

I'm not leaving an approve/request changes on this because I'm not confident about either, so just commenting. If it's not possible to fix these problems in this PR, or if it's better to fix them in a follow up, then I can approve, but on the condition that the feature rollout is blocked on fixing at least one of these issues. The usability problem feels important to me because I think a lot of users will run into it and find it frustrating, but the second is a visual accessibility issue, in my opinion. I think that fixing the first problem would naturally fix the second, which is why I say only one of them needs to be fixed. Really the second one "needs" to be fixed, and if we can fix the first one too it would be a significant improvement to the user experience.

While writing this review and doing more testing, I noticed something I do need to request changes for, however. There is also a big accessibility issue for sighted keyboard users:

image

In that screenshot the author button is focused. There is a tiny sliver of the purple outline, but otherwise there's no indication that it is focused and, worse, the button is focused but not in view, so I can't even read what it says. Same with the source button. If I tab to the next button, this is what it looks like:

image

It's almost indistinguishable from the focus state of the previous button and again, I'm unable to read the contents of the button.

My suggestion for fixing this needs @fcoveram's review but is as follows:

  1. For the focus ring issue, either use a different variant that changes the colour of the button when focused or increase the height of the container so that the top and bottom of the focus ring is visible.

image

In that screenshot I increased it to 36 px up from 32 and it still doesn't show both the top and the bottom, but it's clearly an improvement. I used taller heights as well but it looks like the buttons need vertical justification within the container as well, because it only adds space to the bottom of the buttons rather than around them. Alternatively, maybe all buttons actually need additional margin to account for the size of the focus ring? When I add margin of 4px to the button I can see the focus ring without making any many changes to the height of the container. That also avoids the vertical justification issue.
2. For the button contents not being visible, automatically scroll the button completely into view when it's focused. I think a non-hijacked scrolling view would do this automatically, so I guess we need to reimplement it?

Comment on lines 120 to 122
const buttonVariant = computed(() =>
uiStore.isBreakpoint("sm") ? "transparent-gray" : "filled-gray"
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach produces a weird and noticeable lag when resizing a window or rotating a mobile phone.

Is it possible for us to use the ui store only for the initial render and then use breakpoints with display: none (whatever the tailwind equivalent is) to render the correct variant? Something like this pseudo-code:

const serverSide = process.server != undefined
const isSmall = uiStore.isBreakpoint("sm")
const smallVisibilityClass = serverSide && isSmall ? "visible" : "!sm:hidden"
const notSmallVisibilityClass = serverSide && !isSmall ? "visible" : "sm:hidden"

Then render the two variants in v-for and apply the visibility class for the variant.

I don't know if that would cause issues on cookieless renders with Nuxt complaining about mismatched client and server renders?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used a single button variant, and added tailwind classes with and without sm: prefix to override the colors. Now, the change is much smoother.

@obulat
Copy link
Contributor Author

obulat commented Nov 22, 2023

The scenario is basically: I want to scroll all the way to the end of the provider to read the provider name. To do this, I'm repeatedly and quickly clicking the arrow to scroll the view. However, because the arrow disappears at the end and the region I was clicking is now the provider link, I'm suddenly taken to a completely different page. When using normal scrolling arrows, my experience has always been that once you reach the end, the arrow just stops working, rather than disappearing.

I also experienced this (and got really annoyed with it) when developing this locally. I assumed that since this is our design, and since Youtube tags also have the same behavior, this is an annoyance that we would have to live with. As a workaround, I added a pointer-events-none to the buttons for 500ms after the scroll button is removed. It seems to handle the first accidental click well. Please let me know what you think about this idea, @sarayourfriend.
@fcoveram, do you think we would need to update the design to prevent accidental click on the source/creator button when the user finishes scrolling to the edge, and the scroll button disappears, to prevent annoyance from accidental clicking? Or would a hack making the buttons not clickable for the first 500ms is enough?

@sarayourfriend, thank you for flagging the focus ring being cut off. I added a 1.5px padding to the buttons (balanced by -1.5px margins on the container) to stop rings from being cut off. They should now be visible.

@sarayourfriend
Copy link
Collaborator

Youtube tags also have the same behavior

Comparing our implementation with the youtube one, I think the youtube tags don't have as much of a jarring experience to me for two reasons:

  1. There isn't the jitter of the arrows causing the tags to jump around
  2. The arrow disappears immediately after clicking when it would scroll to the end. In other words, it doesn't scroll to the end and then hide the arrow. It hides the arrow before it hits the end, after you've clicked the last possible "scroll".
  3. It scrolls much faster and further, and feels more responsive, so I'm less inclined to rapidly click the scroll button to get to the end.

A lot of that is definitely improved a lot now though. The only weird thing I'm noticing is that on image/8c8f2318-acc8-477c-a059-34f44901933e I have to click twice on the right scroll to get to the end, but once I'm at the end, only once on the left scroll to get back to the start 🤔 I don't know what could be causing that.

Maybe we could use real-time calculation of scroll distance? Like, scroll at least 2/3 the width of the container every time, but fudge that a bit so that we're never scrolling less than 1/3? I don't know exactly how to make that math work out, but the idea would be that you'd never have a scroll button press that only scrolled a tiny amount, which is what's happening with the second click of the right scroll for me on that result. Here's a video showing that.

Screencast_20231123_121008.webm

Probably not blocking, but I haven't fully re-reviewed now. The improvements are awesome though, for sure. I'll re-review tomorrow morning (logging off for the day now).

@fcoveram
Copy link
Contributor

Great comments here. Three topics have been touched, so grouping them to share my thoughts.

Filters interaction

Thanks @sarayourfriend for sharing your use case. The reason behind using arrows (visible or hidden when reaching the end) comes from an a11y assumption of providing controls, and because some filters' text lengths are quite long and need to be contained within the area.

I revisited YouTube again and you're right about the behavior. But I also noticed that buttons are hidden on mobile. It might be because touch interaction predominates in small devices and the scroll relies on swiping, so removing the arrows on small breakpoints could be a good idea.

If we can test your suggestion in a different ticket, it would be great to decide which interaction feels smoother. So far, I would merge this PR as it is.

Testing the implementation

I also experienced this (and got really annoyed with it) when developing this locally.

I'd like to reinforce the idea that design work is not written in stone. If you experience something that feels weird, unexpected, or literally breaks up your experience as a user, please share it. I've been contributing to other WordPress projects and noticed that we don't tend to discuss design ideas and instead develop what's on mockups.

We all are Openverse users and our experiences with the tool provide tremendous value.

Visible focus

There is a tiny sliver of the purple outline, but otherwise there's no indication that it is focused and, worse, the button is focused but not in view

I've mentioned this problem in other tickets and raising the question again of whether is possible to address it for the whole site. If we continue revisiting the focus style per case, we risk missing future use cases like this one, where I completely forgot about it.

We can move the discussion into a different ticket, indeed. But to me, this component style belongs to a core state that should not be in revision because of possible layout breaks.

@obulat
Copy link
Contributor Author

obulat commented Nov 23, 2023

I'd like to reinforce the idea that design work is not written in stone. If you experience something that feels weird, unexpected, or literally breaks up your experience as a user, please share it. I've been contributing to other WordPress projects and noticed that we don't tend to discuss design ideas and instead develop what's on mockups.

We all are Openverse users and our experiences with the tool provide tremendous value.

Thank you for reminding about this, @fcoveram! You are right that we should all be more mindful about the UX when working on the frontend issues.

We can move the discussion into a different ticket, indeed. But to me, this component style belongs to a core state that should not be in revision because of possible layout breaks.

The core state does have the focus state implemented. However, when an element or its container has a CSS position set, the focus ring gets cut off. It still exists, but it's hidden behind other elements, so it becomes useless. I think it would be nice to open an issue for a better fix for this problem than what I implemented here (adding a padding to the container and removing some of the margins to balance the height with the mockup.

@fcoveram
Copy link
Contributor

The core state does have the focus state implemented.

You are right, I didn't explain myself correctly. It is part of the component.

I think it would be nice to open an issue for a better fix for this problem…

Mainly to suggest ideas and land on a solution like adding extra space as we do it but from the design stage or another one I'm unaware of.

@openverse-bot
Copy link
Collaborator

Based on the medium urgency of this PR, the following reviewers are being gently reminded to review this PR:

@AetherUnbound
@dhruvkb
@sarayourfriend
This reminder is being automatically generated due to the urgency configuration.

Excluding weekend1 days, this PR was ready for review 7 day(s) ago. PRs labelled with medium urgency are expected to be reviewed within 4 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

  1. Specifically, Saturday and Sunday.

  2. For the purpose of these reminders we treat Monday - Friday as weekdays. Please note that the operation that generates these reminders runs at midnight UTC on Monday - Friday. This means that depending on your timezone, you may be pinged outside of the expected range.

@obulat
Copy link
Contributor Author

obulat commented Nov 26, 2023

The only weird thing I'm noticing is that on image/8c8f2318-acc8-477c-a059-34f44901933e I have to click twice on the right scroll to get to the end, but once I'm at the end, only once on the left scroll to get back to the start 🤔 I don't know what could be causing that.

I think this was caused by 2 things. The issue has suggested using scroll-snap for scrolling. When I added it, it was causing a problem when the buttons were about as long as the scroll width: you could not scroll past them.

Scroll.snap.problem.webm

I removed the scroll snap and also adjusted scrolling for the last two steps: when the distance left is less than 2 scroll steps, the scroll step becomes half of this distance. So, if the distance left is 200, we don't scroll 150px and 50px (scroll step and what's left), but scroll 100px and 100px instead.

Here's the updated scrolling:
Scrolling.webm

It scrolls much faster and further, and feels more responsive, so I'm less inclined to rapidly click the scroll button to get to the end.

@sarayourfriend, do you think it would make sense to increase the scroll step? I took 150px as "about half of the screen on mobile width", but it might be better to have larger steps?

@obulat
Copy link
Contributor Author

obulat commented Nov 26, 2023

I revisited YouTube again and you're right about the behavior. But I also noticed that buttons are hidden on mobile. It might be because touch interaction predominates in small devices and the scroll relies on swiping, so removing the arrows on small breakpoints could be a good idea.

I looked at Facebook and Google maps on mobile, and neither of them has arrows for their horizontally scrollable list of tags. I guess this is the behavior users expect, so I would vote for removing the arrows on mobile.

If we can test your suggestion in a different ticket, it would be great to decide which interaction feels smoother. So far, I would merge this PR as it is.

Merging this PR would make it easier to test the PR that adds collection pages, so I would be happy to do as you suggest. @sarayourfriend , do you think this is okay as is, considering that it's under a feature flag and we can open new issues to keep iterating?

Copy link
Collaborator

@sarayourfriend sarayourfriend left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@obulat Yes, go for it! I intended to leave an approving review on Friday with that exact stipulation. Any of the outstanding issues can be resolved in smaller follow-up PRs, that would be overall easier to review anyway.

I also wanted to say good work on the scrolling box. It is complicated, and I wouldn't have known where to start with it, personally. Despite the small issues, it's a really excellent first pass at it that wouldn't even be bad to release as public, if we were tight on time. The various issues are rather minor and don't overall impede the usability (now that the major a11y focus issue is solved).

For me the issues to resolve are:

  1. Adjusting the scroll distance to make it feel good (fast enough)
  2. Potentially removing the arrows on mobile (making sure it's visually clear that there is a scrollable area there, e.g., with the fading)
  3. Scrolling buttons 100% into view when they're focused via keyboard

@obulat obulat merged commit de203f1 into main Nov 27, 2023
42 checks passed
@obulat obulat deleted the additional_search_views/VByLine branch November 27, 2023 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🕹 aspect: interface Concerns end-users' experience with the software 🌟 goal: addition Addition of new feature 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: documentation Related to Sphinx documentation 🧱 stack: frontend Related to the Nuxt frontend
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Component: VByLine
4 participants