Repository navigation
Conversation
…matrix and Codecov - Require javaabu/forms ^2, manifest, permissions ^3, stencil and block-editor; drop javaabu/helpers, javaabu/activitylog v1 and javaabu/forms v1 - File types, mime types and upload sizes come from config (Support\FileTypes) - Media no longer implements AdminModel or logs activity by itself - Pint with the Javaabu rules, CI on PHP 8.4/8.5 x Laravel 12/13 x lowest/stable, coverage to Codecov, a guard against javaabu/helpers and settings ^1 - The old material-admin page tests are incomplete until the new views land (#9) Refs #1 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sions, JSON API
- Route::mediapicker([guard, prefix, name, middleware, controller]) replaces
Mediapicker::registerRoutes(); each guard can have its own library, and URLs are
built from the library the request came through
- The controller comes from config('mediapicker.media_controller') or the macro;
every action answers JSON (MediaResource) or a Blade/Inertia page
- view/view_others/edit/edit_others/delete/delete_others_media registered through
javaabu/permissions; MediaPolicy extends ResourcePolicy with ownership and is
overridable from config, permissions.policies or Gate::policy()
- MediaOwner no longer carries the can*Media() checks; the policy decides
- Uploads take a type, details (name, description, alt, caption) and crops
- Attachment conversion files are removed before the media's attachments go
Closes #10
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mats, srcset, crops
- AttachmentConversion: usingCrop(), formats(['avif', 'webp']) and
withResponsiveImages(); its file name carries a fingerprint of what it does, in
the media's conversions/attachments folder (safe from spatie's own clean)
- Identical conversions of different models share one file; same-named ones that
differ no longer overwrite each other; attaching media again processes nothing
- Generated sizes, formats and widths are recorded on the media; getAvailableUrl(),
getFormatUrl() and getSrcset() on attachments, and <x-mediapicker::image> renders
<picture> with modern sources, srcset, width and height
- Crops are stored per preset on the media (Cropper, PUT media/{id}/crops/{preset});
a new crop regenerates only the conversions that use it
- mediapicker:clean removes files no attachment of the media uses any more
- The library thumbnail is non-queued; formats the image driver can't write are skipped
Refs #3, refs #4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ld, cropper UI - Blade pages (forms v2) and Inertia React pages (mediapicker::Media/*) through manifest - <x-mediapicker::picker> with a framework-free picker dialog; React MediaPicker, MediaPickerField, MediaLibraryDialog, MediaCropper, Picture, StencilMediaPicker - Stencil MediaPickerField and the MediaDetailsForm; LibraryMedia validation rule; syncAttachmentsFromRequest(); updateAttachmentMedia() keeps order and reorders - Mediapicker::pickerConfig() and Mediapicker::image() for React - Vitest for the API client, dialog and Blade field; tests/js/react.test.tsx still fails to load @javaabu/onu/media (to fix next) Refs #2, refs #4, refs #9 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- image (replacing the core URL image), gallery, file and mediaVideo blocks for javaabu/block-editor: they pick from the library in the editor, keep the media id and a snapshot, and render the current media in Blade (snapshot in React) - Block content only accepts media the editor may see (LibraryMedia) - dist/ with the Blade picker, cropper and blocks for apps without Vite; CI checks it - CI job for TypeScript: lint, format, typecheck, Vitest with coverage, dist - React tests load Onu's media components; page and block tests Closes #5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Name, description, alt text and caption translate with javaabu/translatable's JSON storage: a migration adds nullable translations/lang to the media table, and Models\Translatable\Media is used when translatable is on and no model is configured - Uploads, updates, the stencil details form and MediaResource take values per locale - Media::url() becomes libraryUrl(), as translatable's own url() needs the name - Feature detection also checks translatable's provider is loaded; a CI leg runs without the package - Conversion fixtures use fit(Fit::Crop) so lowest spatie/image agrees Refs #11 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- lang/en.json and lang/dv.json for every string: pages, pickers, editor blocks, permission descriptions, crop presets and file types - Tests: every string has both languages, Dhivehi keeps its placeholders, the TypeScript strings match PHP, and views, components and CSS use only logical directions Refs #8 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ine and skill - Docusaurus pages: intro, requirements, installation, upgrading from the unreleased main, the library, picker fields, attachments, conversions, cropping, block editor blocks, configuration, JSON API, permissions, overriding, translatable, Dhivehi and RTL (with a review list), JavaScript, API reference - llms.txt with the rules and every page; tests check its links - resources/boost guideline and the javaabu-mediapicker skill with references - AGENTS.md and CLAUDE.md; README and CHANGELOG - React entry and pages import the stylesheet; apps get Onu media's peers from manifest - mediapicker:clear's --force option works Closes #6, closes #7 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… in tests Same safeguard as javaabu/forms (Javaabu/forms#21). Boost leaves a guideline out of apps' AGENTS.md when Blade can't render it, and its placeholders cover component tags and backticks but not every directive or echo. The current guideline already rendered on Boost 2.10.0 and 2.10.4; the verbatim block keeps future examples safe. BoostTest renders every .blade.php under resources/boost with Boost's RendersBladeGuidelines (laravel/boost ^2.10 in require-dev, so prefer-lowest tests 2.10.0). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Blade scripts (picker, cropper, blocks) import only cropperjs and @tiptap/core, so those stay in the assets scope. @javaabu/forms, @javaabu/onu and the Onu media libraries, with the react, react-dom and @inertiajs/react peers, move to npm(..., for: 'pages'), so manifest:check in a Blade-only app no longer asks for React packages (Javaabu/manifest#17). ManifestCheckTest runs manifest:check against a Blade-only and an Inertia package.json fixture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Composer read composer.json from every branch and tag of each VCS repository through the GitHub API: about 350 calls per CI job, around 3,800 per run. A second run within the hour exhausted the workflow token's limit, and Composer failed with "Could not authenticate against github.com" (Javaabu/exports#2, Javaabu/translatable#4). "no-api": true makes Composer clone these repositories instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every job downloaded each package's zipball from api.github.com, around 140 calls a job, which counts against the workflow token's hourly limit. Each job now restores Composer's files cache, keyed by job, matrix entry and composer.json/composer.lock, and falls back to the job's last cache when those change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
javaabu/mediapicker v1.0 (next-gen)
This turns the unreleased version on
maininto v1.0 for the Javaabu next-gen stack. It was built on the forkn4ff4h/mediapicker(next-gen), tracked by n4ff4h#13. CI is green on every job: PHP 8.4/8.5 × Laravel 12/13 × lowest/stable, Pint with the javaabu/helpers guard, TypeScript (lint, format, typecheck, Vitest,distfreshness), and a run without javaabu/translatable. There are 180 PHPUnit tests and 34 Vitest tests.What's in it
Route::mediapicker([guard, prefix, name, middleware, controller]), with one library per guard.MediaResource).view/edit/delete(_others)_mediapermissions registered through javaabu/permissions, and aMediaPolicybuilt onResourcePolicywith ownership.mediapicker::Media/*, through manifest), with a committeddistfor apps without Vite.<x-mediapicker::picker>in Blade, ReactMediaPicker/MediaPickerField/MediaLibraryDialog, and a stencilMediaPickerField.LibraryMediarule only accepts media the user may see.syncAttachmentsFromRequest()saves a picker field to an attachment collection.conversions/attachments: shared between models, never made twice, and no longer overwriting each other.<x-mediapicker::image>and React<Picture>.mediapicker:cleanremoves stale files per media.image(replacing the core URL image),gallery,fileandmediaVideoblocks that pick from the library.lang/en.jsonandlang/dv.json, logical CSS throughout, and Thaana inputs.docs/,llms.txt, a Laravel Boost guideline (in a verbatim block, rendered by Boost in tests) and skill, and AGENTS.md.Upgrade notes (from the unreleased
main)Full guide:
docs/upgrading.md.Mediapicker::registerRoutes()is replaced byRoute::mediapicker(), and the?mode=pickerpage is gone.MediaOwnerloses thecan*Media()methods (the policy decides).userVisible()/findForController()becomevisibleTo($user)/inLibraryOf($user). Runphp artisan permissions:sync.Mediano longer implementsAdminModelor logs activity.$media->url()becomes$media->libraryUrl(), andgetIcon()returns Lucide names.mediapicker.file_types.pdfis now part ofdocument, WebP and AVIF are images, and SVG is off by default.php artisan mediapicker:regenerate, thenmedia-library:clean.updateAttachmentMedia()now returns the whole collection in order and reorders existing attachments.material-admin-26views and their config keys are gone. Useviews,layoutandlayout_section.Bugs fixed on the way
updateAttachmentMedia()used astaticcounter that leaked between calls, and couldn't find media that were already attached.mediapicker:clear --forcehad a broken option name.Before you merge or release
CODECOV_TOKENavailable to the repo (uploads are rejected without it; CI doesn't fail).docs/advanced-usage/dhivehi-and-rtl.md#needs-review.composer.json.🤖 Generated with Claude Code