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 sure (re)scan buttons show up immediately after uploading an image #256

Merged
merged 2 commits into from
Oct 28, 2020

Conversation

dkotter
Copy link
Collaborator

@dkotter dkotter commented Oct 28, 2020

Description of the Change

Right now, if you upload an image directly to the media library and then click on that image to open the modal view, the scan/rescan buttons won't show up. You have to refresh the page before you see those.

The issue here is we have a check for the current screen and only show those buttons if the screen object doesn't exist. Not sure the historical context here but this does force a page refresh to see those settings, which is not ideal.

In testing, I don't see any issues with removing that check and it does fix the problem.

Alternate Designs

None

Benefits

Scan buttons show up immediately, without requiring a page refresh

Possible Drawbacks

Whatever the original reason there was for adding this check (for instance, to solve some sort of error), that could happen again, now that the check is gone. I've not run into any issues testing this though.

Verification Process

In the media library grid view, upload a new image and then click on that image to open the modal view. Ensure the scan buttons are showing up.

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

…ately after uploading an image, no refresh required
@dkotter dkotter self-assigned this Oct 28, 2020
@jeffpaul jeffpaul added this to the 1.6.0 milestone Oct 28, 2020
@helen helen merged commit 54f1b0c into develop Oct 28, 2020
@helen helen deleted the fix/refresh-for-scan-settings branch October 28, 2020 21:26
@jeffpaul
Copy link
Member

@ryanwelcher if you manage to have time to review the historical changes we're removing it would be helpful to understand if there was a reasoning for them that we should still account for or if we're 👍🏼 to blaze a trail forward

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