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

All search styling #11550

Merged
merged 38 commits into from
Feb 3, 2025
Merged

All search styling #11550

merged 38 commits into from
Feb 3, 2025

Conversation

gestchild
Copy link
Contributor

@gestchild gestchild commented Jan 30, 2025

What does this change?

For #11459

Implements styling for the catalogue and image results (designs)

Wide screen:
screencapture-localhost-3000-search-2025-01-30-14_28_51

Narrow screen:
Screenshot 2025-01-30 at 14 43 32

No results:
Screenshot 2025-01-30 at 14 23 45

How to test

View search page will allSearch toggle enabled and compare with the designs)

How can we measure success?

The results match the designs

Have we considered potential risks?

Behind a toggle so now really

I've created a few new components, we may want to move them into there own files/add them to cardigan if we think they will be reused.

@gestchild gestchild requested a review from a team as a code owner January 30, 2025 14:55
Copy link

github-actions bot commented Jan 30, 2025

Size Change: +1.05 kB (+0.1%)

Total Size: 1.02 MB

Filename Size Change
content/webapp/.next/static/chunks/1723-dd15ab5809baac3f.js 0 B -6.98 kB (removed) 🏆
content/webapp/.next/static/chunks/pages/_app-c7f9b5f4142ba139.js 0 B -109 kB (removed) 🏆
content/webapp/.next/static/chunks/pages/guides/exhibitions/[id]-9f52a08f6f6f0e5f.js 0 B -2.48 kB (removed) 🏆
content/webapp/.next/static/chunks/pages/search-4d58728d11397585.js 0 B -7.48 kB (removed) 🏆
content/webapp/.next/static/chunks/webpack-48a04a66d21cc5c5.js 0 B -2.33 kB (removed) 🏆
identity/webapp/.next/static/chunks/pages/_app-d785fd5b6d88bb82.js 0 B -105 kB (removed) 🏆
content/webapp/.next/static/chunks/1723-97805ba6fbb613b6.js 6.99 kB +6.99 kB (new file) 🆕
content/webapp/.next/static/chunks/pages/_app-48ca01d3ae720c37.js 109 kB +109 kB (new file) 🆕
content/webapp/.next/static/chunks/pages/guides/exhibitions/[id]-fbbc60629ff9fce0.js 2.48 kB +2.48 kB (new file) 🆕
content/webapp/.next/static/chunks/pages/search-65fdad452e444a5d.js 7.95 kB +7.95 kB (new file) 🆕
content/webapp/.next/static/chunks/webpack-63d4468caadc79b0.js 2.33 kB +2.33 kB (new file) 🆕
identity/webapp/.next/static/chunks/pages/_app-189dc1455be1cd50.js 105 kB +105 kB (new file) 🆕
ℹ️ View Unchanged
Filename Size
content/webapp/.next/static/chunks/00a8a139.e66d72e5d4e63786.js 58.7 kB
content/webapp/.next/static/chunks/1256.13d04d7ceb6d34d7.js 3.2 kB
content/webapp/.next/static/chunks/1271.e0c2268369bdddfb.js 4.81 kB
content/webapp/.next/static/chunks/1570-12fc6fe973ac6263.js 5.49 kB
content/webapp/.next/static/chunks/1711.d646362e86773288.js 1.63 kB
content/webapp/.next/static/chunks/1792.8d30ed89b794a7c5.js 2.87 kB
content/webapp/.next/static/chunks/1801.0e7c25d7fb0b5b8e.js 3.12 kB
content/webapp/.next/static/chunks/1895-939985d7aa411a41.js 2.27 kB
content/webapp/.next/static/chunks/211-f2920ff3e40813b3.js 2.67 kB
content/webapp/.next/static/chunks/2186-6e5af00a8e062693.js 3.82 kB
content/webapp/.next/static/chunks/2526.3d3bebef29a9d66f.js 3.71 kB
content/webapp/.next/static/chunks/2588.182a59157030f15d.js 1.65 kB
content/webapp/.next/static/chunks/2782.eac83680a61cf332.js 3.47 kB
content/webapp/.next/static/chunks/286.e6c4fb42dbebd142.js 20.7 kB
content/webapp/.next/static/chunks/2873.76785027718b9ef3.js 1.62 kB
content/webapp/.next/static/chunks/3197.b17b6db1e5fef68e.js 263 B
content/webapp/.next/static/chunks/3393.1a50235e398e33e1.js 358 B
content/webapp/.next/static/chunks/3422-35d87fae4bd6364d.js 2.92 kB
content/webapp/.next/static/chunks/3463.6f34c3c7f0a539d7.js 3.31 kB
content/webapp/.next/static/chunks/3818-f189578851816276.js 3.5 kB
content/webapp/.next/static/chunks/3833-904ab0bfb4f68286.js 2.98 kB
content/webapp/.next/static/chunks/3870-346f34b70d120acb.js 2.95 kB
content/webapp/.next/static/chunks/4005.218bad1ccfa4c2b3.js 5.97 kB
content/webapp/.next/static/chunks/4374.b1c852b38e66d6ec.js 373 B
content/webapp/.next/static/chunks/4399-c959949cc5afe282.js 3.69 kB
content/webapp/.next/static/chunks/4494-9ee08e6cd2d95cc0.js 4.68 kB
content/webapp/.next/static/chunks/4554.3ebff88311e47bda.js 3.93 kB
content/webapp/.next/static/chunks/4631.9dd484a988ff132d.js 2.19 kB
content/webapp/.next/static/chunks/4660.d3804cb5d35c597f.js 277 B
content/webapp/.next/static/chunks/4892-12f056174f6dcfc0.js 4.41 kB
content/webapp/.next/static/chunks/5454-a9fcf6451f832026.js 3.75 kB
content/webapp/.next/static/chunks/6042-8740035cd1d60c76.js 6.9 kB
content/webapp/.next/static/chunks/6061-0afc0c71e65e9bb1.js 3.45 kB
content/webapp/.next/static/chunks/6425-194ee5c5c5654052.js 6.66 kB
content/webapp/.next/static/chunks/6472-94d2b1c4acae68a3.js 22 kB
content/webapp/.next/static/chunks/6577-5673df74d42242c4.js 3.9 kB
content/webapp/.next/static/chunks/6921-867cfe60d1b6e717.js 3.67 kB
content/webapp/.next/static/chunks/7107-7a0c6bd1411921e2.js 33.8 kB
content/webapp/.next/static/chunks/7185.711d55487124425c.js 2.44 kB
content/webapp/.next/static/chunks/72-b9bcdfe8ff0bebfc.js 4.47 kB
content/webapp/.next/static/chunks/721-ea2d0bb10927ae69.js 7.55 kB
content/webapp/.next/static/chunks/7401-4a133da6bafaf096.js 4.34 kB
content/webapp/.next/static/chunks/7603-ca72323ac1819255.js 3.14 kB
content/webapp/.next/static/chunks/7732-7da8bac1f8fe039a.js 7.74 kB
content/webapp/.next/static/chunks/7842-47fcf5720112df63.js 4.63 kB
content/webapp/.next/static/chunks/7914-54f2a2a0f777f381.js 2.96 kB
content/webapp/.next/static/chunks/8732.8a67f91b9792fd93.js 4.54 kB
content/webapp/.next/static/chunks/8880-f5a4b47b6d3b3e03.js 4.99 kB
content/webapp/.next/static/chunks/8910.2c6b18de4b850a00.js 263 B
content/webapp/.next/static/chunks/8983-2f54da5934670a9b.js 11.4 kB
content/webapp/.next/static/chunks/9133.39332f424231fd53.js 2.71 kB
content/webapp/.next/static/chunks/9309.60054df571ff5328.js 2.83 kB
content/webapp/.next/static/chunks/9316-39ba309b3fdf6591.js 3.19 kB
content/webapp/.next/static/chunks/9450.bf6b04974baf1a1a.js 5.04 kB
content/webapp/.next/static/chunks/9696.f76a03ee3b169f51.js 3.59 kB
content/webapp/.next/static/chunks/9875.cc2786d20b9961c7.js 4.8 kB
content/webapp/.next/static/chunks/framework-978a6051e6d0c57a.js 44.9 kB
content/webapp/.next/static/chunks/main-f8a178edb9b98bff.js 36.9 kB
content/webapp/.next/static/chunks/pages/_error-4cf036a2ff1ec507.js 331 B
content/webapp/.next/static/chunks/pages/[uid]-28816ee7a4f9244a.js 1.94 kB
content/webapp/.next/static/chunks/pages/404-791c5651d62f91a3.js 258 B
content/webapp/.next/static/chunks/pages/500-2275439797e687d9.js 258 B
content/webapp/.next/static/chunks/pages/about-us-212a04732cb12469.js 1.94 kB
content/webapp/.next/static/chunks/pages/about-us/[uid]-bd997412a6e7f30d.js 1.94 kB
content/webapp/.next/static/chunks/pages/about-us/cookie-policy-0273f3aef6319898.js 5.98 kB
content/webapp/.next/static/chunks/pages/books-8406657ded183dc3.js 1.08 kB
content/webapp/.next/static/chunks/pages/books/[bookId]-541180a1c161011d.js 4.08 kB
content/webapp/.next/static/chunks/pages/collections-e69dbac21951a7b9.js 2.36 kB
content/webapp/.next/static/chunks/pages/collections/[uid]-427eed5c6650477e.js 2.3 kB
content/webapp/.next/static/chunks/pages/concepts/[conceptId]-c83a56c08dfed03a.js 3.81 kB
content/webapp/.next/static/chunks/pages/event-series/[eventSeriesId]-a50986e2a9dd516c.js 2.93 kB
content/webapp/.next/static/chunks/pages/events-25c81a5666d4b903.js 1.25 kB
content/webapp/.next/static/chunks/pages/events/[eventId]-688e1772581345cf.js 8.87 kB
content/webapp/.next/static/chunks/pages/events/[eventId]/visual-stories-f3010850e2cb2ebb.js 300 B
content/webapp/.next/static/chunks/pages/exhibitions-5d01d2db0468afef.js 2.06 kB
content/webapp/.next/static/chunks/pages/exhibitions/[exhibitionId]-d8be93e432876112.js 3.98 kB
content/webapp/.next/static/chunks/pages/exhibitions/[exhibitionId]/visual-stories-43c98dbbee1fc58d.js 301 B
content/webapp/.next/static/chunks/pages/get-involved-3e727f6e862ac90e.js 1.94 kB
content/webapp/.next/static/chunks/pages/get-involved/[uid]-312ee532f01ac672.js 1.95 kB
content/webapp/.next/static/chunks/pages/guides/[guideId]-875d124b7918d968.js 2.25 kB
content/webapp/.next/static/chunks/pages/guides/exhibitions-129babcc4deb3bb6.js 1.15 kB
content/webapp/.next/static/chunks/pages/guides/exhibitions/[id]/[type]-fe9e918409ee1ff5.js 7.7 kB
content/webapp/.next/static/chunks/pages/guides/exhibitions/[id]/[type]/[stop]-c80c9cd6d23cbdc2.js 3.6 kB
content/webapp/.next/static/chunks/pages/index-c6f0dd95a8b74345.js 3.21 kB
content/webapp/.next/static/chunks/pages/newsletter-930fb9f580889eee.js 2.35 kB
content/webapp/.next/static/chunks/pages/pages/[pageId]-c40bf0327c4d5b64.js 1.91 kB
content/webapp/.next/static/chunks/pages/projects/[projectId]-cbdebd5c8d20f244.js 2.24 kB
content/webapp/.next/static/chunks/pages/search/events-67237cc0093758db.js 2.04 kB
content/webapp/.next/static/chunks/pages/search/images-088ca917b8b02e94.js 1.58 kB
content/webapp/.next/static/chunks/pages/search/stories-e9ac779ef5a8b05c.js 3.11 kB
content/webapp/.next/static/chunks/pages/search/works-91cef78fa662dc37.js 2.96 kB
content/webapp/.next/static/chunks/pages/seasons/[seasonId]-65e14c0519d09107.js 3.85 kB
content/webapp/.next/static/chunks/pages/series/[seriesId]-ecf283f1e157fdec.js 5.08 kB
content/webapp/.next/static/chunks/pages/slice-simulator-0ab4fabd7951affc.js 967 B
content/webapp/.next/static/chunks/pages/stories-a1441a304d7070a6.js 1.73 kB
content/webapp/.next/static/chunks/pages/stories/[articleId]-470c21eb3fe81c59.js 7.65 kB
content/webapp/.next/static/chunks/pages/visit-us-ced28ee660c7f3b0.js 2.27 kB
content/webapp/.next/static/chunks/pages/visit-us/[uid]-547ae14fa24f0e44.js 1.95 kB
content/webapp/.next/static/chunks/pages/visual-stories/[visualStoryId]-1c1b8a3ab7add349.js 236 B
content/webapp/.next/static/chunks/pages/whats-on-c6d950bbb524483c.js 210 B
content/webapp/.next/static/chunks/pages/whats-on/[period]-61f2b6497c68e41b.js 281 B
content/webapp/.next/static/chunks/pages/works/[workId]-39d05b97c94d09a5.js 21.9 kB
content/webapp/.next/static/chunks/pages/works/[workId]/download-a6ff441233119a50.js 2.73 kB
content/webapp/.next/static/chunks/pages/works/[workId]/images-465df80c2c73bd2f.js 702 B
content/webapp/.next/static/chunks/pages/works/[workId]/items-994abab0f7a2450a.js 3.99 kB
content/webapp/.next/static/chunks/polyfills-42372ed130431b0a.js 39.5 kB
identity/webapp/.next/static/chunks/128.a394cb623dd1d2e9.js 2.71 kB
identity/webapp/.next/static/chunks/286.30e19e68d137a7fe.js 20.7 kB
identity/webapp/.next/static/chunks/442-16a4fdfe63454534.js 9.09 kB
identity/webapp/.next/static/chunks/644-f0cfb6459ad9993f.js 16.2 kB
identity/webapp/.next/static/chunks/911.3961d88c7985befe.js 939 B
identity/webapp/.next/static/chunks/framework-e82a91356956e6c8.js 44.8 kB
identity/webapp/.next/static/chunks/main-0a79b8ff20fd3839.js 39 kB
identity/webapp/.next/static/chunks/pages/_error-cd4c42214e080cf2.js 1.45 kB
identity/webapp/.next/static/chunks/pages/delete-requested-695bdf7b35dae097.js 3.22 kB
identity/webapp/.next/static/chunks/pages/error-a8564e691956d3a2.js 1.69 kB
identity/webapp/.next/static/chunks/pages/index-fdcc8e4649babc2a.js 12 kB
identity/webapp/.next/static/chunks/pages/registration-c4497c610603656a.js 4.12 kB
identity/webapp/.next/static/chunks/pages/success-c2599ab99f3cf080.js 3.3 kB
identity/webapp/.next/static/chunks/pages/validated-ccfa3474735f993e.js 3.38 kB
identity/webapp/.next/static/chunks/polyfills-42372ed130431b0a.js 39.5 kB
identity/webapp/.next/static/chunks/webpack-f1b15f41485fda96.js 1.82 kB

compressed-size-action

Copy link
Contributor

@davidpmccormick davidpmccormick left a comment

Choose a reason for hiding this comment

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

Looks great – just a comment on the tablet view having the same pared-down styles as mobile

Comment on lines +369 to +376
{(!!(
catalogueResults.images?.totalResults &&
catalogueResults.images?.totalResults > 0
) ||
!!(
catalogueResults.works?.totalResults &&
catalogueResults.works?.totalResults > 0
)) && (
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 catalogueResults.images?.totalResults > 0 || catalogueResults.works?.totalResults > 0 could be simplified equivalent? (undefined > 0 = false)

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 can't get this to work

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok I hadn't tested it so possible! I just thought it was a bit complex to read but it's not hard to understand what it actually does, so np

Copy link
Contributor

@rcantin-w rcantin-w left a comment

Choose a reason for hiding this comment

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

Screenshot 2025-02-03 at 12 03 35

Could we lowercase "Catalogue" and "Images" in the link?

@rcantin-w
Copy link
Contributor

Screenshot 2025-02-03 at 12 04 19 Screenshot 2025-02-03 at 12 04 25

Another one to run past Dana is are we limiting the work types being displayed to the first X ones?

Comment on lines 406 to 415
<NextLink
{...worksLink(
{
query: queryString,
},
`works_all_${pathname}`
)}
passHref
legacyBehavior
>
Copy link
Contributor

@rcantin-w rcantin-w Feb 3, 2025

Choose a reason for hiding this comment

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

These links don't work for me locally, there's no href in the element

Screenshot 2025-02-03 at 12 10 44

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm, I'm struggling to replicate this

Copy link
Contributor

Choose a reason for hiding this comment

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

I pulled the latest, running with run-concurrently and both of first and subsequent loads these links don't work for me 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorry, I'm looking at the wrong links!

Copy link
Contributor

Choose a reason for hiding this comment

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

tbf I might've commented the wrong one 😅

Copy link
Contributor

Choose a reason for hiding this comment

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

I read up about legacyBehavior but didn't think to check the links!

Copy link
Contributor

Choose a reason for hiding this comment

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

That'd be the last thing for me, otherwise good to go and very nice to see!

@gestchild gestchild merged commit 29ac751 into main Feb 3, 2025
8 checks passed
@gestchild gestchild deleted the all-search-styling branch February 3, 2025 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants