Commit Graph
2804 Commits
Author SHA1 Message Date
b3446f6cc7 Add basic HTML email layout with Growstuff branding and footer (#5035)
* Add HTML email layout with Growstuff branding and footer

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

* Add HTML email layout with Growstuff branding, call-to-action buttons, and footer

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

* Add previewer

* Update spec

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-10-26 04:41:43 +00: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
Brenda Wallace 334e7a8370 feat: integrate Tiptap editor for post body editing
- Updated post actions menu to link directly to the edit post path.
- Enhanced post form to include a React-based body editor using Tiptap, with a fallback to a plain textarea.
- Added Tiptap dependencies to package.json and updated yarn.lock.
- Created a feature spec to verify navigation to the edit page from the post actions menu.
2026-10-26 15:22:45 +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 d3f61775b4 Enhance job validation and resource authorization for gardens; add tests for job creation and linking 2026-10-25 19:04:05 +13:00
Brenda Wallace a79f24cf5e Refactor API controllers and specs for improved request handling and error responses 2026-10-25 18:44:05 +13:00
Brenda Wallace 759b5290fa Merge branch 'main' into api/graphiti 2026-10-25 15:36:13 +13:00
Brenda Wallace 586fcc70f9 Implement job permissions for members and admins in Ability model; add corresponding specs 2026-10-25 15:33:32 +13:00
Brenda Wallace ddd9277696 Refactor CSRF token handling in job ideas and notepad scripts; improve rendering of notepad groups 2026-10-25 13:01:02 +13:00
Brenda Wallace 086140205d fixing authorize in the APi 2026-10-25 11:44:02 +13:00
Brenda Wallace ed8eded23b Merge remote-tracking branch 'origin/main' into api/graphiti 2026-10-25 11:24:34 +13:00
Daniel O'Connorandgoogle-labs-jules[bot] d46ade4722 Replace deprecated SimpleCov.add_filter with SimpleCov.skip (#5068)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-10-24 05:56:47 +00:00
Brenda Wallace e711ae9e9a Add admin and crops current section tracking to menu and update header specs for crop wranglers 2026-10-24 18:40:10 +13:00
Brenda Wallace c830624a75 Crop job admin 2026-10-24 18:40:10 +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 27794dcb38 Remove Swagger helper configuration file 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 07612ff385 Add API request specs for filtering, pagination, sorting, and relationships 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
Brenda Wallace 8e0825b1b0 Add job finished event handling and descriptions
- Implemented event description logic for finished jobs in EventHelper.
- Created a new partial for finished job descriptions.
- Updated TimelineService to include finished jobs in event queries.
- Enhanced specs for event descriptions and timeline service to cover finished jobs.
2026-10-24 17:48:57 +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 168e394150 Expands "Friends and Neighbours" to 300 items 2026-10-24 15:43:19 +13:00
Brenda Wallace d62125e4f5 Add world neighbours feature for job suggestions based on latitude 2026-10-24 15:29:17 +13:00
google-labs-jules[bot]andCloCkWeRX a9849a7e50 Redirect comments actions to commentable with #comments anchor
Update CommentsController create, update, and destroy actions to redirect to
the commentable resource path with the #comments anchor tag. Also update
CommentsController spec assertions to expect the #comments anchor tag on
redirection.

Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
2026-10-24 11:27:58 +10:30
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
dependabot[bot]andDaniel O'Connor c80225c4bc Bump rails from 8.1.3.1 to 8.1.4 (#4856)
* Bump rails from 8.1.3.1 to 8.1.4

Bumps [rails](https://github.com/rails/rails) from 8.1.3.1 to 8.1.4.
- [Release notes](https://github.com/rails/rails/releases)
- [Commits](https://github.com/rails/rails/compare/v8.1.3.1...v8.1.4)

---
updated-dependencies:
- dependency-name: rails
  dependency-version: 8.1.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Drop stale expectation

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
2026-10-24 00:00:34 +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
Daniel O'Connorandgoogle-labs-jules[bot] af40114ab8 Fix race condition in gardens_spec.rb feature tests (#5038)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-10-23 23:09:37 +10:30
Brenda Wallace bbb8a142c7 widening the range for suggsting jobs (#5034)
* Add crop_job_step association to Job model and migration

- Introduced a has_many association in CropJobStep for jobs with dependent nullify.
- Added crop_job_step reference to Job model with optional association.
- Created migration to add crop_job_step reference to jobs table with foreign key.
- Updated schema to reflect the new association.
- Added tests for crop_job_step association in Job model.

* Add ApplyCropJobTemplate service and for_crop scope to CropJobTemplate model

* Add job idea dismissal feature and related services

- Introduced JobIdeaDismissal model to manage dismissed job ideas for members.
- Added associations and validations for job idea dismissals in the Member model.
- Created JobIdeas service to generate job ideas based on templates and last year's activities.
- Implemented JobIdeas::LastYear and JobIdeas::Templates classes to fetch relevant job ideas.
- Added migration for job_idea_dismissals table and updated schema.
- Developed tests for job idea dismissal functionality and related services.

* Add PlantedLastYear service and update JobIdeas to include it

* Add action attribute to Job model and update related files

* Refactor JobIdeas service: replace LastYear and PlantedLastYear with PastJobs and PastPlantings; update related specs

* Add community and nearby job ideas sources; implement shown and more methods in JobIdeas service

* Implement job idea dismissal duration and snooze functionality; add hidden_until attribute and related specs

* Add Harvest class to JobIdeas service for managing harvest-related job ideas; implement ideas generation and related specs

* Add JobIdeas feature: implement JobIdeasController, views, and related services for job suggestions; include functionality for adding, hiding, and snoozing job ideas

* Refactor button options in job ideas view for improved readability and maintainability

* Enhance Job Ideas feature: add styling for idea cards, implement filtering options, and update controller logic to manage skipped sources; improve localization for job idea reasons and sections

* Add job ideas count and badge display; implement helper methods and update views for better visibility of job ideas

* 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

* 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

* Refactor Job Ideas feature: remove badge display and related tests; update UI components for better layout and visibility of job suggestions

* Refactor Jobs view and update specs: improve layout for job groups and enhance test coverage for jobs index with ideas

* Refactor Job Ideas feature: replace dismiss! with hide! method, update job count logic, and enhance UI components for better visibility and layout

* Add job ideas feature: implement ideas banner on homepage, enhance overlay logic, and add tests for job ideas display

* widen the range for suggseting jobs

* Fix comment to accurately describe planted crops timeframe in PastPlantings class
2026-10-23 22:24:12 +10:30
Brenda Wallace ff1dd8bb05 adding coverage 2026-10-23 21:34:33 +13:00
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 7a4bff150e Refactor Jobs view and update specs: improve layout for job groups and enhance test coverage for jobs index with ideas 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
Brenda Wallace 3bdbd6c3a5 Enhance Job Ideas feature: add styling for idea cards, implement filtering options, and update controller logic to manage skipped sources; improve localization for job idea reasons and sections 2026-10-23 21:04:21 +13:00
Brenda Wallace 686b508d34 Add JobIdeas feature: implement JobIdeasController, views, and related services for job suggestions; include functionality for adding, hiding, and snoozing job ideas 2026-10-23 21:04:21 +13:00
Brenda Wallace 19e179229c Add Harvest class to JobIdeas service for managing harvest-related job ideas; implement ideas generation and related specs 2026-10-23 21:04:21 +13:00
Brenda Wallace c6bf51c542 Implement job idea dismissal duration and snooze functionality; add hidden_until attribute and related specs 2026-10-23 21:04:21 +13:00
Brenda Wallace fa1da3712b Add community and nearby job ideas sources; implement shown and more methods in JobIdeas service 2026-10-23 21:04:21 +13:00
Brenda Wallace 83504615d4 Refactor JobIdeas service: replace LastYear and PlantedLastYear with PastJobs and PastPlantings; update related specs 2026-10-23 21:04:21 +13:00
Brenda Wallace 1266c0e537 Add action attribute to Job model and update related files 2026-10-23 21:04:21 +13:00
Brenda Wallace 3109109cd7 Add PlantedLastYear service and update JobIdeas to include it 2026-10-23 21:04:21 +13:00
Brenda Wallace a3764739b3 Add job idea dismissal feature and related services
- Introduced JobIdeaDismissal model to manage dismissed job ideas for members.
- Added associations and validations for job idea dismissals in the Member model.
- Created JobIdeas service to generate job ideas based on templates and last year's activities.
- Implemented JobIdeas::LastYear and JobIdeas::Templates classes to fetch relevant job ideas.
- Added migration for job_idea_dismissals table and updated schema.
- Developed tests for job idea dismissal functionality and related services.
2026-10-23 21:04:21 +13:00
Brenda Wallace c5b04b78a3 Add ApplyCropJobTemplate service and for_crop scope to CropJobTemplate model 2026-10-23 21:04:21 +13:00