Repository navigation
Releases: thecodezone/filament-mediazone
Release list
1.2.3
What's Changed
- Preserve saved order when rehydrating MediaPicker state by @preethi-09 in #13
New Contributors
- @preethi-09 made their first contribution in #13
Full Changelog: 1.2.2...1.2.3
1.2.2
Fixed
-
Saving a crop no longer strips breakpoints from unrelated
Mediarecords.MediaPickerfields 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, andMedia::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, orMedia::getCrop()— leaving the picker to fall back to the uncropped source. Re-editing now preserves the stored key, matching howsaveCrop()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_breakpointson 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 $locationparameter. 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_breakpointsis only recorded going forward. Crops emptied before this release carry no history and are not repaired by upgrading.
1.2.1
Fixed
MediaObserver::deleted()no longer deletes a shared "crops" directory that could belong to other, unrelatedMediarecords — 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.