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

Update item count on deletion #4518

Merged
merged 4 commits into from
Feb 4, 2021

Conversation

Sabreen-Parveen
Copy link
Collaborator

Closes #4517

Updates item count whenever an item is deleted by a patron.

Technical

Testing

Screenshot

Stakeholders

@cdrini cdrini self-assigned this Feb 2, 2021
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.

1 thing to try; it looks like the code for this is here, but is updating the wrong element!

openlibrary/templates/type/list/view.html Outdated Show resolved Hide resolved
openlibrary/templates/type/list/view.html Outdated Show resolved Hide resolved
@cdrini cdrini added the Needs: Submitter Input Waiting on input from the creator of the issue/pr [managed] label Feb 2, 2021
@jdlrobson jdlrobson removed their request for review February 2, 2021 22:40
@@ -112,7 +112,7 @@ <h1>$list.name</h1>
remove_seed(list_key, seed, function() {
\$(seed_id).remove();
// update seed count
\$("#seed-count").html(render_seed_count(get_seed_count()));
\$("#list-items-count").html(render_seed_count(get_seed_count()));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sigh it did this :P
image

Let's use your initial load function; that will work better 👍

@cdrini cdrini added the On Staging On staging.openlibrary.org label Feb 3, 2021
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.

Lgtm; tested that it makes the request on staging. Staging has caching issues, so the number didn't update :P But that will be fixed when it gets to production.

@cdrini cdrini merged commit e995bb7 into internetarchive:master Feb 4, 2021
Sabreen-Parveen added a commit to Sabreen-Parveen/openlibrary that referenced this pull request Feb 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Submitter Input Waiting on input from the creator of the issue/pr [managed] On Staging On staging.openlibrary.org
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect item count displayed when a user deletes an item
2 participants