Remove standalone HTML document tags from Mailboxer's notification email
template so its content renders within app/views/layouts/mailer.html.erb.
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
The month chips look up the grower's hemisphere from the seed's owner, and a
seed that is being added has none until it is saved, so the page raised. Use
the member filling in the form, and add specs for the standalone new and edit
pages, which were not covered.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
When clicking "Hide Completed" on the jobs notepad, an AJAX GET request was sent without an explicit 'Accept: text/html' header. Rails evaluated `request.format` as non-HTML, causing `JobsController#notepad?` to return `false` and falling back to `respond_with` rendering the full page layout inside the notepad groups element.
Here is a summary of the changes:
1. Added the 'Accept: text/html' header to transmit in `job_notepad.js`.
2. Updated `JobsController#notepad?` to treat XHR requests for the current member's jobs as notepad requests.
3. Added unit tests in `job_notepad.test.js` for the "Hide Completed" action.
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
* Add Shareon social share component to posts#show for logged in users
- Install shareon npm package
- Add shareon JS module and stylesheet imports
- Render .shareon container with requested share links on posts#show for logged in users
- Add unit and view spec tests
Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
* Add Shareon social share component to posts#show for logged in users
- Install shareon npm package
- Add shareon JS module and stylesheet imports
- Render .shareon container with requested share links on posts#show for logged in users
- Add unit and view spec tests
Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
What a packet says about sowing it. When to sow is the months, as many as the
packet says: a form sends twelve chips to tick, with the seasons as shortcuts
for the grower's hemisphere (none where we do not know it, rather than a
guess), and the list shows them as runs like "Oct-Feb". How to sow is text, in
the packet's words. Germination is a range of days, as maturity is.
A migration adds four columns to seeds. The facts are on the packet sheet, in
the order they happen, and editable from the pencils, from Edit all and from the
standalone form.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
They were only in the edit form and, for organic and GMO, the badges under the
title, so the packet sheet could not show or edit them in place. Each is a row
with a pencil, like the others, and reads quietly when it is not known.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Replace the modal dialog for editing seed details with an inline form within the packet sheet.
- Introduce a new partial for edit fields to streamline the editing process.
- Update the seed facts display to utilize a new fact row partial for better organization and readability.
- Implement a packet panel to show packet photos and text side by side, enhancing the user interface.
- Modify the hero section to include source information as a ribbon or badge based on the presence of a photo.
- Adjust tests to reflect changes in the editing process and the new layout of the seed show page.
- Implemented Dockerfile for OCR processing with necessary dependencies.
- Enhanced read_packets.py to read and save text from seed packet photos.
- Created requirements.txt for Python dependencies.
- Updated show.html.haml to display OCR results when available.
- Added tests for displaying packet text on seed pages, including handling of markup.
- Remove scientific name fields from crop edit form (retaining for new crop request only)
- Remove recreate_names('sci_name', 'scientific') from CropsController#update
- Add and update specs to verify scientific names and their metadata remain intact on crop update
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Added `label` computed attribute to `PhotoResource` to indicate the side of the seed packet.
- Introduced `needs_ocr` filter in `PhotoResource` to identify photos awaiting OCR processing.
- Updated `SeedResource` to associate photos with seeds.
- Modified `photos_request_spec` to include seed relationships and test for photo labels.
- Added filtering tests for photos needing OCR in `photos_request_spec`.
- Removed obsolete Rake task for listing photos needing OCR.
- Updated `read_packets.py` to fetch photos needing OCR from the API.
The Procfile had only a web process, so a deploy never ran migrations and they
had to be run by hand after the new code was live, leaving a window where the
code expected columns that did not exist yet. A release phase runs db:migrate
before the new release goes live, and if it fails the release is stopped and the
old code keeps running.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
yarn install refuses to run on a Node that does not match package.json
"engines", so pinning Node for Heroku broke CI (which runs 24.21.0) and would
block any contributor on another Node. Heroku still reads the pin; yarn no
longer enforces it.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Heroku builds have been failing since this morning while downloading the newest
24.x, 24.22.1, from nodejs.org (curl: (92) HTTP/2 stream was not closed
cleanly). The file downloads fine elsewhere, so pin an earlier 24.x to make the
build fetch a different one. CI sets its own Node version and is not affected.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Added useDraftAutosave hook to handle automatic saving of post drafts.
- Enhanced PostEditor component to include a preview tab that fetches and displays rendered markdown.
- Updated Post model to manage draft state and associated published_at timestamp.
- Introduced card_photo association to Post for representing a primary image.
- Modified post form to support draft saving and publishing actions.
- Updated navigation to include links to drafts.
- Added tests for draft saving, preview functionality, and card photo validation.
- Created migrations for new database fields related to drafts and card photos.
On a seed's own page, the owner now chooses which side of the packet a photo
is of with one small button group, the current choice lit, in place of a badge
and up to three long text links that wrapped in a narrow card. Everyone else
sees just a badge. The unused "mark as" locale keys are removed.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Keep every packet label when a side is photographed again, and use the newest
photo of a side. Before, giving a second photo the same label cleared the
older photo's, which let it back into the crop's photos and default picture.
Carry the label through the HTML photo picker (its search form and the links
that add a photo), so a packet photo added without JavaScript is labelled.
Have the OCR script treat any network failure on an image (DNS, timeout) as
that image failing, so the rest of the batch still runs.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>