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 an "Add a new book" option if search returns no matches #10123

Merged

Conversation

longbui23
Copy link
Contributor

@longbui23 longbui23 commented Dec 6, 2024

Co-authored-by: QuangPhung15 phunghuyquang150904@gmail.com

Closes #10049

This PR does these things:

  • Add an option to "add a new book" when no results are found on the book search page
  • Ensure the layout aligns with the page and stakeholder expectations

Technical

  • Choose button element since I saw that there is a figma template for button redesignation project in fellowship opportunities --> later could be easily track down this one to remodify the button?
  • Insert an HTML anchor (<a>) element with the following attributes:
    • href="/books/add": Links to the "/books/add" route
    • class="btn btn-primary": Applies Bootstrap button styling
    • Content: Displays localized text for "Add a new book" using $_() function
    • Enclosed in a closing </div> tag, suggesting it's part of a container

Testing

  • Use the automatic testing.
  • Confirm that the new button is added for adding a new book if no results are found on the book search page
  • Cross-check for any visual inconsistencies on related pages and expectations of the stakeholder.

Screenshot

Screen.Recording.2024-12-05.at.9.51.30.PM.mov

Stakeholders

@RayBB

longbui23 and others added 2 commits December 5, 2024 21:53
Co-authored-by:QuangPhung15 <phunghuyquang150904@gmail.com>
@longbui23 longbui23 marked this pull request as ready for review December 6, 2024 02:57
@RayBB RayBB added the Needs: Staff / Internal Reviewed a PR but don't have merge powers? Use this. label Dec 6, 2024
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.

Great job! Looks perfect to me 👍

Now we just need a review/merge from @cdrini !

@cdrini cdrini changed the title Update work_search.html Add an "Add a new book" option if search returns no matches Dec 10, 2024
Copy link
Collaborator

@cdrini cdrini left a comment

Choose a reason for hiding this comment

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

Works like a charm, thank you @longbui23 !

@cdrini cdrini assigned RayBB and unassigned cdrini Dec 11, 2024
@cdrini cdrini merged commit 4ded266 into internetarchive:master Dec 11, 2024
3 checks passed
@longbui23
Copy link
Contributor Author

Thank you so much, @cdrini, for reviewing the code and improving it! Looking forward to contributing more to OL!

@longbui23 longbui23 deleted the 10049/features/add-book-when-no-result branch December 13, 2024 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Staff / Internal Reviewed a PR but don't have merge powers? Use this.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add an option to "add a new book" when no results are found on the book search page
3 participants