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

Image: Reflect media deletion in the editor #35973

Merged
merged 11 commits into from Dec 14, 2021

Commits on Dec 13, 2021

  1. initial commit. listening out for changes to the attachments collecti…

    …on and passing to onRemove prop.
    ramonjd committed Dec 13, 2021
    Configuration menu
    Copy the full SHA
    1cbe5aa View commit details
    Browse the repository at this point in the history
  2. Removing console.log

    ramonjd committed Dec 13, 2021
    Configuration menu
    Copy the full SHA
    ce2d06d View commit details
    Browse the repository at this point in the history
  3. Reverting component changes

    ramonjd committed Dec 13, 2021
    Configuration menu
    Copy the full SHA
    5318480 View commit details
    Browse the repository at this point in the history
  4. Adding a store to media utils

    ramonjd committed Dec 13, 2021
    Configuration menu
    Copy the full SHA
    1e9992b View commit details
    Browse the repository at this point in the history
  5. Rolling back historical experimental commits.

    Now relying on the `onClose` event of the media upload, and the media object to test if the media has been "destroyed."
    ramonjd committed Dec 13, 2021
    Configuration menu
    Copy the full SHA
    2f4a0d8 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6c2e873 View commit details
    Browse the repository at this point in the history
  7. Winding this back to check if an image exists when the editor loads.

    This removes the `isSelected` check, but also removes a bunch of code as well.
    We could run the same check on `isSelected`... TBC
    ramonjd committed Dec 13, 2021
    Configuration menu
    Copy the full SHA
    f6516b3 View commit details
    Browse the repository at this point in the history
  8. Removed the onerror listener and relying on the error handler already…

    … added to the Image props
    ramonjd committed Dec 13, 2021
    Configuration menu
    Copy the full SHA
    8dac4ae View commit details
    Browse the repository at this point in the history
  9. Fixed grammatical mistake.

    ramonjd committed Dec 13, 2021
    Configuration menu
    Copy the full SHA
    5410b0b View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2021

  1. Configuration menu
    Copy the full SHA
    6859bd6 View commit details
    Browse the repository at this point in the history
  2. Only delete image source URL and ID when detecting a destroyed image.…

    … That way the caption, title and alt values persist in case the user deletes, then replaces.
    ramonjd committed Dec 14, 2021
    Configuration menu
    Copy the full SHA
    0bfc431 View commit details
    Browse the repository at this point in the history