Commit Graph
83 Commits
Author SHA1 Message Date
Brenda Wallace 977a984c24 Remove Elasticsearch integration and related code
- Deleted Elasticsearch gems from Gemfile and Gemfile.lock.
- Updated README and TECH documentation to reflect the removal of Elasticsearch.
- Removed Elasticsearch-related code from models, controllers, services, and factories.
- Adjusted tests to eliminate dependencies on Elasticsearch.
- Cleaned up Docker configuration and environment variables related to Elasticsearch.
- Added a TODO file for future gem reviews and potential removals.
2026-10-22 15:37:03 +13:00
Brenda Wallace 1a95b293bd Add PhotoDialog component and integrate with harvest actions for adding photos 2026-10-11 11:39:04 +13:00
Brenda Wallace 0645d73afa Refactor crop-related views and styles for improved layout and functionality
- Update styles in _crops.scss for better alignment and spacing.
- Enhance _record_page.scss with a new section footer for actions.
- Modify _alternate_names.html.haml to improve dropdown functionality for editing and deleting names.
- Change _history.html.haml header to "Edit history" for clarity.
- Adjust _info.haml to display sowing method and sun requirements prominently.
- Revise _openfarm_data.html.haml to remove unnecessary comments and clarify content.
- Update _photos.html.haml to include a section footer for the "More photos" link.
- Refine _posts.html.haml to streamline the display of posts and actions.
- Improve _scientific_names.html.haml to enhance dropdown functionality for scientific names.
- Update tests in alternate_name_spec.rb and scientific_name_spec.rb to reflect UI changes.
- Remove unused _grown_for.html.haml_spec.rb file.
2026-10-11 09:50:10 +13:00
Brenda Wallace 97d6440785 Add waiting assertions to prevent premature content checks after saving harvest 2026-09-24 15:37:54 +12:00
Brenda WallaceandClaude Opus 5 bff166510a Update the specs for the tidied planting page
Mostly copy and flow changes from the tidy-up, but two real bugs came out
of running them.

Bugs fixed:
- planting_actions_props didn't pass planted_at or today, which
  MarkFinishedModal needs to decide whether "today" may be offered and
  where the date box starts. Without them the dialog threw while
  rendering, and with no error boundary React tore down the whole island,
  so the actions menu vanished entirely.
- The dialogs reloaded the page from inside the save callback, tearing
  the page down while the dialog was still finishing its own update. They
  now close first and reload on the next tick.

Menu items are lower-cased in CSS, as the garden cards already do it,
rather than by calling downcase on the shared button translations. That
was mangling labels other pages show in sentence case.

Specs:
- Menu, dialog and section-heading flows updated: the actions menu opens
  dialogs rather than navigating, so recording a harvest, marking a
  planting finished, editing and transplanting all drive the dialog.
- Copy: "grows this in", "day 14 of 50", "Planned" for a future planting,
  "4 of 5", the new harvest-months wording, and the add-photo dialog
  naming what it adds to.
- The parent-seed example asserted a link to the planting, which came
  from the breadcrumb; the last crumb is the page you are on, so it is
  plain text now and the example checks the seed link instead.
- Removed spec/features/shared_examples/append_date.rb. It drove the old
  datepicker finish flow and had one caller.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 12:57:46 +12:00
Daniel O'Connor 3edd2510d8 Merge pull request #4683 from Growstuff/refactor-harvests-remove-elasticsearch-14630838429921835504
Refactor harvests to remove Elasticsearch
2026-06-24 20:26:22 +09:30
035210197f Prompt for updated planting rating when harvesting (#4608)
* Update planting rating when recording a harvest

- Added virtual attribute `overall_rating` to `Harvest` model.
- Updated `HarvestsController` to permit `overall_rating` and synchronize it to the associated `Planting`.
- Added a rating range field (1-5) to the harvest form.
- Added controller tests to verify that the planting rating is updated.
- Refined feature tests for harvesting.

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

* I have updated the system to allow for recording a planting rating when a harvest is logged. Here is a summary of the changes:

- Added a virtual attribute `overall_rating` to the `Harvest` model.
- Updated `HarvestsController` to permit `overall_rating` and synchronize it to the associated `Planting`.
- Added a rating range field (1-5) to the harvest form.
- Added controller tests to verify that the planting rating is updated correctly.
- Updated feature tests to ensure the harvest form functions as expected.

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

* Update database.yml

* Apply suggestions from code review

Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>

* Adjust wording

* Change harvest modal

* Fix tests

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-05-03 14:47:00 +09:30
Daniel O'Connor 5d112e9134 Rubocop: Capybara/RSpec/HaveSelector (#4539)
* Rubocop: Capybara/RSpec/HaveSelector

* Rubocop: Capybara/RSpec/HaveSelector
2026-04-23 22:45:58 +09:30
Daniel O'Connor ce946c3a83 Rubocop fixes 2025-09-20 09:45:56 +00:00
Daniel O'Connor 58780ec199 Swap harvest to html5 date field (#3894)
* Update gardens to have a non 0 area

* Spec no longer possible through frontend

* Fix spec

* Swap harvest to html5 date field

* Fix spec
2024-10-14 00:09:30 +10:30
Daniel O'Connor a7a5b6ef17 Remove required text UI element 2024-10-13 11:56:56 +00:00
Daniel O'Connor 8b4f0771c5 Ruby 3.2: Rubocop - Fix Negation matcher (#3780)
* Ruby 3.2/Bundler 2.4

* Fix creation

* Upgrade to js-routes 2. Put all js routes into a global namespace.

* Remove js-routes

* Remove

* Adjust ownership

* Appease codeclimate for the nth time

* Fix deprecation warning by explicitly calling to_fs

* Fix deprecation warning by explicitly calling to_fs

* Fix deprecation warning by explicitly calling to_fs

* Swap to will paginate successor for bootstrap

* Update app/views/members/show.html.haml

* Update app/views/plantings/index.rss.haml

* Update .env

* Update .devcontainer/.env

* Fix spec

* Update spec

* Fix spec

* Pin to 2.4.22

* 3 space indent

* Regenerate

* Update rubocop

* Rubocop

* More rubocop

* Regenerate

* Fix Capybara/NegationMatcher
2024-07-13 15:20:11 +09:30
Daniel O'Connor d1f754a288 Rubocop 2022-11-08 00:23:38 +10:30
Daniel O'Connor 2db3d1bacc Various corrections 2022-11-08 00:21:23 +10:30
Awesome Code 593059d4aa Auto corrected by following Lint Ruby Capybara/CurrentPathExpectation 2020-05-23 07:48:28 +12:00
Brenda 88ac147dda Restore old labels on buttons 2020-03-01 07:56:34 +13:00
Brenda Wallace d0154a8b60 Fall back on planting icon when plant part icon does not exist 2020-02-29 12:34:28 +13:00
Brenda Wallace 2e8625d6ff Reindex harvests before harvest feature spec 2020-01-02 21:10:35 +13:00
Brenda Wallace b8c94c13cc refactor to use search:true instead of reindex 2019-12-24 22:15:01 +13:00
Brenda Wallace f3ffd6c086 remove extra index runs, use search:true from spec helper 2019-12-24 22:11:14 +13:00
codefactor-io 78fed0e8de [CodeFactor] Apply fixes 2019-12-22 02:47:35 +00:00
Brenda Wallace 4b9863a3e6 index harvests into ES during harvests#index spec 2019-12-22 15:46:29 +13:00
codefactor-io e8760f9c38 [CodeFactor] Apply fixes 2019-12-20 03:33:23 +00:00
Brenda Wallace 78e111af80 fixing paths to member harvests (with more tests too) 2019-12-19 16:54:05 +13:00
Brenda Wallace 7c38f7eca6 Pull homepage data directly from elasticsearch (#2316)
* Pull homepage data directly from elasticsearch

* Removing non-elasticsearch options

* [CodeFactor] Apply fixes to commit c46b2e7
2019-12-09 10:03:48 +13:00
Brenda Wallace c6fffebb28 Update specs for new index layout with api docs 2019-11-18 10:50:13 +13:00
Brenda Wallace b0c8b11246 📝 Inline editing and display tidy ups (#2200)
* Inline editing and display tidy ups
2019-10-08 11:06:53 +13:00
Brenda Wallace 34b399cd8e Use more signed in contexts in browse crops spec
More member role contexts on alt name spec

More member role contexts in crop feature specs

Don't wrap the shared_context
2019-08-18 16:10:03 +12:00
Brenda Wallace 756cf1fe3a Removing unused code in specs 2019-08-18 14:51:24 +12:00
Brenda Wallace 8936933251 Shared context for signing in (and then out) in feature specs 2019-08-17 14:10:56 +12:00
Brenda Wallace 52edaae43b update harvest spec to find edit behind actions menu 2019-06-13 23:05:59 +12:00
Brenda Wallace 5957309dea Update harvest spec 2019-06-09 10:16:34 +12:00
Brenda Wallace 3d11dac718 Fixing harvest specs 2019-06-08 18:21:15 +12:00
Brenda Wallace 85ba701045 Merge branch 'dev' into feature/searchkick 2019-04-17 12:35:09 +12:00
Awesome Code 8b0ecd568e Auto corrected by following Lint Ruby RSpec/ImplicitSubject 2019-04-17 10:37:30 +12:00
Brenda Wallace 01a3654d41 Working without elastic search too 2019-04-08 21:39:20 +12:00
Brenda Wallace bd797a4d8e Change call to reindex crops in specs 2019-04-08 21:39:20 +12:00
Awesome Code 4ba5319ba8 Auto corrected by following Lint Ruby Capybara/FeatureMethods 2019-04-01 23:02:50 +13:00
Awesome Code ad470ede1d Auto corrected by following Lint Ruby RSpec/AlignRightLetBrace 2019-03-13 17:23:33 +13:00
Awesome Code f90cc792bb Auto corrected by following Lint Ruby RSpec/AlignLeftLetBrace 2019-03-13 11:42:27 +13:00
Awesome Code 490db7b342 Auto corrected by following Lint Ruby RSpec/HookArgument 2019-02-11 09:00:34 +13:00
Brenda Wallace 986bca44f7 Merge remote-tracking branch 'upstream/dev' into routes-tidy-up
Conflicts:
	app/views/layouts/_header.html.haml
	spec/features/gardens/actions_spec.rb
2019-01-24 13:48:36 +13:00
Brenda Wallace 81ee8ec56e Add crop name to actions 2019-01-24 12:17:40 +13:00
Brenda Wallace 387200abf7 Moving garden data under members 2019-01-06 08:45:42 +13:00
Brenda Wallace 68953188f8 Update to new path names 2019-01-06 08:45:42 +13:00
Awesome Code 90f4db4853 Auto corrected by following Ruby rspec layout 2018-09-10 22:20:12 +00:00
brenda 2b8aac19dd Revert "Auto corrected by following Ruby Capybara/FeatureMethods"
This reverts commit b52763b7c2.
2018-09-07 10:40:09 +12:00
Awesome Code b52763b7c2 Auto corrected by following Ruby Capybara/FeatureMethods 2018-09-05 12:06:58 +00:00
Brenda Wallace 6077d4da34 Fixed bug in garden spec 2018-04-21 15:01:33 +12:00
Brenda Wallace f9d4e1d6ae Ancestry of food. Seeds -> Planting -> Seeds -> Planting (#1550)
* Add seed ancestry, and seeds.finished_at
* Plantings and seeds produce each other
* Permissions for seeds actions
* View update, for seed actions, and planting ancestry
* Routes for seeds
* Scopes for harvests
* Spec updates for seeds
* Removed in-line style
* Add seed ancestry, and seeds.finished_at
* Plantings and seeds produce each other
* Permissions for seeds actions
* View update, for seed actions, and planting ancestry
* Routes for seeds
* Scopes for harvests
* Spec updates for seeds
* Moved finishable to a concern
* Seeds.finished_at
* rubocop fixes
* Made seeds sown migration the most recent
* Specs for home page
* Only show current seeds on home page
* Seeds appear for logged in or not
* Buttons to mark seeds finished
* JS for marking seeds finished
* Some actions only appear if seed or planting is active
* Fixed up display of home page
* Fixed typo in admin members#index
* Tidying up actions on all the things
* Harvest description in #index
* Truncate garden description if long
* Updated link label in view spec
* Show planted_from always, becuase it might be a parent seed
* find correct link in spec adding photos to garden
* fixed spec finding link to edit garden
* Better harvest description truncation
* Helping spec find the edit button
* specs for the home page
* Re-instate crops js, but in the correct file now
* Fixed link to garden in actions
* Tweaking mobile view
2018-03-12 08:39:32 +13:00