Commit Graph
814 Commits
Author SHA1 Message Date
Brenda Wallace 70827646a4 Merge branch 'main' into seed-packet-photo-sides 2026-10-28 22:10:15 +13:00
Brenda Wallace a5e5ce4988 Merge remote-tracking branch 'origin/main' into seed-packet-photo-sides
# Conflicts:
#	db/schema.rb
2026-10-28 21:57:32 +13:00
Brenda Wallace a026a00a60 Merge branch 'main' into api/graphiti 2026-10-28 21:54:10 +13:00
Brenda Wallace f20bf69d32 feat: Allow saving blank drafts for photo attachments and update validations 2026-10-28 21:50:26 +13:00
Brenda Wallace 232a62c3a8 feat: Enhance post editor with link suggestions for crops, members, and plantings 2026-10-28 21:50:26 +13:00
Brenda Wallace b6006df384 feat: Implement draft autosave and preview functionality in PostEditor
- 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.
2026-10-28 21:50:26 +13:00
Brenda WallaceandClaude Sonnet 5.5 4ec2bee2f7 Show the packet side of a photo as a Front | Back | None control
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>
2026-10-28 21:39:29 +13:00
Brenda Wallace d94fd3ab1b feat: implement photo label updates for seed packets and enhance associated views 2026-10-28 19:46:00 +13:00
Brenda Wallace 3a2528f5fa Rename 'moment' to 'label' in photo associations and update related functionality for job and seed photos 2026-10-28 19:11:12 +13:00
Brenda Wallace ecbbe6ae4b Merge branch 'main' into api/graphiti 2026-10-28 07:43:47 +13:00
b77fa5d4c4 Add 'This week' reschedule option for jobs (#5118)
* Add 'This week' reschedule option for jobs

- Add JobList.week_date helper returning the Friday of the current week.
- Add move_week translation key in config/locales/en.yml.
- Render 'This week' option in app/views/jobs/_reschedule.haml when week_date is after tomorrow.
- Add unit specs in spec/services/job_list_spec.rb and view specs in spec/views/jobs/_reschedule.haml_spec.rb.

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

* Remove low value tests

---------

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-10-27 18:56:13 +10:30
Brenda Wallace a2681e68e3 Merge remote-tracking branch 'origin/main' into feat/more-suggestions 2026-10-27 13:48:16 +13:00
Brenda Wallace e07a3fa04c more suggestions from other users 2026-10-27 13:46:44 +13:00
Brenda Wallace 86918a49c9 Implement feature X to enhance user experience and optimize performance 2026-10-27 11:11:05 +13:00
Brenda Wallace 4576b1a2ed Refactor garden suggestions feature: update suggestion logic, remove unused partial, and enhance localization 2026-10-27 11:11:05 +13:00
Brenda Wallace aeccc2c5ed Add planting suggestions feature to garden pages
- Introduced a suggestions section on the garden show page to display what can be planted now.
- Added a new view partial for garden suggestions.
- Updated the plant picker to allow selection of a specific garden.
- Enhanced navigation menu to include a link to planting suggestions.
- Added relevant translations for the new feature.
- Implemented feature specs to ensure suggestions display correctly for the user's garden.
2026-10-27 11:11:05 +13:00
Brenda Wallace 932b1883c9 Merge branch 'main' into api/graphiti 2026-10-27 07:01:40 +13:00
Brenda WallaceandDaniel O'Connor 75595350bc Easier recording of harvests from the front page (#5077)
* Implement AddSeedsPicker component and enhance planting selection UI; update styles and serializers for better seed management

* Enhance PlantingPicker component: add hints and titles for harvest and seed actions; update test to reflect changes in seed saving behavior

* Enhance harvest recording: allow harvesting from crops without plantings; update forms and modals for better user experience

* Refactor code structure for improved readability and maintainability

* Remove AddSeedsPicker component and its associated tests

* Add planting picker functionality for harvesting and seed saving

- Introduced PlantingPickersController to handle JSON responses for member's plantings.
- Updated HomeHelper to include crop ID in planting picker properties.
- Refactored PlantPicker and PlantSomethingModal components to support multiple gardens.
- Created PlantingFlow component to manage planting actions (harvest and save seeds).
- Implemented RecordDialog component to handle server-rendered links for harvesting and seed saving.
- Updated various views to include data attributes for triggering the record dialog.
- Added routes for planting picker and corresponding request specs for testing.
- Adjusted styles in _plantings.scss for better layout and spacing.

* Add job management features including job creation and wishlist functionality

* Remove WishlistJobsController and associated views and tests

* Add suggestion links rendering and fix routes formatting

* Refactor AddJobModal and JobPicker components to simplify props and enhance user experience

* Update seed addition test to check dialog presence and current path

* Apply suggestion from @CloCkWeRX

---------

Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
2026-10-26 21:38:12 +10:30
c7c824a6ce Extend session to 90 days and ensure persistence across browser restarts (#4638)
* Extend session to 90 days and make it persistent

- Modified config/initializers/session_store.rb to add 'expire_after: 90.days',
  ensuring the session cookie persists after the browser/tab is closed.
- Updated config/initializers/devise.rb to set 'config.timeout_in' and
  'config.remember_for' to 90 days to align with the new session policy.

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

* Apply suggestion from @CloCkWeRX

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-10-26 10:45:01 +00:00
a2abe79e6f Fix Translation missing en.seeds.updated (#5100)
* Fix missing en.seeds.updated translation

Add missing updated key under the seeds scope in config/locales/en.yml
and add controller test verifying flash notice on seed update.

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

* Update SeedsController test route parameter to use slug

Seeds routes use param: :slug. Updated test parameter key from id to slug.

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-10-26 19:56:13 +10:30
Brenda Wallace 7a86c711a9 Update API base URL configuration to conditionally set based on presence of HOST and API_BASE_URL 2026-10-26 21:18:13 +13:00
Brenda Wallace 75da93694a Merge branch 'main' into api/graphiti 2026-10-26 20:11:16 +13:00
Brenda Wallace dfffafca52 Add harvest reminders feature and update related specs and locales 2026-10-26 19:38:38 +13:00
Brenda Wallace 948cc59d1b Remove Sidekiq integration and update mailer delivery methods to deliver immediately 2026-10-26 19:38:38 +13:00
Brenda Wallace af56f6bc19 Remove Sidekiq initializer configuration 2026-10-26 19:38:38 +13:00
Brenda Wallace 3c8645ce05 Add planting reminders feature and corresponding tests 2026-10-26 19:38:38 +13:00
Brenda Wallace 61552c13d3 Refactor pagination logic to ensure offset is treated as an integer and update API base URL for Codespaces 2026-10-26 17:28:28 +13:00
Daniel O'Connor 8de199bf53 Merge branch 'main' into api/graphiti 2026-10-26 12:47:17 +10:30
Brenda WallaceandDaniel O'Connor 8474bdd416 remove newsletter (#4974)
* Remove unused bluecloth gem

Last released in 2011. It was only required, never called; kramdown
renders the markdown.

* Add specs for Tilt markdown rendering and posts markdown partial

* Remove rails_12factor gem

Last released in 2014. Rails 5+ does this via RAILS_SERVE_STATIC_FILES
and RAILS_LOG_TO_STDOUT, which production.rb already reads.

* Remove memcachier gem from Gemfile and Gemfile.lock

* Remove unused webrat gem

Last released in 2011. Nothing requires it; the specs use Rails'
assert_select and Capybara matchers. Only generator comments mention it.

* Remove crowdin-cli gem

Last released in 2018. Crowdin now ships its own standalone CLI, which
reads crowdin.yml and doesn't need the gem. Also drops the dependencies
only it used (rest-client, gli, crowdin-api and friends).

* Removes the crowdin-cli gem (last released 2018), the dependencies only
it needed, and crowdin.yml. Crowdin was never set up: the config still
has a placeholder project ID and nothing else in the repo mentions it.

Assisted by Claude

* Remove newsletter functionality and associated views and tests

* Remove newsletter functionality and related code across the application

* keep the column

* Remove stale test step

* add back newsletter

* Add migration to update newsletter column comment in members table

---------

Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
2026-10-26 11:48:36 +10:30
Brenda Wallace 759b5290fa Merge branch 'main' into api/graphiti 2026-10-25 15:36:13 +13:00
Brenda Wallace d03f81d1c8 Add functionality to hide completed jobs in notepad and update styles 2026-10-25 13:01:02 +13:00
Brenda Wallace 1135c763de Tidy API resources: read_only and owned macros, private hook helpers
Declare read-only resources and the owner relationship once each, make
the resource hook helpers private, simplify token auth, and cache the
generated API docs for an hour.
2026-10-25 11:48:28 +13:00
Brenda Wallace ed8eded23b Merge remote-tracking branch 'origin/main' into api/graphiti 2026-10-25 11:24:34 +13:00
Brenda Wallace bd4a55331e admin screen for crop job templates 2026-10-24 18:40:10 +13:00
Brenda Wallace e7387a37e0 Add API tests for dashed keys, resource ownership, and write operations
- Implement tests for handling dashed attribute names in API responses and requests in `dashed_keys_request_spec.rb`.
- Enhance error handling tests in `errors_request_spec.rb` for invalid filters and attributes.
- Refactor garden, harvest, and seed request specs to use shared examples for resource write operations.
- Introduce shared examples in `api_writes.rb` to streamline testing of create, update, and delete actions across various resources.
- Update pagination and sorting tests to include new scenarios for offsets and computed attributes.
- Remove redundant code and improve test clarity by utilizing shared contexts and helper methods.
2026-10-24 18:19:11 +13:00
Brenda Wallace 200514c5cc Refactor API controllers and resources to remove redundant resource_class assignments and improve parameter handling in API documentation 2026-10-24 18:19:11 +13:00
Brenda Wallace c87a164b0a Refactor code structure for improved readability and maintainability 2026-10-24 18:19:11 +13:00
Brenda Wallace 73f62d4983 Add API resources for photos, plantings, and seeds; update application configuration
- Introduced `PhotoResource`, `PlantingResource`, and `SeedResource` to manage respective models.
- Updated application configuration to include API base URL.
- Modified production and test environments to set API base URL dynamically.
- Removed outdated JSONAPI resources initializers and patches.
- Refactored routes to use resourceful routing for API endpoints.
- Updated request specs to reflect changes in API responses and relationships.
- Added helper methods for generating related links in request specs.
2026-10-24 18:19:11 +13:00
Brenda Wallace 85b5ff9ecd Add feature flags, with job ideas as the first
Admins switch features on and off at /admin/features, kept in Flipper.
Job ideas (the page, the banners and the overlay) only show while its
flag is on. Features are off until switched on.

Closes #5050
2026-10-24 18:01:56 +13:00
d491df87fc Filter deleted members by default and enable bulk ban on admin members (#5060)
* Filter deleted members by default and enable bulk ban on admin members

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

* Drop instagram

* Default sort

* Update specs

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-10-24 14:30:50 +10:30
Brenda Wallace b5a46fe2f2 Enhance job notepad functionality with date management and improved UI for done tasks 2026-10-24 15:53:33 +13:00
Brenda Wallace d62125e4f5 Add world neighbours feature for job suggestions based on latitude 2026-10-24 15:29:17 +13:00
Daniel O'Connorandgoogle-labs-jules[bot] fbab11e189 Add full CRUD capabilities for member API token management (#5041)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-10-24 02:44:08 +10:30
Daniel O'Connorandgoogle-labs-jules[bot] dc821b28ac Add missing en.layouts.menu translation keys (#5006)
Add missing translation keys under the `en.layouts.menu` namespace in
`config/locales/en.yml` for navigation links used in `app/views/layouts/_menu.haml`.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-10-23 23:42:10 +10:30
3e0ef4ff8c Use site_name in Devise signup/welcome email subjects (#553) (#5007)
- Subclass Devise::Mailer as DeviseMailer overriding subject_for to pass site_name option.
- Configure config.mailer = 'DeviseMailer' and config.mailer_sender in Devise initializer using GROWSTUFF_SITE_NAME env var.
- Update Devise locale subject strings in config/locales/devise.en.yml to use %{site_name}.
- Add spec/mailers/devise_mailer_spec.rb to verify subject interpolation.

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-10-23 23:34:53 +10:30
Brenda Wallace b22fa68bdf Refactor Job Ideas feature: replace dismiss! with hide! method, update job count logic, and enhance UI components for better visibility and layout 2026-10-23 21:04:21 +13:00
Brenda Wallace 76dafadc7f Refactor Job Ideas feature: remove badge display and related tests; update UI components for better layout and visibility of job suggestions 2026-10-23 21:04:21 +13:00
Brenda Wallace c4ab1bab15 Enhance Job Ideas feature: implement overlay for job suggestions, add animations for job transitions, and improve UI components; update controller and helper methods for better handling of job ideas 2026-10-23 21:04:21 +13:00
Brenda Wallace e14b246dca Enhance Job Ideas feature: add UI elements for job suggestions, implement schedule display for template jobs, and improve localization; update related specs for new functionality 2026-10-23 21:04:21 +13:00
Brenda Wallace a235df0215 Add job ideas count and badge display; implement helper methods and update views for better visibility of job ideas 2026-10-23 21:04:21 +13:00