Commit Graph
13034 Commits
Author SHA1 Message Date
Brenda WallaceandClaude Opus 5 baff16e92e Tidy plantings#show, and make cards and menus consistent
This page read as a page about the crop rather than about one member's
planting, and its sections each did things their own way. Changes follow
the conventions written up in the UI consistency guide.

Identity
- Title, meta description and OpenGraph all read "<crop> planting by
  <owner>"; the hero carries a muted "planting by X in Y" subtitle and
  the scientific name moves to the crop card.
- Breadcrumb's last item is plain text, not a link to the current page.

Actions
- One actions menu per page: a quiet three-dot button in the top right of
  the hero, rendered by the new PlantingActions island, opening the
  EditPlanting, RecordHarvest, SaveSeeds, MarkFinished and AddPhoto
  dialogs that already existed for the garden list.
- Menu items are lower case, so a menu reads as a list of things you can
  do rather than a row of headings.
- Transplanting moves out of the sidebar into a dialog off that menu: it
  is done once in a planting's life and should not hold real estate.
- The second seed-saving dropdown and the loose photo buttons are gone;
  each section keeps one quiet "add" on its heading bar as the non-JS
  path.
- The plant-part icons from the server-rendered harvest form now reach
  the dialog, via icon_url on HarvestFormSerializer.

Fact cards
- Every card fills the same four slots, and the core cards always render
  so one planting's page has the same shape as the next.
- Progress reads as a percentage with "day 43 of 90" beneath; quantity
  and "grown from" merge into one card rather than both saying
  "seedling"; rating is stars and renders even when unrated.
- Dates go through I18n.l and standard_time_distance instead of
  assembling abbr_month_names by hand.
- Adds Planting#planned?, replacing three copies of age_in_days < 0.
- Perennial no longer claims the plant "grows back each year".

Cards by type
- Harvest cards get square corners, a warm accent and the harvest icon,
  and say "<crop> harvest", so they are not mistaken for plantings.
- Seed cards are drawn as seed packets: portrait, papery, torn top edge,
  printed band, small print along the foot and the year saved stamped on
  them.

Layout
- The page wrapper is .planting-show, not .planting: that is the planting
  *card's* class, and its absolutely positioned badges and quick actions
  were leaking onto this page.
- Sections are bordered blocks with their heading bar as the lid, so a
  heading and its content read as one thing.
- One spacing scale, and the hero aligns to the same left edge as
  everything below it.

Copy
- Section headings and empty states go through en.yml, in one voice.
- "Add a photo to visually track growth of this planting, to Flickr,
  iNaturalist or Pl@ntNet" was nonsense: photos come from Flickr only.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 08:15:45 +12:00
Brenda WallaceandClaude Opus 5 0c54713233 Restore the Ruby 4.0.6 upgrade
PR #4831 committed a stale Gemfile.lock over the newer one, taking
.ruby-version back to 3.2.3 and rolling back active_median, dalli,
parallel, rbs and selenium-webdriver. Dockerfile and
.devcontainer/Dockerfile still build on Ruby 4, so the Gemfile's version
check fails against the image.

Restores both files to what they were before that merge.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 08:15:23 +12:00
Brenda Wallace 9527662e35 Merge pull request #4825 from Growstuff/dev
Release 94
release94
2026-09-22 22:02:26 +12:00
f78dc1712c Paginate garden photos and limit plantings in garden views (#4830)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Brenda Wallace <brenda@wallace.net.nz>
2026-09-22 19:19:15 +09:30
5331a7c831 Filter harvest reminders in SQL instead of Ruby memory (#4831)
* Filter harvest reminders in SQL instead of Ruby memory

- Add `harvest_in_next_week` scope to `PredictHarvest` concern
- Use SQL scope in `NotifierMailer#harvest_reminder` and `exists?` in `growstuff:send_harvest_reminders` task
- Add unit specs for `.harvest_in_next_week` scope and rake task

Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>

* Filter harvest reminders in SQL instead of Ruby memory

- Add `harvest_in_next_week` scope to `PredictHarvest` concern
- Use SQL scope in `NotifierMailer#harvest_reminder` and `exists?` in `growstuff:send_harvest_reminders` task
- Add unit specs for `.harvest_in_next_week` scope and rake task

Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>

* Filter harvest reminders in SQL instead of Ruby memory

- Add `harvest_in_next_week` scope to `PredictHarvest` concern
- Use SQL scope in `NotifierMailer#harvest_reminder` and `exists?` in `growstuff:send_harvest_reminders` task
- Add unit specs for `.harvest_in_next_week` scope and rake task

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>
2026-09-22 19:18:57 +09:30
Brenda Wallace 3d64118cdf Merge pull request #4837 from Growstuff/feat/fluent-crop-icons
Give crops icons from Fluent Emoji, chosen by crop wranglers
2026-09-22 18:45:45 +09:30
Daniel O'Connor 6117592f0d Merge pull request #4836 from Growstuff/fix/drop-rails-assets
Take Leaflet.markercluster from npm instead of rails-assets.org
2026-09-22 18:41:16 +09:30
Brenda WallaceandClaude Opus 5 f1ce7e1d53 Take Leaflet.markercluster from npm instead of rails-assets.org
rails-assets.org is down, and bundler can't install anything while a
gem's source is unreachable, so CI fails for every branch before a
single spec runs. The one gem from there was
rails-assets-leaflet.markercluster; it now comes from npm, where the
React bundle's packages already come from, and node_modules is already
on the asset path. CI and Heroku both install npm packages.

That gem also brought in rails-assets-leaflet, a second copy of Leaflet
(1.5.1), which shadowed the leaflet-rails gem the Gemfile asks for. With
it gone, the maps get Leaflet 1.9.4 from leaflet-rails, as intended, so
the cluster plugin is its current release, 1.5.3, which supports it.
npm's peer dependency warning for leaflet is expected: Leaflet comes
from the gem, loaded before the plugin.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 18:39:48 +12:00
Brenda Wallace 0ef0b225be Merge branch 'mainline' into dev 2026-09-22 17:43:34 +12:00
Brenda WallaceandClaude Sonnet 5 a7fd4768b4 Update the edit garden spec: Edit on a card opens the dialog
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 c4c0488a41 Add feature specs for the edit garden dialog
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 53e945554b Edit a garden in a dialog over the garden list
Three dots on a garden card > edit opens its form in a dialog, and saves
without leaving the page. A garden saved as inactive leaves the list, with
a note saying where it went.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 86deb55d53 Let garden cards edit a garden as JSON
GET /gardens/:slug/edit.json gives the form's values and choices, and
PATCH /gardens/:slug.json returns the garden's refreshed card, or the
validation errors as 422, without queueing a flash message.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 5cba0909e1 Update the garden index spec for chip menus
An owner's planting chip is a menu now, with a View link to the planting.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 eb18622b78 Make the crop chip the planting's menu, for annuals and perennials
Clicking a chip opens the planting's menu under it (view, edit, add
photo, record harvest, save seeds, mark as finished), in place of the
three dots on annual rows, so perennials get the same menu. A caret shows
the chip opens something. Someone who can't change the planting still gets
a plain link chip. The menu items are lowercase for every planting menu.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 6987d66f95 Add specs for the mark as finished dialog
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 e9974e2d9f Mark a planting finished in a dialog, asking when it finished
Three dots > mark as finished opens a dialog over the list: when did it
finish, today unless you enter a date. Today is not offered for a planting
made today, as the server needs a finish after the planting. It saves as
JSON and the planting leaves the list, without leaving the page. The card
data carries the server's date for today.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 e4bf451772 Stop handled menu clicks reaching jquery_ujs, and close the menu
A menu item that carries a data-method (mark as finished) was still sent
as a request by jquery_ujs after a dialog had taken the click over, so the
page navigated and the change was made before the dialog could be used.
A click a dialog handles is now stopped in the menu, which also closes it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 82da18f68d Add feature specs for the add photo dialog, with Flickr stubbed
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 851023e35b Add a photo in a dialog over the garden list, connecting Flickr there too
Three dots > add photo (on a planting or a garden) opens a dialog: choose
one of your Flickr photos by album or tag, confirm it, and it is added
without leaving the page, with the garden's card refreshed. If Flickr is
not connected, or the connection has expired, the first step connects it
in a pop-up and the dialog carries on by itself once it has worked.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 9d33a0feaf Add a small page for a Flickr connect pop-up to end on
/authentications/connected says whether Flickr got connected and closes
itself. It has no site header or footer, as it appears in a small window.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 d9d3ebb9bd Let garden cards choose and add a Flickr photo as JSON
GET /photos/new.json gives a page of the member's Flickr photos (or says
to connect or reconnect Flickr), and POST /photos.json adds one to the
planting or garden and returns the garden's refreshed card, or the
validation errors as 422.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 f7d10f50de Add feature specs for the save seeds and record harvest dialogs
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 63788c092d Save seeds in a dialog over the garden list
Three dots > save seeds opens a dialog in the same style as record
harvest: about how many (with quick picks), whether to offer them for
trade, and any notes. It saves as JSON and shows a notice with a link to
the seeds, so the page is never left.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 eb92386f0e Let garden cards save seeds as JSON
GET /plantings/:slug/seeds/new.json gives the form's starting values and
choices; POST /seeds.json returns a link to the new seed, or the
validation errors as 422, without queueing a flash message.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 06e053b17d Make the pill choice styles general, not about harvests
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 2142fe2f65 Show a tick on the progress bar for each harvest
Each harvest is a small tick at its date on the bar's own scale, with the
date as a tooltip and a hidden sentence for screen readers. The card data
carries the positions, worked out with the same formula as the fill.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 7596b2634c Put Mark as finished last in the planting menu, below a divider
It takes the planting off the list, so it goes after the everyday
actions, separated from them. The card menu and the garden page menu
match.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 1c5d90230b Fix the JSON request specs, and tolerate an empty harvest param
The update helper took its hash as keywords, and the form GET sent a JSON
content type, which Rails wraps into an empty harvest param that new then
rejected. The specs are fixed, and new ignores a blank harvest param.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 c4034d9982 Only offer Yesterday when a harvest then would be after planting
The server needs a harvest to come after the planted date, so a planting
made today (or yesterday) has no Yesterday, and the date box starts the
day after it was planted.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 fa9c8afb70 Mark the planting that has just had a harvest recorded
For a few seconds the row goes amber and gets a Harvest recorded tag, and
the notice names the garden, so it is clear which planting it was.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 ac7d8da40c Harvest dialog: add When and Any notes steps, drop Cancel
Step 3 is when (Today, Yesterday, or Enter date), step 4 is any notes,
and that step saves. The choices so far are shown back with Change
buttons, and there is a Back button. Closing the dialog is how you cancel.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 6dcd15db27 Record a harvest in two steps, styled like Add planting
Step 1 is what part you harvested: a big text box, with the cursor in it,
that completes from the plant parts (the crop's usual one first). Step 2
is how much: quantity, weight, when and notes, with the choice shown back
and a Change button. Same look as the Add planting dialog.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 198bec4646 Share the dialog step indicator
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 a513a38f16 Pass the harvest handler to the planting row, not the perennial chip
The record harvest prop had been attached to the first matching element
in GardenCard, the perennials' CropChip, so the row's menu item fell
through to a normal link.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 8f46a3d99a Record a harvest in a dialog over the garden list
Three dots > record harvest opens a quick entry form (how many, weight,
when, plant part, notes) in a modal, with the crop and today's date
filled in. It saves as JSON and swaps in the refreshed card, so the page
is never left. Ctrl/cmd-click still opens the full harvest page.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 e19473205c Let garden cards record a harvest as JSON
GET /plantings/:slug/harvests/new.json gives the form's starting values
and choices; POST /harvests.json returns the garden's refreshed card, or
the validation errors as 422.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 bfd7d8daf0 Make the sidebar nav links look like links
Link colour and underline, with the page you are on in bold and marked
aria-current.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 bb50385bb8 Line the sidebar text up with the text in the member card
The skip link, nav links, button, blurb and inactive gardens link sat at
the card's edge while the card's own text is inset. Give them the same
inset, left-align the blurb, and add a little space between the links.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 da04f8adb9 Line the breadcrumb up with the page content
The breadcrumb bar is the same colour as the page, but its side padding
pushed the text 1rem in from the edge the heading and content sit on.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 ee79428271 Call them inactive gardens, and explain what that page is
Rename the past gardens page to inactive gardens throughout (label, route,
action, view, styles). Move its link on the gardens page to below the
member's card, with a line saying what it holds, and add an explanation
to the page itself.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 e68ef96292 Replace the include in-active tickbox with a link to past gardens
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 dcf59ff4e7 Add a gallery page of a member's past gardens
/members/:slug/gardens/past shows their inactive gardens as photo cards:
when each was in use, how many plantings, and the crops grown in it. The
owner (or a collaborator) can mark a garden active again from its card.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 1e80abb70c Take Plant something here out of the garden card menu
The Add planting button does that now. The card data carries its link as
plant_url, instead of it being borrowed from a menu item.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 5e8a87d4f4 Add an Add planting button to garden cards
The way to plant in a garden was an item in its actions menu. Put a green
button in the card header, next to the menu, that opens the same dialog.
It only shows for gardens you can plant in.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 f472e9d3f1 Show planting menu items in lowercase
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 afe58a9280 Only ask for a finished date once a planting is marked finished
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 fa5ef3eda6 Rate a planting with stars in the edit dialog
Overall rating is five clickable stars (real radio buttons underneath, so
the keyboard works) with a Clear button, in place of a select.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 6685e253c5 Drop the garden choice from the planting edit dialog
Moving a planting between gardens isn't part of quick editing. The
dialog no longer asks, or sends, which garden.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 a3dfbe5016 Edit a planting in a dialog over the garden list
Three dots > Edit opens the planting's form in a modal instead of going to
the edit page. It saves as JSON and swaps in the refreshed garden card, so
the page is never left. Ctrl/cmd-click still opens the edit page.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00