- 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.
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>
* 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>
- 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.
* 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>
* 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>
* 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>
* 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>
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.
- 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.
- 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.
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
* 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>
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>
- 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>