Skip to content

Releases: thecodezone/filament-mediazone

1.2.3

Choose a tag to compare

@ohiowebpro ohiowebpro released this 07 Oct 20:26
53846f8

What's Changed

  • Preserve saved order when rehydrating MediaPicker state by @preethi-09 in #13

New Contributors

Full Changelog: 1.2.2...1.2.3

1.2.2

Choose a tag to compare

@incraigulous incraigulous released this 15 Sep 21:38
da365f8

Fixed

  • Saving a crop no longer strips breakpoints from unrelated Media records. MediaPicker fields used without an explicit location fell back to the same literal 'custom' crop key, so every record sharing a directory looked like the same logical crop slot. The implicit key is now unique per record, and Media::removeBreakpointsFromSiblings() only touches siblings that share both a location and a key. See #11.

  • Re-editing a crop no longer silently renames it. The key was regenerated on every save, so editing a crop stored before this release broke any consumer referencing it by key — a host record's stored crop_key, or Media::getCrop() — leaving the picker to fall back to the uncropped source. Re-editing now preserves the stored key, matching how saveCrop() already reuses an existing crop's id and baked path. See #11.

  • Claiming breakpoints from another crop is now recoverable. The strip is correct in principle — two crops under one key can't both serve "mobile" — but it overwrote the list in place with no record of what was taken, and nothing restores an explicitly empty list. Both strip sites now record previous_breakpoints on the first strike only (an additive, backward compatible key), and the cropper falls back to all three breakpoints when a stored list is empty rather than keeping it empty. See #11.

  • Deleting a crop now removes the file from the disk it was baked to. Three paths still assumed a crop lived on its source's disk, so on a cross-disk setup the real file was orphaned and the delete was issued against the source's disk instead — destroying whatever occupied that path there. Completes the fix started in #8 for MediaObserver::deleted(). See #12.

Upgrade notes

  • Media::removeBreakpointsFromSiblings() gained a leading ?string $location parameter. This is a breaking signature change for any caller outside the package.

  • Editing a crop that currently serves no breakpoints now restores all three rather than preserving the empty list. This assumes an empty list is damage rather than intent; if a workflow deliberately saves a crop serving no breakpoints, that behavior has changed.

  • previous_breakpoints is only recorded going forward. Crops emptied before this release carry no history and are not repaired by upgrading.

1.2.1

Choose a tag to compare

@ohiowebpro ohiowebpro released this 10 Sep 15:08
cba1169

Fixed

  • MediaObserver::deleted() no longer deletes a shared "crops" directory that could belong to other, unrelated Media records — only the crop files that actually belong to the record being deleted are removed now, using each crop's own recorded disk/path. This also fixes crops stored on a different disk than their source never being cleaned up. See #8.