Repository navigation
Conversation
Replaces the plain "Photo URL" text input with a drag-and-drop upload widget backed by LiveView's file upload primitives and MediaStorage. - mount/1 registers a single-file upload slot (:photo, gif/png/jpg/jpeg) - Save handler calls consume_uploaded_entries → MediaStorage.upload_file! and injects the returned URL into params; falls through unchanged when no file is selected so the hidden input preserves the existing photo - cancel_upload event removes a pending entry before save - Template shows existing photo preview (with hidden input to preserve it through form submits), drag-and-drop zone with live_file_input, pending entry preview via live_img_preview, and per-entry error display Tests cover: existing photo renders in edit form, dropzone markup is present, pending upload preview appears after file selection, and cancel removes the preview.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
neal-bpm
marked this pull request as ready for review
October 8, 2026 04:17
Contributor
Author
|
Superseded by #540. Work consolidated into vn/community-fridge-feature for unified review. |
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.
Describe your changes
Replaces the plain "Photo URL" text input in the community fridge form with a proper drag-and-drop file upload widget. The widget is built on Phoenix LiveView's native file upload primitives and persists files via
MediaStorage. It handles new uploads, preserves existing photos through re-submits, supports cancellation of pending entries before save, and validates file type and size client-side.Tests cover: existing photo renders in edit form, dropzone markup is present, pending upload preview appears after file selection, and cancel removes the preview.
Checklist before requesting a review
about this update in the description above.