5195 Commits
Author SHA1 Message Date
Brenda Wallace 6922b8c4f1 Revert "Predict first harvest from heat, using EcoCrop figures"
This reverts commit 218e792d87.
2026-11-05 13:58:48 +13:00
Brenda Wallace 218e792d87 Predict first harvest from heat, using EcoCrop figures 2026-11-05 13:33:28 +13:00
Brenda Wallace 51caa7cae6 Implement crop change functionality for seeds, including controller, views, and service logic 2026-11-04 21:24:13 +00:00
Brenda Wallace cdc05edf48 Include varieties' photos and plantings on the crop page (#5251) 2026-11-05 00:06:19 +10:30
Brenda Wallace e6625449ed Show archived gardens' jobs as a plain list (#5074) 2026-11-04 23:57:04 +10:30
Brenda Wallace 6dd5ff724c Add month sowing chips and update filters for responsive design 2026-11-04 07:39:36 +00:00
Brenda Wallace d5ef4329e2 Enhance seed library functionality by integrating scope rendering and improving filter interactions 2026-11-04 07:39:36 +00:00
Brenda Wallace bf6e973bf0 Refactor seed view path and improve not planted scope for better clarity 2026-11-04 07:39:36 +00:00
Brenda Wallace 6d41181c06 Add variety display to seed packets and enhance filtering options 2026-11-04 07:39:36 +00:00
Brenda Wallace 6dda38413c Refactor seed library filters and improve UI components
- Updated seed filtering logic in SeedsController to use new FILTER_PARAMS.
- Enhanced seed-field layout in _seeds.scss for better responsiveness.
- Introduced SeedFiltersHelper for managing filter parameters and paths.
- Revised views to utilize new helper methods for clearer filter management.
- Updated specs to reflect changes in filter logic and UI adjustments.
2026-11-04 07:39:36 +00:00
Brenda Wallace d4e0aecda8 huge tidy up of the seed filters 2026-11-04 07:39:36 +00:00
Daniel O'Connor ff37d7bb4a Localize planting card footer component 2026-11-04 13:29:24 +10:30
google-labs-jules[bot] d24d1ac52f Localize harvest modal component
Extract hardcoded user-facing strings in app/views/harvests/_modal.html.haml
into relative i18n translation keys and add corresponding translations under
harvests.modal across en, de, es, fr, ja, and zh locale files.
2026-11-04 02:48:19 +00:00
Daniel O'Connor c85d6e08e5 Merge branch 'main' into localize-planting-card-footer-12198439831135786208 2026-11-04 13:05:48 +10:30
google-labs-jules[bot]andDaniel O'Connor c455c14fbe Localise planting facts component (#5282)
Extract hardcoded strings in app/views/plantings/_facts.html.haml to
relative translation calls under plantings.facts across en, es, de, fr,
ja, and zh locale files.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
2026-11-04 13:04:41 +10:30
google-labs-jules[bot] a8bc8c2c90 Localize planting card footer component
Extract hardcoded English strings in app/views/plantings/_card.html.haml
into relative i18n translation calls and add translations across all
standard locales (en, de, es, fr, ja, zh).
2026-11-04 13:04:28 +10:30
google-labs-jules[bot] 6685976460 Localize seed facts component
Extract hardcoded strings in `app/views/seeds/_facts.html.haml` to I18n
lookups, referencing `seeds.facts.*` for strings within `fact_row` blocks,
and add corresponding translations under `seeds.facts` across `en`, `de`,
`es`, `fr`, `ja`, and `zh` locale files.
2026-11-04 12:53:13 +10:30
google-labs-jules[bot] 921895f939 Localize seed facts component
Extract hardcoded strings in `app/views/seeds/_facts.html.haml` to relative
I18n lookups (`t('.key')`) and add corresponding translations under
`seeds.facts` across `en`, `de`, `es`, `fr`, `ja`, and `zh` locale files.
2026-11-04 12:53:13 +10:30
google-labs-jules[bot] de9774d5d4 Localize harvest card component (#5285)
Extract hardcoded English strings in app/views/harvests/_card.html.haml
into relative i18n translation calls and add translations across all
standard locales (en, de, es, fr, ja, zh).

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-11-04 12:24:19 +10:30
google-labs-jules[bot] c32a9b7e5d Localize crop harvests sidebar partial
Extract hardcoded English strings in app/views/crops/_harvests.html.haml
into relative i18n calls and add translations across all standard locales
(en, de, es, fr, ja, zh).
2026-11-04 05:51:45 +10:30
google-labs-jules[bot] f649932c06 Style seed shelf bar h3 with white text (#5278)
When grouping seeds by non-crop attributes such as heirloom,
source, or year, the shelf bar heading renders as plain text
rather than a link. Adding `color: $white;` to `h3` in
`.seed-shelf-bar` ensures the shelf heading is legible against
the green background.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-11-03 19:12:44 +00:00
Daniel O'ConnorandBrenda Wallace 02f6a74fed Fix authorisation check (#5277)
Co-authored-by: Brenda Wallace <brenda@wallace.net.nz>
2026-11-03 19:04:58 +00:00
Brenda Wallace 6a6dfa6cf8 Add size_fact method to CropsHelper and update predictions view for crop dimensions 2026-11-04 07:53:48 +13:00
google-labs-jules[bot]andDaniel O'Connor b68b26e484 Localize garden inactive card partial (#5276)
* Localize garden inactive card partial

Extract hardcoded English strings in app/views/gardens/_inactive_card.html.haml
into relative i18n calls and add translations across all standard locales
(en, de, es, fr, ja, zh). Add view specs to verify localized rendering.

* Delete spec/views/gardens/_inactive_card.html.haml_spec.rb

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
2026-11-03 18:35:22 +00:00
google-labs-jules[bot]andDaniel O'Connor 03b3359b6c Localize crop nutritional data partial (#5274)
* Localize crop nutritional data partial

Extract hardcoded English strings in app/views/crops/_nutritional_data.html.haml
into relative i18n calls and add translations across all standard locales
(en, de, es, fr, ja, zh). Add view specs to verify localized rendering.

* Delete spec/views/crops/_nutritional_data.html.haml_spec.rb

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
2026-11-03 17:57:29 +00:00
Brenda Wallace d8a012efa3 Optimize seed_sow_months method for improved performance and accuracy in calculating sow months based on latitude. 2026-11-04 06:31:14 +13:00
Brenda Wallace d0567f3516 Add published_job_templates method to Crop model and update related services and views for improved job template handling 2026-11-04 06:31:14 +13:00
Brenda Wallace a48c1678c4 Refactor crop job templates and related logic for improved clarity and functionality; update styles, remove unused code, and enhance season handling in job creation. 2026-11-04 06:31:14 +13:00
Brenda Wallace 2d58333b78 Add growing facts and sow months handling to crops, including UI updates and validations 2026-11-04 06:31:14 +13:00
Brenda Wallace ea46d88d3c Enhance crop lifespan and job templates display with new styles and functionality 2026-11-04 06:31:14 +13:00
Brenda Wallace 85fe7dde15 Add median lifespan display and job templates section to crop views 2026-11-04 06:31:14 +13:00
Brenda Wallace 7cbd5cf666 Add crop job season handling and warnings
- Introduced a new JavaScript module for crop job season management, including functions to describe planting days and update warnings based on selected dates.
- Updated the CropJobTemplate model to include methods for determining if a date is within the season for a given latitude.
- Enhanced the AddCropJobs service to support planting dates and adjust job due dates accordingly.
- Created a new view for displaying season warnings when adding crop jobs, allowing users to confirm adding jobs outside the specified season.
- Updated the job modal to prompt users for planting dates and display relevant warnings.
- Added tests for the new functionality, ensuring correct behavior for seasonal warnings and job creation based on planting dates.
2026-11-04 06:31:14 +13:00
Brenda Wallace b4d4a5ad5a Enhance crop job functionality with planting selection and UI updates
- Update AddCropJobs service to support planting selection for job creation.
- Modify CropJobsController to handle planting parameter during job addition.
- Improve job templates view to display plantings and allow adding jobs to specific plantings.
- Add relevant translations for new UI elements.
- Extend specs to cover new planting functionality and ensure correct behavior.
2026-11-04 06:31:14 +13:00
Brenda Wallace 7646f0ec6d Add pending? method to AddCropJobs service and update job templates view
- Implemented pending? method to check if there are jobs to add.
- Updated job templates view to conditionally display add button or message if jobs are already added.
- Enhanced specs for AddCropJobs service and crops controller to cover new functionality.
2026-11-04 06:31:14 +13:00
Brenda Wallace 011d2c46ce Implement crop job creation and associated features, including controller, service, views, and specs 2026-11-04 06:31:14 +13:00
Brenda Wallace 3f562662c4 Implement crop job templates styling and functionality, including helper methods and specs 2026-11-04 06:31:14 +13:00
Brenda Wallace d5c26db4a8 Add job templates rendering and associated specs for crop show page 2026-11-04 06:31:14 +13:00
62ba46d28c Move follow button to grower line on garden show page (#5228)
* Move follow button to grower line on garden show page

Fixes #5198. Moving .record-grower-follow out of .garden-hero-actions into
.garden-grower prevents the follow button from competing for horizontal
space with the garden title on mobile screens.

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

* Use div for garden-grower to allow follow form nesting

Change %p.garden-grower to .garden-grower (div) so that the follow button's
form generated by button_to is valid HTML and is not prematurely ejected
from the paragraph by the HTML parser.

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-11-04 03:10:04 +10:30
Daniel O'Connorandgoogle-labs-jules[bot] 3b7196de27 Localize member contact partial across locales (#5261)
Extract hardcoded English strings in app/views/members/_contact.html.haml
into relative i18n keys and add translations across en, de, es, fr, ja,
and zh locale files. Add view spec to verify localized rendering.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-11-03 16:25:15 +00:00
Daniel O'Connorandgoogle-labs-jules[bot] 7acb633070 Localize crop approval status message partial (#5267)
Extract hardcoded English strings in app/views/crops/_approval_status_message.html.haml
into relative i18n calls and add translations across all standard locales
(en, de, es, fr, ja, zh). Add view specs to verify localized rendering.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-11-03 15:21:10 +10:30
Daniel O'Connorandgoogle-labs-jules[bot] b327c80c63 Redirect to page section after seed inline edit (#5266)
Ensure inline edits on the seed show page redirect back to the
relevant section (#facts or #notes) after saving.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-11-03 14:27:36 +10:30
Daniel O'Connorandgoogle-labs-jules[bot] 8875e89345 Dismiss responsive offcanvas when opening auth dialogs (#5259) (#5260)
On iPad and tablets, the main navigation menu is rendered as a
responsive Bootstrap offcanvas drawer (`#navbarSupportedContent.offcanvas-lg`).
When users tapped 'Sign in' in the drawer, the auth modal opened while the
offcanvas remained open in the DOM, allowing Bootstrap's active FocusTrap
on the offcanvas to intercept focusin events on document and steal focus
away from the modal inputs, preventing clicking or typing on iPadOS.

Update `closeOpenOffcanvases` in `Modal.jsx` and `RecordDialog.jsx` to
match all open offcanvases including responsive ones
(`.offcanvas.show, [class*="offcanvas-"].show`) and closest offcanvas
containers, invoke it when auth dialog triggers are clicked in
`AuthDialog.jsx`, restore focus correctly when the modal closes, and add
accompanying tests.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-11-03 04:10:38 +10:30
Daniel O'Connorandgoogle-labs-jules[bot] 508b2230ea Localize crop join banner across supported locales (#5257)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-11-02 20:51:52 +10:30
Daniel O'Connorandgoogle-labs-jules[bot] 40349fa0f8 Render EcoCrop taxonomy with line breaks (#5256)
Split colon-delimited taxonomy ranks in EcoCrop data and render each on
its own line with line breaks instead of colons.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-11-02 20:18:02 +10:30
Daniel O'Connorandgoogle-labs-jules[bot] 307ca1f095 Localize member email prompt component (#5253)
Extract hardcoded English strings in app/views/members/_email_prompt.html.haml
into relative i18n keys and add translations across en, de, es, fr, ja,
and zh locale files. Update view specs for unset email and pending reconfirmation.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-11-02 09:31:15 +00:00
Brenda Wallace e0f97a8edc Add crop history feature with join banner for non-signed-in users 2026-11-02 21:25:37 +13:00
04744008bf Add ecocrop_data table, import rake task, and crop show ecological requirements (#5239)
* Add ecocrop_data table, import rake task, and view table on crop show

- Add migration creating ecocrop_data table with columns matching CGIAR EcoCrop schema
- Add EcocropData model and Crop#ecocrop_data matching by scientific name
- Add import:ecocrop_data rake task to download parquet file and populate database
- Add _ecocrop_data partial displaying ecological requirements, CC-BY-4.0 license link, and FAO citation on crop show
- Add model, rake task, and view tests

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

* Make citation text smaller and URLs clickable in EcoCrop section

- Add small styling to citation text in _ecocrop_data partial
- Turn FAO and CGIAR dataset URLs into clickable links

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-11-02 18:06:22 +10:30
e248324934 Close open offcanvas when launching record modals (#5242)
When mobile users open the quick-add offcanvas and tap 'New saved seed'
or 'New harvest', the click was intercepted to launch a React modal
without closing the offcanvas. Bootstrap's active FocusTrap on the
offcanvas intercepted subsequent focusin events on document and pulled
focus back to the offcanvas, immediately blurring input fields and
preventing Android's virtual keyboard from showing.

Dismiss any open offcanvases when record dialog links are clicked and
when Modal mounts, and restore focus to the offcanvas trigger button
when the modal closes.

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-11-02 06:49:16 +00:00
Brenda Wallace 48296925b5 Refactor crop merging functionality to enhance plan generation and UI presentation 2026-11-02 19:22:15 +13:00
Brenda Wallace 2324a55c09 Implement crop merging functionality with controller, service, views, and specs 2026-11-02 19:22:15 +13:00