Conversation
CulmoneY
left a comment
There was a problem hiding this comment.
Could we also use minimagick to resize/compress the images?
ae9f7ae to
e6dcadd
Compare
There was a problem hiding this comment.
Pull request overview
This PR switches Active Storage variant processing to MiniMagick and introduces/report-polishes a richer report editing workflow (journals + aggregated data), alongside several UI/i18n updates to improve layout and presentation.
Changes:
- Configure Active Storage to use MiniMagick and adjust blob image variant options.
- Add
ReportsController#update, a fullreports/editpage, and a Stimulus-powered journal picker via a newjournals#form_cardTurbo Stream endpoint. - Add report seed data and expand i18n/UI tweaks across projects, log entries, and marquee behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
config/application.rb |
Sets Active Storage variant processor to :mini_magick. |
app/views/active_storage/blobs/_blob.html.erb |
Adds variant saver options (strip/quality/interlace) for rendered blobs. |
app/controllers/reports_controller.rb |
Implements report edit context + update for journals/aggregated data. |
config/routes.rb |
Adds reports#update and journals#form_card member route. |
app/views/reports/edit.html.erb |
New report editor UI (aggregated data + journal selection modal). |
app/javascript/controllers/report_editor_controller.js |
Stimulus controller to add/remove aggregated data and fetch journal cards via Turbo Stream. |
app/controllers/journals_controller.rb |
Adds form_card Turbo Stream action to render a journal card partial for the report editor. |
app/views/journals/form_card.turbo_stream.erb |
Turbo Stream append of selected journal card + hidden field. |
test/controllers/reports_controller_test.rb |
Adds route auth coverage for update + functional update tests. |
db/seeds/reports.rb, db/seeds.rb |
Adds report seeding and wires it into dev seeds. |
app/components/reports/* |
Updates marquee + journal/aggregated datum card presentation. |
app/javascript/controllers/marquee_controller.js / app/components/reports/marquee_component.html.erb |
Adds pause toggle + changes hover behavior and clone count. |
app/controllers/projects/subprojects/log_entries_controller.rb |
Changes successful create response handling for turbo/html. |
config/locales/en/*.yml, config/locales/es/*.yml |
Adds report edit/update strings and adjusts several existing keys. |
app/assets/tailwind/application.css |
Theme tweaks + shared enter animations. |
app/assets/images/icons/close.svg |
Adds a new close icon asset. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <% if blob.representable? %> | ||
| <%= image_tag blob.representation(resize_to_limit: local_assigns[:in_gallery] ? [800, 600] : [1024, 768]) %> | ||
| <%= image_tag blob.representation(resize_to_limit: local_assigns[:in_gallery] ? [800, 600] : [1024, 768], saver: { strip: true, quality: 80, interlace: true }) %> |
There was a problem hiding this comment.
This code here will only add the compression when displaying the image. Whilst I think the interlace is benefical, I was thinking to add additional code to compress the images on save.
Store compressed original (e.g., max 1920px, quality 80)
TL;DR
Briefly describe what this PR does and why it is needed. Include any relevant background or context.
Fix journal image display after leaving the journal creation/edit page.
What is this PR trying to achieve?
Explain the main goal or problem this PR addresses. What functionality, bug fix, or improvement does it introduce?
Bug fix.
How did you achieve it?
Describe the approach, implementation details, or key changes made. Mention any libraries, refactors, or design choices involved.
Use mini magick.
Before:

After:

Checklist