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

Make subject page work count a link to search results #6176

Conversation

mheiman
Copy link
Collaborator

@mheiman mheiman commented Feb 23, 2022

This minor change addresses the underlying complaint in issue #2375 — that the subject page is a dead-end from which it isn't possible to get to a list of all the works that match the subject (/time/place/person/etc), which is kind of what you expect the subject page to do. I'll let someone else decide whether it actually closes the issue.

Technical

This fix adds a link to the text "N works" next to the subject title; the link performs a work search for that subject.

I would have liked to have formed the search URL based on the subject term slug in the page URL, but that value isn't trivially available in the environment, so I copied the behavior elsewhere on the template of using a minimally-encoded page name string.

Testing

Visit a variety of subject pages and see if the search link works as expected.

Stakeholders

@mheiman @mekarpeles

Attribution Disclaimer: By proposing this pull request, I affirm to have made a best-effort and exercised my discretion to make sure relevant sections of this code which substantially leverage code suggestions, code generation, or code snippets from sources (e.g. Stack Overflow, GitHub) have been annotated with basic attribution so reviewers & contributors may have confidence and access to the correct context to evaluate and use this code.

Make the work count a link that points to the corresponding search
@mekarpeles
Copy link
Member

I think this lgtm! @jimchamp may I ask you to take this PR and thow it on testing if you have time?

Copy link
Member

@mekarpeles mekarpeles left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Collaborator

@jimchamp jimchamp left a comment

Choose a reason for hiding this comment

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

This makes sense, and should be handy to folks. Lgtm and works as expected.

@jimchamp jimchamp merged commit af21830 into internetarchive:master Mar 1, 2022
@mheiman mheiman deleted the 2375/feature/subject_page_link_to_search branch March 15, 2022 19:04
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