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

[Bug Fix] Prevent the expanding/collapsing of the subject area when the link is being clicked #6445

Conversation

dbouris
Copy link
Contributor

@dbouris dbouris commented Apr 17, 2022

Closes #6361

With this fix, we achieve preventing collapsing and expanding of the subject area while a link from the a tag in being clicked.

Technical

We attached to the jQuery click event handler an argument in order to check if the nodeName of the tag is a. If this is true, there is no need to expand/collapse and the user should be redirected to the corresponding page.

Testing

On the book page, click a link on the Subjects, People or Pages. The list expands which is an incorrect behavior before redirecting.

Screenshot

book-page-subjects-not-expanding.mp4

Stakeholders

@cdrini
@jimchamp

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.

Philippos01 and others added 9 commits April 16, 2022 11:28
…ubject-area' of github.com:Philippos01/openlibrary into 6361/Bug-Fix/subject-tags-simultaneously-collapse-the-subject-area
…ubject-area' of github.com:Philippos01/openlibrary into 6361/Bug-Fix/subject-tags-simultaneously-collapse-the-subject-area
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 should be good to merge once the requested changes have been made.

openlibrary/plugins/openlibrary/js/readmore.js Outdated Show resolved Hide resolved
@jimchamp jimchamp added the Needs: Submitter Input Waiting on input from the creator of the issue/pr [managed] label Apr 19, 2022
Philippos01 and others added 4 commits April 19, 2022 23:03
Co-authored-by: jimchamp <jameschamp@acm.org>
Co-authored-by: jimchamp <jameschamp@acm.org>
Co-authored-by: jimchamp <jameschamp@acm.org>
Co-authored-by: jimchamp <jameschamp@acm.org>
@Philippos01
Copy link
Contributor

@jimchamp we commited the proposed changes.

dbouris and others added 5 commits April 20, 2022 16:43
@cdrini cdrini assigned cdrini and unassigned jimchamp Apr 20, 2022
@cdrini cdrini removed the Needs: Submitter Input Waiting on input from the creator of the issue/pr [managed] label Apr 20, 2022
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.

Lgm! Tested on gitpod. Clicking header expands. Clicking anchor does not. Yaaay unit tests!

@cdrini
Copy link
Collaborator

cdrini commented Apr 20, 2022

Talked with @jimchamp ; taking this to try to get it in today's deploy 👍

@cdrini cdrini merged commit 1e3cf58 into internetarchive:master Apr 20, 2022
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.

Make subjects + arrow clickable (expand/collapse) but not the subject tags itself
4 participants