- 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.
- 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.
- 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.
* 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>
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>
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>
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>
* Localize garden stall about Growstuff component
Extract hardcoded full keys in app/views/stalls/_about_growstuff.html.haml
into relative i18n keys and add translations in de, es, fr, ja, and zh
locale files. Add view specs for the component.
Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
* Localize garden stall about Growstuff component
Add translations for stalls.about_growstuff in de, es, fr, ja, and zh
locale files. Add view specs for the component.
Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
* Delete spec/views/stalls/_about_growstuff.html.haml_spec.rb
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
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>
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>
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>
- Add herringbone gem for pure-Ruby Apache Parquet parsing
- Update import:ecocrop_data Rake task to use Herringbone::Reader
instead of executing an external python script via IO.popen
- Remove python and pyarrow dependencies for EcoCrop data import
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
* 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>
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>
Extract hardcoded English strings in app/views/crops/_alternate_name_modal.html.haml
into relative i18n keys and add translations in en, de, es, fr, ja, and
zh locale files. Add view specs for new and persisted alternate names.
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Modify the create action in OpeningsController to use a localized notice for stall opening.
- Adjust the show action in StallsController to reflect the new opening logic.
- Enhance tests to verify the new flash message and UI behavior when the stall is opened.
When a crop is rejected, its slug is released by appending
a unique suffix so that the canonical slug becomes available
for future crops with that name.
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>