Compare commits

...

44 Commits

Author SHA1 Message Date
Daniel O'Connor
9b5d44d8de Merge branch 'dev' into no-js 2025-12-13 12:59:11 +10:30
Daniel O'Connor
a77b601327 Merge pull request #4381 from Growstuff/update-crop-page-titles
Update Crop Page Titles
2025-12-13 12:58:14 +10:30
Daniel O'Connor
b70168e3a1 Merge pull request #4395 from Growstuff/relax-interesting-criteria
Relax the criteria as photos are uploaded less often
2025-12-13 12:58:03 +10:30
Daniel O'Connor
d279f9bb64 Merge branch 'dev' into update-crop-page-titles 2025-12-13 12:48:34 +10:30
Daniel O'Connor
83f7ff7c3f Update app/views/crops/show.html.haml 2025-12-13 12:48:14 +10:30
Daniel O'Connor
ae639b6e74 Adjust expectation 2025-12-13 02:12:20 +00:00
Daniel O'Connor
d0ca944899 Relax the criteria as photos are uploaded less often 2025-12-13 01:15:02 +00:00
Daniel O'Connor
1edd4163e1 Merge pull request #4394 from Growstuff/dependabot/bundler/haml-7.1.0
Bump haml from 7.0.2 to 7.1.0
2025-12-13 11:28:58 +10:30
dependabot[bot]
9c03e85882 Bump haml from 7.0.2 to 7.1.0
Bumps [haml](https://github.com/haml/haml) from 7.0.2 to 7.1.0.
- [Release notes](https://github.com/haml/haml/releases)
- [Changelog](https://github.com/haml/haml/blob/main/CHANGELOG.md)
- [Commits](https://github.com/haml/haml/compare/v7.0.2...v7.1.0)

---
updated-dependencies:
- dependency-name: haml
  dependency-version: 7.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-12 07:02:42 +00:00
Daniel O'Connor
a303fd6b77 Merge pull request #4391 from Growstuff/pin-dep
Pin dep
2025-12-09 08:21:06 +10:30
Daniel O'Connor
21fea20c7e Bump 2025-12-08 21:50:37 +00:00
Daniel O'Connor
5049b6fd3b Pin 2025-12-08 21:49:38 +00:00
Daniel O'Connor
4bb8749948 Merge pull request #4390 from Growstuff/revert-4386-dependabot/bundler/friendly_id-5.6.0
Revert "Bump friendly_id from 5.5.1 to 5.6.0"
2025-12-09 08:15:22 +10:30
Daniel O'Connor
58548de1bd Revert "Bump friendly_id from 5.5.1 to 5.6.0" 2025-12-09 08:15:08 +10:30
Daniel O'Connor
673a96aaa0 Merge pull request #4389 from Growstuff/revert-4384-dependabot/bundler/dotenv-rails-3.2.0
Revert "Bump dotenv-rails from 3.1.8 to 3.2.0"
2025-12-09 08:11:55 +10:30
Daniel O'Connor
1bc3217be6 Revert "Bump dotenv-rails from 3.1.8 to 3.2.0" 2025-12-09 08:11:40 +10:30
Daniel O'Connor
c2a94c9068 Merge pull request #4382 from Growstuff/dependabot/bundler/faker-3.5.3
Bump faker from 3.5.2 to 3.5.3
2025-12-09 00:30:01 +10:30
Daniel O'Connor
70d3856914 Merge pull request #4388 from Growstuff/dependabot/bundler/oj-3.16.13
Bump oj from 3.16.12 to 3.16.13
2025-12-09 00:29:38 +10:30
dependabot[bot]
e6487e639c Bump oj from 3.16.12 to 3.16.13
Bumps [oj](https://github.com/ohler55/oj) from 3.16.12 to 3.16.13.
- [Release notes](https://github.com/ohler55/oj/releases)
- [Changelog](https://github.com/ohler55/oj/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/ohler55/oj/compare/v3.16.12...v3.16.13)

---
updated-dependencies:
- dependency-name: oj
  dependency-version: 3.16.13
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-08 10:11:56 +00:00
dependabot[bot]
8d7cc71503 Bump faker from 3.5.2 to 3.5.3
Bumps [faker](https://github.com/faker-ruby/faker) from 3.5.2 to 3.5.3.
- [Release notes](https://github.com/faker-ruby/faker/releases)
- [Changelog](https://github.com/faker-ruby/faker/blob/main/CHANGELOG.md)
- [Commits](https://github.com/faker-ruby/faker/compare/v3.5.2...v3.5.3)

---
updated-dependencies:
- dependency-name: faker
  dependency-version: 3.5.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-08 10:11:43 +00:00
Daniel O'Connor
773cbd06bf Merge pull request #4385 from Growstuff/dependabot/bundler/scout_apm-6.0.0
Bump scout_apm from 5.8.0 to 6.0.0
2025-12-08 20:41:16 +10:30
Daniel O'Connor
3d7d6d9e73 Merge pull request #4384 from Growstuff/dependabot/bundler/dotenv-rails-3.2.0
Bump dotenv-rails from 3.1.8 to 3.2.0
2025-12-08 20:41:05 +10:30
Daniel O'Connor
c7b98720e9 Merge pull request #4387 from Growstuff/dependabot/bundler/selenium-webdriver-4.39.0
Bump selenium-webdriver from 4.38.0 to 4.39.0
2025-12-08 20:40:49 +10:30
Daniel O'Connor
3ddef1b2e5 Bump friendly_id from 5.5.1 to 5.6.0 (#4386)
Bumps [friendly_id](https://github.com/norman/friendly_id) from 5.5.1 to 5.6.0.
- [Changelog](https://github.com/norman/friendly_id/blob/master/Changelog.md)
- [Commits](https://github.com/norman/friendly_id/compare/5.5.1...v5.6.0)

---
updated-dependencies:
- dependency-name: friendly_id
  dependency-version: 5.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-08 20:40:25 +10:30
dependabot[bot]
78d665391e Bump selenium-webdriver from 4.38.0 to 4.39.0
Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium) from 4.38.0 to 4.39.0.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
- [Changelog](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES)
- [Commits](https://github.com/SeleniumHQ/selenium/compare/selenium-4.38.0...selenium-4.39.0)

---
updated-dependencies:
- dependency-name: selenium-webdriver
  dependency-version: 4.39.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-08 07:02:25 +00:00
dependabot[bot]
cf12b910d5 Bump friendly_id from 5.5.1 to 5.6.0
Bumps [friendly_id](https://github.com/norman/friendly_id) from 5.5.1 to 5.6.0.
- [Changelog](https://github.com/norman/friendly_id/blob/master/Changelog.md)
- [Commits](https://github.com/norman/friendly_id/compare/5.5.1...v5.6.0)

---
updated-dependencies:
- dependency-name: friendly_id
  dependency-version: 5.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-08 07:01:36 +00:00
dependabot[bot]
400139bb6a Bump scout_apm from 5.8.0 to 6.0.0
Bumps [scout_apm](https://github.com/scoutapp/scout_apm_ruby) from 5.8.0 to 6.0.0.
- [Changelog](https://github.com/scoutapp/scout_apm_ruby/blob/master/CHANGELOG.markdown)
- [Commits](https://github.com/scoutapp/scout_apm_ruby/compare/v5.8.0...v6.0.0)

---
updated-dependencies:
- dependency-name: scout_apm
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-05 07:04:41 +00:00
dependabot[bot]
ceb4986542 Bump dotenv-rails from 3.1.8 to 3.2.0
Bumps [dotenv-rails](https://github.com/bkeepers/dotenv) from 3.1.8 to 3.2.0.
- [Release notes](https://github.com/bkeepers/dotenv/releases)
- [Changelog](https://github.com/bkeepers/dotenv/blob/main/Changelog.md)
- [Commits](https://github.com/bkeepers/dotenv/compare/v3.1.8...v3.2.0)

---
updated-dependencies:
- dependency-name: dotenv-rails
  dependency-version: 3.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-04 07:02:24 +00: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
google-labs-jules[bot]
62951dc5d6 feat: Update crop page titles
- Include the correct English title case
- Include the scientific name if available
- Clearly indicate the crop page is a growing guide and open data repository.
2025-12-02 13:37:45 +00:00
Daniel O'Connor
758ba9eb50 Merge branch 'less-js2' into no-js 2025-09-01 14:29:30 +00:00
Daniel O'Connor
fd3680c37c Add missed commit 2025-08-10 03:54:16 +00:00
Daniel O'Connor
7c56925fef Garden spec doesn't need JS execution 2025-08-10 03:44:19 +00:00
Daniel O'Connor
7ec8c0bb50 Adding Garden spec doesn't need JS execution 2025-08-10 03:43:26 +00:00
Daniel O'Connor
804e347be2 Conservations spec doesn't need JS execution 2025-08-10 03:42:33 +00:00
Daniel O'Connor
0724499105 Profile spec doesn't need JS execution 2025-08-10 03:35:14 +00:00
Daniel O'Connor
5783a76f15 Follows spec doesn't need JS execution 2025-08-10 03:34:08 +00:00
Daniel O'Connor
668925964e Prediction spec doesn't need JS execution 2025-08-10 03:31:37 +00:00
Daniel O'Connor
81af9508c2 Timeline spec doesn't need JS execution 2025-08-10 03:30:02 +00:00
Daniel O'Connor
6e30aca017 Footer spec doesn't need JS execution 2025-08-10 03:29:05 +00:00
Daniel O'Connor
690c74b3a5 Locale spec doesn't need JS execution 2025-08-10 03:27:23 +00:00
Daniel O'Connor
4700c8ff62 Planting Reminders spec doesn't need JS execution 2025-08-10 03:26:47 +00:00
Daniel O'Connor
b42cb14e1b Sign up spec doesn't need JS execution 2025-08-10 03:25:51 +00:00
Daniel O'Connor
f0e722050c Sign in spec doesn't need JS execution 2025-08-10 03:24:33 +00:00
24 changed files with 936 additions and 34 deletions

View File

@@ -136,6 +136,11 @@ gem "gbifrb"
gem "msgpack"
# Pinned due to RAILS_ENV=production bundle exec rake assets:precompile failing with ArgumentError: wrong number of arguments (given 1, expected 0) (ArgumentError)
# /tmp/build_8301a541/vendor/bundle/ruby/3.3.0/gems/connection_pool-3.0.2/lib/connection_pool.rb:48:in `initialize'
# /tmp/build_8301a541/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.3/lib/active_support/cache/mem_cache_store.rb:63:in `new'
gem "connection_pool", "< 3"
group :production do
gem 'bonsai-elasticsearch-rails' # Integration with Bonsa-Elasticsearch on heroku
gem 'dalli'

View File

@@ -254,9 +254,9 @@ GEM
discard (1.4.0)
activerecord (>= 4.2, < 9.0)
domain_name (0.6.20240107)
dotenv (3.1.8)
dotenv-rails (3.1.8)
dotenv (= 3.1.8)
dotenv (3.2.0)
dotenv-rails (3.2.0)
dotenv (= 3.2.0)
railties (>= 6.1)
drb (2.2.3)
dumb_delegator (1.1.0)
@@ -284,7 +284,7 @@ GEM
factory_bot_rails (6.5.1)
factory_bot (~> 6.5)
railties (>= 6.1.0)
faker (3.5.2)
faker (3.5.3)
i18n (>= 1.8.11, < 2)
faraday (2.14.0)
faraday-net_http (>= 2.0, < 3.5)
@@ -296,7 +296,7 @@ GEM
flickraw (0.9.10)
font-awesome-sass (5.15.1)
sassc (>= 1.11)
friendly_id (5.5.1)
friendly_id (5.6.0)
activerecord (>= 4.0.0)
gbifrb (0.2.0)
geocoder (1.8.6)
@@ -312,7 +312,7 @@ GEM
gravatar-ultimate (2.0.0)
activesupport (>= 2.3.14)
rack
haml (7.0.2)
haml (7.1.0)
temple (>= 0.8.2)
thor
tilt
@@ -462,7 +462,7 @@ GEM
nokogiri (1.18.10-x86_64-linux-gnu)
racc (~> 1.4)
oauth (0.5.6)
oj (3.16.12)
oj (3.16.13)
bigdecimal (>= 3.0)
ostruct (>= 0.2)
omniauth (1.9.2)
@@ -571,7 +571,7 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rdoc (6.16.1)
rdoc (6.17.0)
erb
psych (>= 4.0.0)
tsort
@@ -675,7 +675,7 @@ GEM
ruby-units (4.1.0)
ruby-vips (2.2.1)
ffi (~> 1.12)
rubyzip (3.2.1)
rubyzip (3.2.2)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
@@ -689,13 +689,13 @@ GEM
sprockets (> 3.0)
sprockets-rails
tilt
scout_apm (5.8.0)
scout_apm (6.0.0)
parser
searchkick (5.3.1)
activemodel (>= 6.1)
hashie
securerandom (0.4.1)
selenium-webdriver (4.38.0)
selenium-webdriver (4.39.0)
base64 (~> 0.2)
logger (~> 1.4)
rexml (~> 3.2, >= 3.2.5)
@@ -719,7 +719,7 @@ GEM
activesupport (>= 5.2)
sprockets (>= 3.0.0)
ssrf_filter (1.1.2)
stringio (3.1.8)
stringio (3.1.9)
sysexits (1.2.0)
temple (0.10.4)
terminal-table (4.0.0)
@@ -730,7 +730,7 @@ GEM
thread_safe (0.3.6)
tilt (2.6.1)
timecop (0.9.10)
timeout (0.4.4)
timeout (0.5.0)
tsort (0.2.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
@@ -800,6 +800,7 @@ DEPENDENCIES
chartkick
coffee-rails
comfortable_mexican_sofa!
connection_pool (< 3)
crowdin-cli
csv_shaper
dalli

View File

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 266 KiB

View File

@@ -33,4 +33,4 @@
@view-transition {
navigation: auto;
}
}

View File

@@ -10,4 +10,6 @@ class HomeController < ApplicationController
# the relevant class methods directly in the view, so that fragment
# caching will be effective.
end
def community_gardens; end
end

View File

@@ -53,7 +53,9 @@ module SearchHarvests
owners = []
1..limit.times do
where = {
photos_count: { gt: 0 },
# Disabled for now so that more relevant harvests are
# surfaced; even if we're falling back to crop photos.
# photos_count: { gt: 0 },
owner_id: { not: owners }
}
one_record = search('*',

View File

@@ -66,7 +66,9 @@ module SearchPlantings
owners = []
1..limit.times do
where = {
photos_count: { gt: 0 },
# Disabled for now so that more relevant plantings are
# surfaced; even if we're falling back to crop photos.
# photos_count: { gt: 0 },
owner_id: { not: owners }
}
one_record = search('*',

View File

@@ -1,5 +1,8 @@
= render 'schema_org', crop: @crop
- content_for :title, @crop.name
- content_for :title do
= @crop.name.titleize
- if @crop.default_scientific_name.present?
= " (#{@crop.default_scientific_name})"
- content_for :meta_description do
- if @crop.description.present?
= @crop.description

View File

@@ -0,0 +1,37 @@
- content_for :title do
= t('community_gardens.title')
- content_for :meta_description do
= t('community_gardens.meta_description')
.container.mt-5
.row
.col-lg-6.col-sm-12
.row
%h1.display-4= t('community_gardens.header')
%p.lead= t('community_gardens.lead')
.row
%h2= t('community_gardens.features_title')
%ul
%li Track all your plantings and harvests
%li Keep notes your community's progress
%li Add collaborators to your garden plots
%li See what other community gardens are growing
%li Get advice and support from our community of gardeners
.row
%h2= t('community_gardens.get_started')
%p= t('community_gardens.get_started_text')
%p
= link_to t('.sign_up'), new_member_registration_path, class: 'btn btn-success btn-lg'
.row
%h2= t('community_gardens.collaborate')
%p= t('community_gardens.collaborate_text')
%p
= link_to t('community_gardens.learn_more'), gardens_path, class: 'btn btn-info btn-lg'
.col-lg-6.d-lg-block.d-xs-none
.container
=image_tag("girlwithvegetables-0038331hotifw.svg", width: "100%")

View File

@@ -52,6 +52,7 @@
.dropdown-menu{"aria-labelledby" => "navbarDropdown"}
= link_to t('.community_map'), places_path, class: 'dropdown-item'
= link_to t('.browse_members'), members_path, class: 'dropdown-item'
= link_to t('.community_gardens'), community_gardens_path, class: 'dropdown-item'
= link_to t('.posts'), posts_path, class: 'dropdown-item'
= link_to t('.forums'), forums_path, class: 'dropdown-item'

View File

@@ -219,6 +219,18 @@ en:
pwa_ios_steps_html: 1. Tap the <strong>Share</strong> button in Safari.<br>2. Scroll down and tap <strong>Add to Home Screen</strong>'.
pwa_ios_title: For iOS (iPhone/iPad)
pwa_title: Want to install Growstuff on your phone?
community_gardens:
title: Community Gardens on Growstuff
meta_description: Manage your community garden, track your plantings, and collaborate with other gardeners.
header: Community Gardens
lead: Growstuff is open source and the perfect place to manage your community garden. Track your plantings, celebrate your harvests, and collaborate with your fellow gardeners, all in one place.
get_started: Get Started Today
get_started_text: Signing up for Growstuff is free and easy. Create an account to start tracking your garden today.
sign_up: Sign up for free
collaborate: Collaborate with Your Team
collaborate_text: Invite other gardeners to collaborate on your garden plots. Share the work, share the harvest, and grow together as a community.
learn_more: Learn more about gardens
features_title: Features for Community Gardens
label:
days_until_harvest: "%{number} days"
weeks_until_harvest: "%{number} weeks until harvest"
@@ -235,6 +247,7 @@ en:
browse_members: Browse Members
community: Community
community_map: Community Map
community_gardens: Community Gardens
garden_type: Garden Type
garden_types: Garden Types
crop_wrangling: Crop Wrangling

View File

@@ -23,6 +23,7 @@ Rails.application.routes.draw do
resources :authentications, only: %i(create destroy)
get "home/index"
get '/community-gardens', to: 'home#community_gardens'
root to: 'home#index'
concern :has_photos do

View File

@@ -2,7 +2,7 @@
require 'rails_helper'
describe "Conversations", :js do
describe "Conversations" do
let(:sender) { create(:member) }
let(:recipient) { create(:member, login_name: 'beyonce') }
@@ -18,7 +18,7 @@ describe "Conversations", :js do
click_link 'Inbox'
end
include_examples 'is accessible'
it_behaves_like 'is accessible'
it { expect(page).to have_content 'something i want to say' }
it { page.percy_snapshot(page, name: 'conversations#index') }

View File

@@ -2,7 +2,7 @@
require 'rails_helper'
describe "Conversations", :js do
describe "Conversations" do
let(:sender) { create(:member) }
let(:recipient) { create(:member, login_name: 'beyonce') }

View File

@@ -3,12 +3,12 @@
require 'rails_helper'
require 'custom_matchers'
describe "Gardens", :js do
describe "Gardens" do
context 'signed in' do
include_context 'signed in member'
before { visit new_garden_path }
include_examples 'is accessible'
it_behaves_like 'is accessible'
it "displays required and optional fields properly" do
expect(page).to have_selector ".required", text: "Name"

View File

@@ -3,7 +3,7 @@
require 'rails_helper'
require 'custom_matchers'
describe "Gardens#index", :js do
describe "Gardens#index" do
context "Logged in as member" do
include_context 'signed in member'
let(:member) { FactoryBot.create(:member, login_name: 'shadow') }
@@ -14,7 +14,7 @@ describe "Gardens#index", :js do
visit member_gardens_path(member_slug: member.slug)
end
include_examples 'is accessible'
it_behaves_like 'is accessible'
it "displays each of the gardens" do
member.gardens.each do |garden|

View File

@@ -2,7 +2,7 @@
require 'rails_helper'
describe "Changing locales", :js do
describe "Changing locales" do
after { I18n.locale = :en }
let(:member) { FactoryBot.create(:member) }

View File

@@ -2,7 +2,7 @@
require 'rails_helper'
describe "follows", :js do
describe "follows" do
context "when signed out" do
let(:member) { create(:member) }

View File

@@ -2,7 +2,7 @@
require 'rails_helper'
describe "member profile", :js do
describe "member profile" do
let(:member) { create(:member) }
let(:other_member) { create(:member) }
let(:admin_member) { create(:admin_member) }

View File

@@ -3,7 +3,7 @@
require 'rails_helper'
require 'capybara/email/rspec'
describe "Planting reminder email", :js do
describe "Planting reminder email" do
let(:member) { create(:member) }
let(:mail) { NotifierMailer.planting_reminder(member) }

View File

@@ -2,7 +2,7 @@
require "rails_helper"
require 'custom_matchers'
describe "Display a planting", :js do
describe "Display a planting" do
describe 'planting perennial' do
let(:garden) { FactoryBot.create(:garden, location: 'Edinburgh') }
let(:crop) { FactoryBot.create(:crop, name: 'feijoa', perennial: true) }

View File

@@ -2,7 +2,7 @@
require 'rails_helper'
describe "timeline", :js do
describe "timeline" do
let(:member) { FactoryBot.create(:member) }
let(:friend1) { FactoryBot.create(:member) }
let(:friend2) { FactoryBot.create(:member) }

View File

@@ -605,7 +605,7 @@ describe Planting do
before { described_class.reindex }
it { expect(subject.count).to eq 2 }
it { expect(subject.map(&:id)).to eq([interesting_planting.id.to_s, finished_interesting_planting.id.to_s]) }
it { expect(subject.count).to eq 3 }
it { expect(subject.map(&:id)).to eq([interesting_planting.id.to_s, finished_interesting_planting.id.to_s, planting.id.to_s]) }
end
end

View File

@@ -33,7 +33,7 @@ if ENV["CAPYBARA_DRIVER"]
Capybara.default_driver = ENV["CAPYBARA_DRIVER"].to_sym
Capybara.javascript_driver = ENV["CAPYBARA_DRIVER"].to_sym
else
Capybara.default_driver = :selenium_chrome_customised_headless
# Capybara.default_driver = :selenium_chrome_customised_headless
Capybara.javascript_driver = :selenium_chrome_customised_headless
end
Capybara.enable_aria_label = true
@@ -50,7 +50,7 @@ Capybara.server_port = 8081
# TODO: Find a better home.
shared_examples 'is accessible' do
it "is accessible" do
it "is accessible", :js do
expect(page).to be_axe_clean.skipping('color-contrast', 'heading-order', 'aria-required-children').according_to :wcag2a
end
end