Commit Graph
272 Commits
Author SHA1 Message Date
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 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
Daniel O'Connorandgoogle-labs-jules[bot] 5a1886b213 Link member profile image and name in mobile menu (#5105)
Update the offcanvas drawer header on small devices to wrap the
signed-in member's profile avatar image and login name in a link
pointing to the member's profile page.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-10-26 23:03:18 +10:30
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
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 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
Daniel O'Connor 544287cd42 Localize footer navigation links (#5022) 2026-10-23 18:00:19 +10:30
Brenda Wallace a0b24381ac Refactor activities to jobs across the application
- Renamed all instances of 'Activity' to 'Job' in views, controllers, and models.
- Updated routes to reflect the change from activities to jobs.
- Modified database schema to rename the activities table to jobs and adjusted related columns.
- Updated locale files to change activity-related translations to jobs.
- Adjusted tests to ensure they reference jobs instead of activities.
- Removed the category field from jobs as they are now a plain list.
- Updated seed data and sample data generation to create jobs instead of activities.
2026-10-22 17:16:25 +13:00
Brenda Wallace ca7fd81439 Tidy/login signup (#4958)
* Add authentication dialogs for sign in and sign up

- Implemented AuthDialog component to manage sign in and sign up modals.
- Created SignInModal and SignUpModal components for handling respective authentication processes.
- Added AuthFields component for reusable form fields and error handling.
- Updated various views to utilize the new authentication dialogs instead of traditional links.
- Enhanced user experience by allowing sign in and sign up actions to occur without full page reloads.
- Added feature specs for testing the functionality of the new dialogs.

* Refactor modals and input fields for improved accessibility and styling; adjust button sizes and text formatting

* Refactor authentication forms and modals for improved usability and accessibility; integrate reCAPTCHA handling and enhance error messaging

* Refactor SignUpModal layout for improved responsiveness and accessibility; organize fields into rows and enhance styling

* Refactor session view spec to streamline field checks; remove redundant test and retain essential content expectations
2026-10-17 09:26:39 +10:30
Brenda WallaceandClaude Sonnet 5.5 64c9bd3baa Open every add-photo link in the photo dialog
The dialog is mounted once in the layout and any link marked
data-photo-dialog opens it, naming its record in the heading. The gardens
and posts menus, the old planting card and add_photo_button now use it
instead of going to the new-photo page.

Part of #4933

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 22:21:26 +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 02f5f95b9a Add "New" badge and welcome message for neighbours page
- Define launch date and duration for "New" badge visibility
- Update neighbours menu to display badge when applicable
- Enhance neighbours show page with a welcome message for new users
- Add corresponding translations for welcome message and feedback link
2026-10-14 12:07:49 +13:00
Brenda Wallace 5c44eb6976 Redirect old timeline to friends and neighbours page and update related views 2026-10-13 20:01:21 +13:00
Brenda Wallace 3b06325e62 Add friends and neighbours feature with member dismissal functionality
- Implement RecentActivity service to track recent planting, harvesting, and trading events.
- Enhance TimelineService to include garden layouts in event queries.
- Update navigation menu to include a link to friends and neighbours.
- Create member card partial for displaying gardener information.
- Add follow button partial for managing follow actions.
- Refactor members index view to use the new member card partial.
- Introduce neighbours feed view with daily updates and entries.
- Implement entry partial for displaying individual neighbour activities.
- Create layout partial for visualizing garden layouts.
- Add posts section to neighbours view for displaying recent posts.
- Implement reach section to show nearby gardeners.
- Add suggestions section for recommending gardeners to follow.
- Create routes for neighbours functionality and member dismissals.
- Add migrations for member dismissals and garden layout timestamps.
- Write feature and request specs for neighbours functionality.
- Include support for creating located members in tests.
2026-10-13 17:08:18 +13:00
Brenda Wallace 99ab3ee33b Fix menu underline bug by removing caching for menu items to ensure proper rendering. 2026-10-13 09:24:00 +13:00
Brenda Wallace d389104e4d Redesign mobile navigation and search bar for improved usability and aesthetics 2026-10-12 19:20:17 +13:00
Brenda Wallace c83d542146 Enhance navigation and dashboard features with current section highlighting and last year's planting data 2026-10-12 19:19:43 +13:00
Brenda Wallace ef06bab74f Add crop suggestions feature and dashboard enhancements
- Introduced crop suggestions functionality allowing users to receive tailored crop recommendations based on their location and preferences.
- Implemented the ability for users to dismiss specific crop suggestions, preventing them from receiving recommendations for crops they are not interested in.
- Added a location picker for users to set their gardening location, enhancing the accuracy of crop suggestions.
- Enhanced the dashboard to display relevant statistics, including plantings and harvests, with comparisons to previous years.
- Created new views and partials for displaying statistics, crop suggestions, and user interactions on the dashboard.
- Updated routes to accommodate new features related to crop suggestions and member locations.
- Added migrations for new database tables and columns to support crop dismissal and suggestion preferences.
- Developed tests for the new features, ensuring functionality and user experience are maintained.
2026-10-12 19:12:18 +13:00
Brenda Wallace eb86094787 Merge remote-tracking branch 'origin/main' into feat/home-page-redesign 2026-10-12 14:19:47 +13:00
Brenda Wallace 0882603e78 Add releases page and update homepage layout
- Introduced a new releases page linked from the homepage.
- Updated homepage to include a signed-in greeting with member avatar and season summary.
- Enhanced mobile styles for better navigation and search box visibility.
- Added season-related helper methods and tests for improved functionality.
2026-10-12 14:11:11 +13:00
Brenda Wallace fcd1fe0782 Redesign home page with new hero section, update signup links, and enhance styling for better user experience 2026-10-12 14:06:51 +13:00
39e65fd848 Remove CMS - use haml pages instead (#4899)
* Add support and terms of service pages with corresponding routes

- Created a new support page with frequently asked questions.
- Added a terms of service page outlining user agreements and policies.
- Removed old support index and CMS initializer files.
- Updated routes to include new policy and support paths.
- Implemented tests for new pages and footer links.
- Adjusted database migration for CMS content compatibility.

* Remove custom JavaScript file for the admin area

* Add kramdown gem for Markdown support in Haml

* Fix various typos and link formatting issues

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* remove reference to paid account

* Remove reference to paid accounts from support page

* Remove references to paid and permanent accounts from Terms of Service

* removing references to paid accounts

* Update contact email link format in TOS

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Add new pages and routes for About, Policies, and Copyright; update existing pages

* Fix typos and improve clarity in community guidelines, copyright policy, data use policy, privacy policy, support page, and terms of service

* Drop stale expectation

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
2026-10-12 03:05:12 +10:30
Brenda WallaceandClaude Sonnet 5 bfd7d8daf0 Make the sidebar nav links look like links
Link colour and underline, with the page you are on in bold and marked
aria-current.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 bb50385bb8 Line the sidebar text up with the text in the member card
The skip link, nav links, button, blurb and inactive gardens link sat at
the card's edge while the card's own text is inset. Give them the same
inset, left-align the blurb, and add a little space between the links.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 17:42:26 +12:00
Brenda WallaceandClaude Sonnet 5 781723eb68 Put the generic modal's close button after its title
In Bootstrap 5 the close button has an auto left margin, so before the
title it sat beside it instead of at the right edge.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-21 17:40:20 +12:00
Brenda WallaceandClaude Sonnet 5 a9193dc988 Use Bootstrap 5 close buttons and alert-dismissible
.close with a times character -> .btn-close (which draws its own cross), with an
aria-label on each. The alert helper said alert-dismissable, Bootstrap 3's
spelling; Bootstrap 5 needs alert-dismissible for the close button's spacing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-20 18:03:36 +12:00
Brenda WallaceandClaude Sonnet 5 1ee95263ee Rename Bootstrap 4 badge classes to Bootstrap 5
badge-info/success/... -> text-bg-info/success/..., which set the background
and a readable text colour together, and badge-pill -> rounded-pill. The site's
own badge-late, badge-harvest and similar hooks are unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-20 18:01:20 +12:00
Brenda WallaceandClaude Sonnet 5 be5ed5fca5 Rename Bootstrap 4 utility classes to their Bootstrap 5 names
text-left/right -> text-start/end, float-left/right -> float-start/end,
ml-/mr-/pl-/pr- -> ms-/me-/ps-/pe-, border-left/right -> border-start/end,
dropdown-menu-left/right -> dropdown-menu-start/end, font-weight-* -> fw-*,
font-italic -> fst-italic and sr-only -> visually-hidden. Bootstrap 5 dropped
text-justify, so the site keeps a one-line rule for it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-20 18:01:00 +12:00
google-labs-jules[bot] 7457edf559 Merge pull request #4380 from Growstuff/community-garden-landing-page
feat: Add community garden landing page
2025-12-03 18:20:40 +10:30
Daniel O'Connor a0e8beb372 Update _head.html.haml 2025-12-02 22:51:08 +10:30
Daniel O'Connor d91799cd51 Update _head.html.haml 2025-12-02 22:47:14 +10:30
google-labs-jules[bot] 91e1f1c004 feat: Add dynamic meta descriptions
This commit improves the meta descriptions for several pages by making them dynamic and object-specific.

- The default meta description in `app/views/layouts/_head.html.haml` has been updated to include a mention of open data.
- The `show.html.haml` views for crops, seeds, plantings, harvests, and members now have a `content_for :meta_description` block. This block uses the object's description or bio if available, and falls back to a generated string if not.
2025-12-01 14:21:43 +00:00
google-labs-jules[bot] 2742dba7fa feat: Add meta descriptions to pages
Adds a meta description tag to the landing, crops, plantings, harvests, seeds, and comments pages.

Also creates a new index page for comments.
2025-12-01 13:54:54 +00:00
Daniel O'Connor 8fbc02caf3 Timeline 2025-09-07 05:20:35 +00:00
Daniel O'Connor d7e28e79fe Improve menu again 2025-08-29 16:22:55 +00:00
Daniel O'Connor 5c86622823 Partially improve menu on mobile 2025-08-29 12:51:32 +00:00
Daniel O'Connor f23289ec6e Improve header, footer 2024-04-07 12:31:07 +00:00
Daniel O'Connor 7d63234841 Upgrade to bootstrap 5 (#3605)
* Upgrade boostrap

* Remove deprecated bootstrap toggles

* Migrate other details

* Avoid accidentally including bootstrap twice

* Avoid accidentally including bootstrap twice

* Avoid accidentally including bootstrap twice

* Fix spec

* Fix spec, where the size of the screen has gone to a partial breakpoint/you can't click on your own name in tablet view

* Fix spec

* Cleanup

* Cleanup
2024-03-10 11:49:22 +10:30
Daniel O'Connor 5be0153c74 Activities (#3646)
* Implement activities

* Add activities to timeline

* Add factory

* Add coverage

* Fix misc issues

* Activities display

* Add activities to garden and plantings

* Add activities to garden and plantings

* Add planting

* Add to planting, harvest show

* More CRUD

* More CRUD

* index

* index

* Extract card view

* Permissions

* Add edit

* Remove workaround fro vs code

* Fix title

* CSV

* CSV

* Add RSS, ical

* Extend ical slightly

* Cleanup

* Rubocop

* Remove doubled form

* Change icon

* Fix short description

* Add menus

* Put homepage widget in

* Add activity icon - MIT licenced - https://www.svgrepo.com/svg/336823/plan

* Naming

* Missing files

* Revert VS Code lag induced change

* Update app/views/home/_harvests.html.haml

* Update activities_controller.rb

* Update activities_controller.rb

* Update app/controllers/activities_controller.rb

* Update index.html.haml

* Apply suggestions from code review

* Apply suggestions from code review

* Typo

* Translation

* Apply suggestions from code review

* Update app/views/plantings/index.ics.erb

* Update app/models/activity.rb

* Update plantings_spec.rb

* Update plantings_spec.rb

* We are now rendering an extra event, so check the next one for the old behaviour
2024-03-10 11:36:24 +10:30
Daniel O'Connor 12ff09ad51 Add Accessibility assertions to rspec, replacing accessbility-lint + fixes (#3573)
* Add dep

* Add tests around accessibility

* Add examples in a few places

* Try to fix screenshots

* Remove redundant role

* Adjust rules, colors, etc so tests pass

* Update app/assets/stylesheets/overrides.scss

* Wrap in label

* Omit rule, which is failing with a false positive

* Update index.haml

* Update _blurb.html.haml
2024-01-22 22:09:27 +10:30
Daniel O'Connor 8ee4b5f1aa Update _menu.haml
Fix accessibility issue
2024-01-19 19:22:37 +10:30
Daniel O'Connor 5cc6135b2d Mark breadcrumbs as a nav 2024-01-17 21:13:41 +00:00
Daniel O'Connor 6e23aff347 Add main landmark to document 2024-01-17 21:11:43 +00:00
Daniel O'Connor 78eaf0b4c9 Address minor accessibility issues: Image elements do not have [alt] attributes (#3561)
* Add alt tags

* Update app/views/members/_tiny.haml

* Update app/views/home/_plantings.html.haml

* Use crop_name as this is a searchkick record
2024-01-17 22:02:09 +10:30
Daniel O'Connor fa6aa1a9fb Update app/views/layouts/_menu.haml 2024-01-17 20:16:49 +10:30
Daniel O'Connor 9276ade62f Update _menu.haml 2024-01-17 19:58:40 +10:30
Daniel O'Connor 87ec6d6c6d Link fully to the asset version 2022-12-10 15:13:42 +10:30
Daniel O'Connor e23a274ce7 Revert "Accessibility: Nav bar’s icon links" 2021-10-05 21:32:33 +10:30
LeJun afbde883d7 Created alt text
Missing alt text for nav bar icons
2021-08-06 19:18:21 +02:00
Brenda 3ab67786e0 Wrapping the whole layout, to center the page 2020-02-20 22:39:12 +13:00