Commit Graph
107 Commits
Author SHA1 Message Date
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
d19fd9657b Replace bootstrap datepicker with native HTML5 date inputs (#5057)
* Replace bootstrap datepicker with native HTML5 date inputs

Convert planting and seed date text fields to native HTML5 date fields
(`f.date_field`), matching existing date inputs across the app. Remove
bootstrap-datepicker JS/CSS imports, legacy site wrapper scripts,
package dependency, and update test specs.

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

* Fix spec

* Fix spec

* Fix spec

* Drop expectations about removed control

* Fix specs

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-10-26 19:52:50 +10:30
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 ec8f32cc9a Fix flaky specs by adding DetachedNodeRetry module and disabling Rack::Attack during tests (#4983) 2026-10-21 13:01:35 +10:30
Brenda Wallace 9d54380e22 Add feature specs for crop name rows and seed finishing functionality 2026-10-20 09:16:11 +13:00
Brenda Wallace 32ea1d02af Add verification for heirloom fact update in seed facts spec 2026-10-16 17:32:09 +13:00
Brenda Wallace 7c4cf30f4f Enhance seed ownership display in specs and helper methods 2026-10-16 17:32:09 +13:00
Brenda Wallace 5c2afe6b3e Add heirloom/hybrid fact display and editing functionality 2026-10-16 17:32:09 +13:00
Brenda Wallace c8c32014bb tidying up, as react components 2026-10-16 17:32:09 +13:00
Brenda Wallace fdebe79b7d Refactor seed management features
- Introduced `@other_count` in SeedsController to track in-stock and finished seeds based on the filter applied.
- Enhanced SeedsHelper with new methods: `seed_owner_label`, `seed_stacks`, and `seed_choice_link` for better organization and readability.
- Updated views to utilize new helper methods, improving the display of seed information and filtering options.
- Adjusted the Seed model to include methods for determining if a seed's sow-by date has passed and to return the heirloom type.
- Improved tests for filters and helper methods to ensure accurate functionality and coverage.
2026-10-16 17:32:09 +13:00
Brenda Wallace 0ea9f36ece Refactor follow creation in specs to use factory method for consistency 2026-10-16 17:32:09 +13:00
Brenda Wallace eca77c8e4e Refactor follow creation to use create! method and update seed packet rule matcher for case insensitivity 2026-10-16 17:32:09 +13:00
Brenda Wallace 1b9e6d036f Add seed filtering, messaging features, and enhance seed helper methods
- Implemented filtering for seeds based on source (own, bought, traded, heirloom) and sow-by dates in the SeedsController.
- Added feature specs for seed filtering and messaging functionalities.
- Enhanced SeedsHelper with methods for seed source labels, packet rules, and distance calculations.
- Updated views to reflect changes in seed display and filtering options.
- Created request specs for message creation and conversation handling related to seeds.
2026-10-16 17:32:09 +13:00
Brenda Wallace 2709ce3e70 Implement seed stack opening feature with UI updates and tests 2026-10-16 17:32:09 +13:00
Brenda Wallace 47945492c2 Implement seed search functionality with results summary and no results handling 2026-10-16 17:32:09 +13:00
Brenda Wallace deda0350e3 Implement grouping and list view for seed shelves with updated styles 2026-10-16 17:32:09 +13:00
Brenda Wallace 2c7a6224b3 Add in stock and finished tabs to seeds index with counts 2026-10-16 17:32:09 +13:00
Brenda Wallace 0029f6e6cb Implement seed shelves feature with grouped packets by parent crop 2026-10-16 17:32:09 +13:00
Brenda Wallace c46344f90a New menus: desktop bar, tablet and phone drawer, quick add, search (#4929)
* fixes to the menus

* Implement full screen search for mobile: add search functionality and styles

* more icons
2026-10-15 19:06:57 +10:30
Brenda Wallace 3535826dde Refactor seed facts display and editable forms for improved clarity and functionality 2026-10-11 17:10:44 +13:00
Brenda Wallace 113f469b50 Add plant_before_year attribute to seeds and update related forms and views 2026-10-11 16:41:59 +13:00
Brenda Wallace 83d2e074a2 Refactor styles and structure for record pages, enhancing layout and consistency across planting, harvest, and seed views 2026-10-11 11:18:25 +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
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 f1acb35520 Merge pull request #4537 from Growstuff/FactoryBot/SyntaxMethods
Rubocop: FactoryBot/SyntaxMethods
2026-04-23 22:29:24 +09:30
google-labs-jules[bot]andDaniel O'Connor 0f4803392d Add seed source to Seed model (#4186)
* Add seed source to Seed model

* Update _form.html.haml

* Add to schema

* Default option

* Default option

* Fix test

---------

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>
2025-09-01 21:47:31 +09:30
Daniel O'Connor a7a5b6ef17 Remove required text UI element 2024-10-13 11:56:56 +00:00
Daniel O'Connor 81060cccf7 Ruby 3.2: Rubocop - Lint/* and Style/* (#3786)
* Rubocop - Layout/*
* Rubocop - Lint and Style
2024-07-13 15:38:37 +09:30
Daniel O'Connor 3738d7cc21 Seeds > Photos - Fix tests not running and fix tests (#3621)
* Rename, so it runs in CI

* Fix specs slightly

* Fix tests
2024-02-04 15:05:43 +10:30
Daniel O'Connor f338274611 Rails 7.1 (#3590)
* Rails 7.1

* Update application.rb

* Bump searchkick

* Bump to 7.0.0

* Fix

* Fix crop search

* Sync translation

* Drop required from form group

* Loosen specs further

* Fix Gemfile

* Update seeds_request_spec.rb

* Update test.rb

* Rename
2024-01-27 10:06:47 +10:30
ee45b518ce Rubocop fixes (Stacked PR) (#3454)
* Fix todo

* Rubcop

* Rubocop

* Rubocop

* Rename harvests_routing_spec.rb to harvests_controller_routing_spec.rb

Making codeclimate happier

* Rename for CodeFactor: updates_routing_spec.rb to posts_controller_updates_routing_spec.rb

For codefactor

* Rename for CodeFactor: follows_routing_spec.rb to follows_controller_routing_spec.rb

* Rename for CodeFactor: forums_routing_spec.rb to forums_controller_routing_spec.rb

* Rename spec/routing/roles_routing_spec.rb to spec/routing/admin/roles_controller_routing_spec.rb

* Rename authentications_routing_spec.rb to authentications_controller_routing_spec.rb

* Rename for CodeFactor: plantings_routing_spec.rb to plantings_controller_routing_spec.rb

* Rename for CodeFactor: scientific_names_routing_spec.rb to scientific_names_controller_routing_spec.rb

* Rename for CodeFactor: seeds_routing_spec.rb to seeds_controller_routing_spec.rb

* Rename for CodeFactor: comments_routing_spec.rb to comments_controller_routing_spec.rb

* Rename for CodeFactor: garden_types_routing_spec.rb to garden_types_controller_routing_spec.rb

* Rename for CodeFactor: admin_routing_spec.rb to admin_controller_routing_spec.rb

* Rename for CodeFactor: gardens_routing_spec.rb to gardens_controller_routing_spec.rb

* Rename for CodeFactor: photos_routing_spec.rb to photos_controller_routing_spec.rb

* Rename for CodeFactor: plant_parts_routing_spec.rb to plant_parts_controller_routing_spec.rb

* Rename for CodeFactor: crops_routing_spec.rb to crops_controller_routing_spec.rb

* [CodeFactor] Apply fixes

* Rename

* Code factor bot

---------

Co-authored-by: Cesy <cesy.avon@gmail.com>
Co-authored-by: codefactor-io <support@codefactor.io>
2024-01-07 21:05:59 +10: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 Wallace 4a23bcefd1 Tests tradeable and not tradeable seed saving 2020-03-02 10:21:54 +13:00
Brenda Wallace b8c94c13cc refactor to use search:true instead of reindex 2019-12-24 22:15:01 +13:00
codefactor-io e8760f9c38 [CodeFactor] Apply fixes 2019-12-20 03:33:23 +00: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 72e348cdf6 Fix up specs 2019-11-19 14:16:50 +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 7b5698f977 👩‍🌾 Import openfarm data (#2177)
* Pull in openfarm icons, photos, info
* Truncating member location
* tidying up harvest display, and reducing duplication in css styles
* Tiny crop chip
* only show crop charts if there is data to show
* Make the styles more Growstuff
* Fixed links to openfarm
* Updating specs to cope with new photo sources
fix broken garden timeline on some pages
* Update homepage blurb
* Import crop companions
* More fluid page
* use thumbnail unless the source is flickr
* Messing with homepage
* Added crop growing_degree_days
* expect full size url on photos helper spec
* formatted dates from seeds#show
* tidy up places#show
* Move progress bar
* Quicker buttons for approve/reject crops
* Remove kaminari gem
* use crop cards on hierarchy page
* more crops on crops#index
* Wrap photo creation in transaction
* Wrap crop companions in a transaction
2019-09-28 17:23:25 +12: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 4b0b91c4d9 Update spec for editing seeds 2019-06-15 19:13:11 +12:00
Brenda Wallace bfe3e1ea69 Updated labels to look for in spec for adding seeds 2019-06-15 08:50:34 +12:00
Brenda Wallace 10475cb711 Matching labels on seeds form to specs 2019-06-13 20:32:00 +12:00
Brenda Wallace 6825f8810f tidy up seeds form 2019-06-13 20:01:21 +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