Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions app/views/stories/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,6 @@
<% end %>
</div>

<div class="flex justify-end">
<%= render "assets/primary_image_picker", owner: @story %>

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the inline primary_image_picker render and its upload-progress bar from the published story view, keeping only hero-image. The shared assets/_primary_image_picker partial is intentionally left untouched so the workshop (workshops/_show_header) and resource (resources/show) pages keep their picker. The Stimulus asset_picker_controller references upload-progress/hero-image via guarded getElementById, so dropping the progress bar from this view is safe.

</div>
<div id="upload-progress" class="mt-2 h-1 w-full bg-gray-200 rounded overflow-hidden hidden">
<div id="upload-progress-bar" class="h-full w-0 bg-blue-500 transition-[width] duration-200 ease-out"></div>
</div>
<div id="hero-image">
<%= render "assets/display_assets", resource: @story, link: true %>
</div>
Expand Down
5 changes: 5 additions & 0 deletions spec/views/stories/show.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,9 @@
expect(rendered).to match(/MyBody/)
expect(rendered).to match(story.author_credit)
end

it "does not render the 'Change photo' control, even for admins" do
render
expect(rendered).not_to match(/Change photo/)
end
Comment on lines +23 to +26
end
Loading