Repository navigation
feat: event page with photos and an upload area - #109
Merged
Merged
Conversation
GET /staff/events/{id}/photos returns every photo of an event (status,
visibility, face count) with a total, and /photos/{id}/image streams the
image from storage. Any signed-in staff member can read them. The two
photo queries are added to db/queries/photos.sql and hand-written in the
generated module because make gen needs db/schema.sql.
New /multi/events/$eventId page: a photo grid (24 at a time, load more) and the bulk uploader, so photos can be seen and added from the event itself. Event cards link to it, and the Upload button now shows for archived events too.
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.
Asked for: on the Events page, see an event's pictures and be able to upload to it.
Backend
GET /staff/events/{id}/photos?limit&offset→{total, items[]}(status, visibility, face count).GET /staff/events/{id}/photos/{photo_id}/imagestreams the image; 404 if the photo belongs to another event.db/generated/photos.py(make genneedsdb/schema.sql), please re-runmake gento confirm.Frontend
/multi/events/$eventId: photo grid with load-more, the existing bulk uploader, a link to Drop a Drive. The grid refreshes as uploads finish.Test
Backend: 2 new unit tests pass, ruff/mypy clean. Frontend: tsc and eslint clean for the touched files. Not checked in a browser yet.
Known limit
The grid loads full-size originals (1 to 5 MB each) lazily, 24 per page. Thumbnails would be the next improvement.