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

Redesign search box on search pages #9146

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

0simoo
Copy link

@0simoo 0simoo commented Apr 24, 2024

Closes #9086

Feature: New frontend change to search UI. Replaced old search text input and button with new design.

Technical

This fix also tries to solve a visual bug where the space underneath the searchboxes were different in height (varied in height from books search, subjects search, etc.)
This is mostly fixed, except for the Authors search due to a div called contentMeta that is taking up space under the searchbox.

Testing

Changes can be seen at https://openlibrary.org/search
The new design should be present for all 6 types of searches (books, authors, search inside, subjects, lists, advanced search)

Screenshot

Old search button:
old
New search button:
new
New search button on mobile:
mobile

Stakeholders

@jimchamp @RayBB @mekarpeles

@RayBB
Copy link
Collaborator

RayBB commented May 3, 2024

@0simoo please see the comment here #9086 (comment)

Copy link
Collaborator

@RayBB RayBB left a comment

Choose a reason for hiding this comment

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

@0simoo
A few small comments, but the main thing is that from the comment here @mekarpeles wants you to use the magnifying glass instead of the word "search"

One you do that and add these other small comments I think we'll be good to go!

openlibrary/templates/search/advancedsearch.html Outdated Show resolved Hide resolved
openlibrary/templates/search/authors.html Show resolved Hide resolved
openlibrary/templates/search/search_bar.html Outdated Show resolved Hide resolved
@0simoo 0simoo requested a review from RayBB May 9, 2024 23:55
@0simoo
Copy link
Author

0simoo commented May 10, 2024

I made a few more changes (sorry for using so many commits), let me know what you think!

Copy link
Collaborator

@RayBB RayBB left a comment

Choose a reason for hiding this comment

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

@0simoo good work on this one! A few comments.

  1. Can you make it so the font size is uniform across all the pages?
  2. Can you make the height below the search bar on each space equal (see video)
  3. Can you make the touch target bigger (maybe even square?) for the search icon? (see pictures)
  4. Lets make the background color white (design folks might have different opinions once they see it).

PS: once you do these I'll ping the design team for comments 👍

search.Open.Library.-.10.May.2024.mp4
Small touch target Larger touch target
PXL_20240510_111455327-min PXL_20240510_111506933-min

@mekarpeles mekarpeles added the Needs: Submitter Input Waiting on input from the creator of the issue/pr [managed] label May 13, 2024
@github-actions github-actions bot removed the Needs: Submitter Input Waiting on input from the creator of the issue/pr [managed] label May 18, 2024
@RayBB
Copy link
Collaborator

RayBB commented May 22, 2024

@0simoo are you still working on this or are your latest changes ready for review?
If possible, could you resolve the merge conflict that the pr now has?

@RayBB RayBB added the Needs: Submitter Input Waiting on input from the creator of the issue/pr [managed] label May 22, 2024
@github-actions github-actions bot removed the Needs: Submitter Input Waiting on input from the creator of the issue/pr [managed] label May 22, 2024
@0simoo
Copy link
Author

0simoo commented May 22, 2024

@RayBB I think I've made all of the changes except for the height issue. I've gotten all the tabs to be the same height except for the Authors search. It look like a div called contentMeta is the reason why the Authors search is a different height from everything else.

I can continue working on this if you'd like, but I've started my internship recently so my progress might be slower.

@RayBB
Copy link
Collaborator

RayBB commented May 22, 2024

@0simoo thanks your changes are working great.
Lets leave contentmeta for another issue so we can get this one merged in! I tried a quick change to it and it is a little odd so lets not hold this up for that.

Copy link
Collaborator

@RayBB RayBB left a comment

Choose a reason for hiding this comment

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

Looks really good just one small change! I'm gonna mark as needing staff now so as soon as you push that fix they can check it out.

static/css/components/work.less Outdated Show resolved Hide resolved
@RayBB RayBB added the Needs: Staff / Internal Reviewed a PR but don't have merge powers? Use this. label May 22, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 16.20%. Comparing base (de01ae3) to head (936186d).
Report is 11 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #9146   +/-   ##
=======================================
  Coverage   16.20%   16.20%           
=======================================
  Files          91       91           
  Lines        4740     4740           
  Branches      822      822           
=======================================
  Hits          768      768           
  Misses       3460     3460           
  Partials      512      512           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

static/css/components/work.less Outdated Show resolved Hide resolved
@cdrini cdrini added the On testing.openlibrary.org This PR has been deployed to testing.openlibrary.org for testing label May 23, 2024
@cdrini
Copy link
Collaborator

cdrini commented May 23, 2024

Howdy! Put this up on testing. It's looking great! A few fixes:

  1. The height looks a little too big; let's make it 30px
  2. The focus state is broken; when you tab over the search box, it should it should have the browser native glow. This is important for accessiblity. E.g.

image

  1. The text doesn't appear in the input field. E.g. https://testing.openlibrary.org/search?q=hello Doesn't show "hello" in the search box.
  2. Mobile isn't quite working right:

image

The design is looking fantastic though, can't wait to start using this everywhere! Nice work!

static/css/components/buttonSearch.less Outdated Show resolved Hide resolved
static/css/components/buttonSearch.less Outdated Show resolved Hide resolved
static/css/components/buttonSearch.less Outdated Show resolved Hide resolved
static/css/components/buttonSearch.less Outdated Show resolved Hide resolved
openlibrary/templates/search/search_bar.html Outdated Show resolved Hide resolved
max-width: 93% !important;
}

.search-btn {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This doesn't really make sense in this file ; this css file is just about the searchbox; this is kind of just a random other button :P This should be based on our exisitng cta-btn, which correctly handles things like font size, hover states etc.

See where .cta-btn is defined, and add a new one, cta-btn--search. Then to the element, add class="cta-btn cta-btn--search"

@cdrini cdrini added Needs: Submitter Input Waiting on input from the creator of the issue/pr [managed] and removed Needs: Staff / Internal Reviewed a PR but don't have merge powers? Use this. labels May 23, 2024
@github-actions github-actions bot removed the Needs: Submitter Input Waiting on input from the creator of the issue/pr [managed] label May 25, 2024
@0simoo
Copy link
Author

0simoo commented May 25, 2024

I think I implemented all the changes. Let me know if there are any issues!

@RayBB
Copy link
Collaborator

RayBB commented May 25, 2024

@0simoo I'll have some time to review this in the next few days. Could you provide some screenshots of what it now looks like on desktop and mobile?

@0simoo
Copy link
Author

0simoo commented May 25, 2024

Desktop:
desktop
Mobile:
mobile

Copy link
Collaborator

@RayBB RayBB left a comment

Choose a reason for hiding this comment

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

I have a few more suggestions here that I'm going to merge in and deploy to testing and then look again so we can do another round of feedback 👍

static/css/components/work.less Outdated Show resolved Hide resolved
static/css/components/searchbox.less Outdated Show resolved Hide resolved
openlibrary/templates/search/searchbox.html Outdated Show resolved Hide resolved
static/css/components/searchbox.less Outdated Show resolved Hide resolved
static/css/components/searchbox.less Outdated Show resolved Hide resolved
static/css/components/searchbox.less Outdated Show resolved Hide resolved
static/css/components/searchbox.less Outdated Show resolved Hide resolved
Copy link
Collaborator

@RayBB RayBB left a comment

Choose a reason for hiding this comment

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

I think it looks pretty great now. Latest version is on testing.
Lets have @cdrini take another look..

Mobile:
image
Desktop:
image

@RayBB
Copy link
Collaborator

RayBB commented May 26, 2024

@0simoo good work on this so far!

@cdrini cdrini changed the title Fix unify search buttons Redesing search box on search pages May 27, 2024
@cdrini cdrini changed the title Redesing search box on search pages Redesign search box on search pages May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
On testing.openlibrary.org This PR has been deployed to testing.openlibrary.org for testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unify style of search buttons
5 participants