-
Notifications
You must be signed in to change notification settings - Fork 5
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
All search styling #11550
Conversation
# Conflicts: # content/webapp/pages/search/index.tsx
# Conflicts: # content/webapp/pages/search/index.tsx
Size Change: +1.05 kB (+0.1%) Total Size: 1.02 MB
ℹ️ View Unchanged
|
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.
Looks great – just a comment on the tablet view having the same pared-down styles as mobile
{(!!( | ||
catalogueResults.images?.totalResults && | ||
catalogueResults.images?.totalResults > 0 | ||
) || | ||
!!( | ||
catalogueResults.works?.totalResults && | ||
catalogueResults.works?.totalResults > 0 | ||
)) && ( |
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 catalogueResults.images?.totalResults > 0 || catalogueResults.works?.totalResults > 0
could be simplified equivalent? (undefined > 0 = false
)
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 can't get this to work
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.
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
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.
<NextLink | ||
{...worksLink( | ||
{ | ||
query: queryString, | ||
}, | ||
`works_all_${pathname}` | ||
)} | ||
passHref | ||
legacyBehavior | ||
> |
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.
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.
hmm, I'm struggling to replicate this
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 pulled the latest, running with run-concurrently
and both of first and subsequent loads these links don't work for me 🤔
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, I'm looking at the wrong links!
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.
tbf I might've commented the wrong one 😅
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 read up about legacyBehavior but didn't think to check the links!
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.
That'd be the last thing for me, otherwise good to go and very nice to see!
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](https://private-user-images.githubusercontent.com/6051896/408169892-1a5b4ecb-28af-4934-b6c5-8920e8b590c5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMDA0NjQsIm5iZiI6MTczOTEwMDE2NCwicGF0aCI6Ii82MDUxODk2LzQwODE2OTg5Mi0xYTViNGVjYi0yOGFmLTQ5MzQtYjZjNS04OTIwZThiNTkwYzUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDlUMTEyMjQ0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MDhmOTkyNDY2NzI4MjY2MDhlOTEzYmRiMWZhZjI5NjU0MzkzMTVhYTQ0YzdiZDQyNWIzYmE2Y2U5ZjQzMjRiNCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.EwOiwiyjGuTboxZlS07V7vs48d0Xxvwr4jZC--HVC0U)
Narrow screen:
![Screenshot 2025-01-30 at 14 43 32](https://private-user-images.githubusercontent.com/6051896/408169658-ce7fef4d-fc05-4c38-8a46-e571316107ae.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMDA0NjQsIm5iZiI6MTczOTEwMDE2NCwicGF0aCI6Ii82MDUxODk2LzQwODE2OTY1OC1jZTdmZWY0ZC1mYzA1LTRjMzgtOGE0Ni1lNTcxMzE2MTA3YWUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDlUMTEyMjQ0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZDBjOTM0NDQ2ODY2MTE0OTUzOGY4OWI2MWVlZjRmODk2MjY1MDc5MmFjMWQxMDAwYmY1N2IzZTAyNTEyNjEyMyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.R_E6xDLN3QRZ_EJcooZ7s-jxIyN1SVSEX8NsNvu26KE)
No results:
![Screenshot 2025-01-30 at 14 23 45](https://private-user-images.githubusercontent.com/6051896/408169579-5d2ebf1b-8a56-43f2-9341-78875355203a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMDA0NjQsIm5iZiI6MTczOTEwMDE2NCwicGF0aCI6Ii82MDUxODk2LzQwODE2OTU3OS01ZDJlYmYxYi04YTU2LTQzZjItOTM0MS03ODg3NTM1NTIwM2EucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDlUMTEyMjQ0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NGU1MmVhYzY5NDUzZmZiYmM5MzI1YTlmNTVkMWIzMDk2OGFhNDM5YWYwZmMyNDZjNTMyYWRjNWYwYzdlZTgyNSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.5qN1uHpKI5hyMa-pSm9dDIv4ZkLWPhJ_O2lPMdIxqi8)
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.