Repository navigation
Conversation
Timelines already supported image uploads in the model and upload endpoint, but the timeline editor had no way to reach them, so timeline cards were stuck on the stock header image. Add an Images button beside View that opens the shared content gallery (upload, reorder, set cover) in a modal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RVaA9Va1rv4KddobfGZCD4
…ndow - Editor: replace the Images button with a cover slot above the title. It shows the cover (with an Edit images button) or an "Add a cover image" prompt, opens the Images window, and is re-rendered when the window closes. - The gallery loads into the window on first open (timelines#gallery over XHR) instead of with every editor page view. - Without JavaScript the cover slot links to timelines#gallery as a page of its own, and timelines#update saves the gallery form's files through ImageUploadService, so bandwidth is charged. The upload loop shared with ContentController moves to the UploadsGalleryImages concern. - Timeline page: cover banner when there is a cover (private images only for people who can edit), and title, description and og:image/twitter tags. - Images and Share windows: Escape closes them (but not while the image viewer or framing editor is open on top), Tab stays inside, focus returns to what opened them, the page behind stops scrolling, and they sit above the site sidebar (z-60). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RVaA9Va1rv4KddobfGZCD4
The timeline page and editor now render content/_hero_header like every other content page: a full-width banner (the stock timeline image when there's no cover) with the frosted title bar and type icon. The editor uses the same shorter height as other content editors, narrows with its side panels, and keeps the title in step with inline renames. The editor's way into the Images window is an Add cover image / Edit images button in the banner's top-right corner, clear of the fixed side tabs that overlap the title bar. The hero partial takes icon, color, title, title_x_text and corner_actions locals so pages without a ContentSerializer can use it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RVaA9Va1rv4KddobfGZCD4
|
🚅 Deployed to the notebook-pr-1521 environment in Notebook.ai Feature Review
|
<main> is a flex item, so without min-w-0 it couldn't shrink below its content's widest unbreakable row. On a 390px screen the editor was 542px wide, cutting off the right edge (including the View button) and letting the page scroll sideways. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RVaA9Va1rv4KddobfGZCD4
This branch was successfully deployed
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.
User-facing changes
Implementation notes
HasImageUploads,POST /image_uploads); only the UI was missing.content/_hero_header. That partial now also accepts optionalicon,color,title,title_x_textandcorner_actionslocals, so pages without aContentSerializercan use it. Existing content pages render it exactly as before.GET /timelines/:id/galleryover XHR) rather than rendered on every editor page view. After the window closes, the banner is re-fetched (GET /timelines/:id/cover)./timelines/:id/galleryas a page of its own.timelines#updatesaves that form's files throughImageUploadServiceso upload bandwidth is charged. The upload loop it shares withContentControllermoved to theUploadsGalleryImagesconcern.<main>in the timeline editor is a flex item and lackedmin-w-0, so it couldn't shrink below its widest unbreakable row.=>. So arrow functions in Alpine attributes can't be tested withassert_select, and I avoided them here.Testing
test/controllers/timeline_images_test.rb(10 tests): the editor banner with and without a cover, the gallery loading on demand, the no-JS gallery page and upload (including the bandwidth charge), the editor's JSON saves still working, people who can't edit being blocked, the banner andog:imageon the timeline page, and visitors not seeing private images.rails test(882 tests, 1 skip that needs Postgres) andrspec(14 examples).🤖 Generated with Claude Code
https://claude.ai/code/session_01RVaA9Va1rv4KddobfGZCD4