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

Ensure manual image scanning still works if the automatic scanning is turned off #233

Merged
merged 1 commit into from
Oct 19, 2020

Conversation

dkotter
Copy link
Collaborator

@dkotter dkotter commented Oct 16, 2020

Description of the Change

If either the Automatically Caption Images or Automatically Tag Images settings are turned off, we still output the manual scan/rescan buttons when editing an individual image. But those buttons don't work, as we check the aforementioned settings when making a request to get image details and if those settings are disabled, we don't request the proper image details.

This PR fixes that, so if manual scanning is triggered, this overrides the automatic setting, so even if that setting is turned off, the manual scan will still work. Automatic scanning for newly uploaded images still respect that setting though, this only applies to manual scans.

Alternate Designs

We could remove the manual scan buttons all together if the automatic scanning is turned off

Benefits

Manual scanning works properly even if the automatic scanning is turned off. At the moment, those buttons show but won't work properly

Possible Drawbacks

None

Verification Process

  1. Setup the plugin
  2. Turn off the settings for either Automatically Caption Images or Automatically Tag Images (or both)
  3. Edit an existing image or upload a new one
  4. Select that image and in the image modal that pops up, click the button that corresponds to the setting turned off above
  5. Processing should work correctly and the spinner should disappear and either alt text is added or tags are added (if either can be found)

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.

Applicable Issues

#232

…ging (or both), ensure the manual scan buttons still work
@jeffpaul jeffpaul added this to the 1.6.0 milestone Oct 16, 2020
@jeffpaul jeffpaul linked an issue Oct 16, 2020 that may be closed by this pull request
@jeffpaul jeffpaul added the type:bug Something isn't working. label Oct 16, 2020
Copy link
Contributor

@dinhtungdu dinhtungdu left a comment

Choose a reason for hiding this comment

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

Great work! This makes a lot of sense to me.

@jeffpaul jeffpaul merged commit ad4902a into develop Oct 19, 2020
@dkotter dkotter deleted the fix/manual-image-scan branch October 19, 2020 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rescan buttons don't work if automatic tagging is turned off
3 participants