Skip to content

Fixes #5531 Circular Progress bar keeps on moving when nomination for deletion is successful. #5610

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

Conversation

neeldoshii
Copy link
Contributor

Fixes

Description

This pull request addresses an issue where the circular progress bar remains active and keeps moving even after a nomination for deletion is successful. The fix ensures that the progress bar is hidden and the UI is updated correctly upon successful deletion also the Snackbar is shown when the nomination is done successfully.

Changes

  • Modified the onDeleteClicked() & onDeleteClickeddialogtext & created a handleDeletionResult() for handling what to do on success, created a handleDeletionError() for handling what to do on failure.
  • Ensured that UI updates are performed on the UI thread to prevent potential CalledFromWrongThreadException.

Test Plan

Steps to Test

  1. Open the app.
  2. Open any contribution.
  3. Click on the nomination for deletion.
  4. Observe the progress bar behavior after the nomination process completes.

Expected Results

  • The circular progress bar should disappear, indicating that the process has completed.
  • The user should see a confirmation message indicating the successful nomination for deletion.

Screenshots

Additional Information

  • Tested on both emulators and physical devices to verify the fix.

@neeldoshii neeldoshii marked this pull request as draft March 6, 2024 16:16
@neeldoshii neeldoshii force-pushed the Circular-Progress-bar-nomination-for-deletion-#5531 branch from 9b387c7 to c298657 Compare March 6, 2024 17:30
@neeldoshii neeldoshii marked this pull request as ready for review March 6, 2024 18:57
@neeldoshii
Copy link
Contributor Author

Special thanks to @kanahia1 for giving me the opportunity to contribute to this issue and for the keen observation in identifying this bug.

@neeldoshii
Copy link
Contributor Author

Just a friendly ping @nicolas-raoul @RitikaPahwa4444 , can you please Review this pr and let me know if there is any change required.

@nicolas-raoul
Copy link
Member

Very strangely, even though CI is running fine, I am getting this when building, any idea why?

> Task :app:compileProdDebugJavaWithJavac
The following annotation processors are not incremental: dagger-android-processor-2.23.jar (com.google.dagger:dagger-android-processor:2.23), dagger-compiler-2.23.jar (com.google.dagger:dagger-compiler:2.23).
Make sure all annotation processors are incremental to improve your build speed.
/Users/nicolasraoul/src/commons-app/app/src/main/java/fr/free/nrw/commons/media/MediaDetailFragment.java:1235: error: cannot find symbol
            if (progressBarDeletion != null) {
                ^
  symbol:   variable progressBarDeletion
  location: class MediaDetailFragment
/Users/nicolasraoul/src/commons-app/app/src/main/java/fr/free/nrw/commons/media/MediaDetailFragment.java:1236: error: cannot find symbol
                progressBarDeletion.setVisibility(GONE);
                ^
  symbol:   variable progressBarDeletion
  location: class MediaDetailFragment
/Users/nicolasraoul/src/commons-app/app/src/main/java/fr/free/nrw/commons/media/MediaDetailFragment.java:1244: error: cannot find symbol
            delete.setText("Nominated for Deletion");
            ^
  symbol:   variable delete
  location: class MediaDetailFragment

Copy link
Member

@nicolas-raoul nicolas-raoul left a comment

Choose a reason for hiding this comment

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

CI unfortunately fails after rebasing on the main branch.
Would you mind fixing?
Thanks a lot! :-)

@neeldoshii neeldoshii marked this pull request as draft January 4, 2025 22:19
@rohit9625
Copy link
Collaborator

rohit9625 commented May 25, 2025

Hey @neeldoshii, any updates on this PR? If you're not available then I can help you fix the issues. Just let me know :)

@neeldoshii
Copy link
Contributor Author

feel free to take it, I am quite occupied.

@rohit9625
Copy link
Collaborator

rohit9625 commented May 25, 2025

I guess, I'll need write permissions to your branch to be able to commit changes. Would you mind giving me the write permissions? Also, please unmark it as Draft PR.

@nicolas-raoul
Copy link
Member

Thanks both!

@rohit9625 The best is for you to start a new branch and pull from this one. :-) Also, could you please comment at #5531 so that I can assign you?

@rohit9625
Copy link
Collaborator

Hi @neeldoshii,
When testing, is the image marked for nomination successfully? I'm testing on BetDebug and found that the getAchievements function is failing silently. Does that feature to nominate for deletion work for betaDebug, @nicolas-raoul?

@nicolas-raoul
Copy link
Member

Many features do not work on beta, this might indeed be one of them.

@neeldoshii
Copy link
Contributor Author

When testing, is the image marked for nomination successfully? I'm testing on BetDebug and found that the getAchievements function is failing silently.

Hi @rohit9625, yes for working on Nomination for deletion works only on prod and achievements feature is also only available for prod. Just note don't perform mass deletion you might get banned from wikimedia as I got banned 2 years back.

I guess, I'll need write permissions to your branch to be able to commit changes. Would you mind giving me the write permissions? Also, please unmark it as Draft PR.

Sure, any idea how can I give you write permission for a specific branch?

@rohit9625
Copy link
Collaborator

Thanks for the information about that and don't worry I created a branch and pulled from yours.

@neeldoshii
Copy link
Contributor Author

Ok. I am closing this PR as the work is now carried forward on #6324. Thanks @rohit9625

@neeldoshii neeldoshii closed this May 26, 2025
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.

[Bug]: Circular Progress bar keeps on moving even though nomination for deletion is successful
3 participants