Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New search #245

Merged
merged 84 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
f90c7e7
Make facility filters collapsible
DanielJackson-Oslo Sep 25, 2024
36d12d3
Merge pull request #244 from lnu-norge/collapsible-filters
DanielJackson-Oslo Sep 25, 2024
a9b2b12
Add pagination
DanielJackson-Oslo Sep 25, 2024
42672c7
Remove unused controller
DanielJackson-Oslo Sep 25, 2024
126be0d
Make sure nested filter boxes always are open, after user test
DanielJackson-Oslo Sep 25, 2024
0dacbd8
Merge pull request #246 from lnu-norge/pagination
DanielJackson-Oslo Sep 25, 2024
9536636
Add a score column to space facility, so we don't have to calculate i…
DanielJackson-Oslo Sep 25, 2024
86f80f5
Include data for filter list in query
DanielJackson-Oslo Sep 26, 2024
081e3be
Make contact status counts into columns, to make search faster
DanielJackson-Oslo Sep 26, 2024
a7a4c54
Fix broken tests
DanielJackson-Oslo Sep 26, 2024
072d3ea
Merge pull request #247 from lnu-norge/rethinking-filtering-by-facility
DanielJackson-Oslo Sep 26, 2024
a732f4e
Add some more spacing
DanielJackson-Oslo Sep 26, 2024
20418be
Rerun search when moving map, with a debounce
DanielJackson-Oslo Sep 26, 2024
b6f05f5
Disable rotation and pitching.
DanielJackson-Oslo Sep 26, 2024
da3af14
Fix heroku rate limits on memory usage?
DanielJackson-Oslo Sep 26, 2024
ebd3b96
Reduce memory load even further for Heroku...
DanielJackson-Oslo Sep 26, 2024
566fdcb
Add "Add to list" on space#show too
DanielJackson-Oslo Sep 26, 2024
4f2595b
Refactor form fields
DanielJackson-Oslo Sep 26, 2024
c1ef9a8
Add PostGIS
DanielJackson-Oslo Sep 27, 2024
ee7cb6f
Add geo points to spaces, so we can use PostGIS for them
DanielJackson-Oslo Sep 27, 2024
0ce7432
Add a vector based showing of all spaces on map
DanielJackson-Oslo Sep 27, 2024
e5c53d8
Refactor list status partial a little
DanielJackson-Oslo Sep 27, 2024
c0f6b5e
Only show vector data that matches the filters
DanielJackson-Oslo Sep 27, 2024
a03d5b2
Fix so we can filter by facilities and space types
DanielJackson-Oslo Sep 27, 2024
9d7df88
Fix so we can filter by facilities and space types
DanielJackson-Oslo Sep 27, 2024
450ae0d
Make it possible to filter on the vector map
DanielJackson-Oslo Sep 27, 2024
bab2b71
Finally fix so we can use includes_data_for_filter_list, though it st…
DanielJackson-Oslo Sep 27, 2024
895837b
Fix github postgis
DanielJackson-Oslo Sep 27, 2024
2a563ee
Attempt fixing postgis on Heroku
DanielJackson-Oslo Sep 27, 2024
c719611
Update postgis definition
DanielJackson-Oslo Sep 30, 2024
a2ac79d
Attempt fixing postgis on Heroku, trying to check in db config
DanielJackson-Oslo Sep 30, 2024
91efde2
Clear vector tile cache when space updates lat/lon
DanielJackson-Oslo Sep 30, 2024
5bbce3a
Only update the vector layer if something other than location has cha…
DanielJackson-Oslo Sep 30, 2024
bf9ca2e
Set postgres password for github CI
DanielJackson-Oslo Sep 30, 2024
9fb4bb2
Merge pull request #248 from lnu-norge/rethinking-area-search
DanielJackson-Oslo Sep 30, 2024
4dd87f3
Add geographical area models
DanielJackson-Oslo Sep 30, 2024
898d355
Import fylker and kommuner from geo norge
DanielJackson-Oslo Sep 30, 2024
fa320b9
Add fylker and kommuner to spaces
DanielJackson-Oslo Sep 30, 2024
f260b43
Add inflection for fylke and kommune
DanielJackson-Oslo Sep 30, 2024
9f499ed
Add kommuner and fylker relation, and start using it in filter_on_loc…
DanielJackson-Oslo Sep 30, 2024
a69f7fb
WIP check boxes for filtering on kommuner and fylker - doesn't auto o…
DanielJackson-Oslo Sep 30, 2024
b1f035c
Filter by fylker or kommuner, move map to show the new selection, an…
DanielJackson-Oslo Oct 1, 2024
1ceb2e5
Add toggle for filter while map is moving
DanielJackson-Oslo Oct 1, 2024
d8ad2e8
Open and close filters when loading them
DanielJackson-Oslo Oct 1, 2024
471ba4e
testing someting for heroku
DanielJackson-Oslo Oct 1, 2024
d2e31ef
Fixing for Heroku
DanielJackson-Oslo Oct 1, 2024
9ffce45
Nested checkboxes for areas
DanielJackson-Oslo Oct 1, 2024
f8f6764
Disable caching of vector tiles until I understand how they work
DanielJackson-Oslo Oct 1, 2024
a05a264
Make sure filters are stored in session again
DanielJackson-Oslo Oct 1, 2024
dd49a21
Make sure markers are cleared before new ones are added
DanielJackson-Oslo Oct 1, 2024
fd96e09
Make sure we default to remembering logins, and remember them both fo…
DanielJackson-Oslo Oct 1, 2024
f54674f
Merge pull request #249 from lnu-norge/new-area-filtering
DanielJackson-Oslo Oct 1, 2024
e8cbe78
Only show spaces if they have at least one positive facility
DanielJackson-Oslo Oct 1, 2024
66f28ab
Merge pull request #250 from lnu-norge/experiment-with-filtering
DanielJackson-Oslo Oct 1, 2024
e6ecbb7
Clean up top of listing, no need for pagination there too
DanielJackson-Oslo Oct 1, 2024
b238a2b
Add descriptive text for how the filtering is done
DanielJackson-Oslo Oct 1, 2024
5f71c32
Allowing adding and removing from list from map marker
DanielJackson-Oslo Oct 1, 2024
c8c4638
Smaller hearts in map
DanielJackson-Oslo Oct 1, 2024
3b97182
Wording on legg i liste
DanielJackson-Oslo Oct 1, 2024
f349992
Småfiks
DanielJackson-Oslo Oct 2, 2024
52f4045
Much preettier space listing, from refactoring UI reading
DanielJackson-Oslo Oct 2, 2024
e6e1727
Prettify
DanielJackson-Oslo Oct 2, 2024
d0dfbe5
Prettify
DanielJackson-Oslo Oct 2, 2024
e7824d5
Prettify
DanielJackson-Oslo Oct 2, 2024
c89b001
Merge pull request #251 from lnu-norge/experiments-in-ui
DanielJackson-Oslo Oct 2, 2024
8429b66
Merge pull request #252 from lnu-norge/experiment-with-filtering
DanielJackson-Oslo Oct 2, 2024
2caab5a
Språk
DanielJackson-Oslo Oct 4, 2024
d68cc2e
Disable cache tests, as we no longer cache
DanielJackson-Oslo Oct 7, 2024
cc961d1
Fix flaky test
DanielJackson-Oslo Oct 7, 2024
7bb0901
Nicer styling on mobile for space listing heading
DanielJackson-Oslo Oct 7, 2024
187e3c5
Make zooming work again on mobile
DanielJackson-Oslo Oct 7, 2024
284add0
Style menu to be more harmonic on mobile
DanielJackson-Oslo Oct 7, 2024
2321bd9
Fix broken test after rubocop shenanigans.
DanielJackson-Oslo Oct 7, 2024
c7d8077
Fix missing alt text for map
DanielJackson-Oslo Oct 7, 2024
2285d1b
Remove bad contrast and confusing image missing marker.
DanielJackson-Oslo Oct 7, 2024
1bee12e
Fix loading state for map too, and make all animations a11y friendlier
DanielJackson-Oslo Oct 8, 2024
86961af
Fix bad language in readme
DanielJackson-Oslo Oct 8, 2024
f8007b9
Refactor very long filterable_spaces concern
DanielJackson-Oslo Oct 8, 2024
e154e1d
Refactor permitted filters to be more self explanatory
DanielJackson-Oslo Oct 8, 2024
ad6dd89
Remove commented out vector tile cache code, as we don't use them and…
DanielJackson-Oslo Oct 8, 2024
7130737
Use Kommune and Fylke to allow destroying geographical areas when imp…
DanielJackson-Oslo Oct 8, 2024
097c864
Allow Oslo to be blank
DanielJackson-Oslo Oct 8, 2024
63c26f7
Fix stranded div
DanielJackson-Oslo Oct 8, 2024
b37b093
Add a search button to name search for a11y, and highlight searched t…
DanielJackson-Oslo Oct 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
# https://github.com/actions/example-services/tree/master/.github/workflows
services:
postgres:
image: postgres:10.8
image: postgis/postgis:16-3.4
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ""
POSTGRES_PASSWORD: "password"
POSTGRES_DB: postgres
ports:
- 5432:5432
Expand All @@ -36,6 +36,7 @@ jobs:
GEMFILE_RUBY_VERSION: 3.3.0
PGHOST: localhost
PGUSER: postgres
PGPASSWORD: "password"
# Rails verifies the time zone in DB is the same as the time zone of the Rails app
TZ: "Europe/Warsaw"
MAPBOX_API_KEY: pk.eyJ1IjoibWF0aGlhczIzNCIsImEiOiJja3U1N2o0MGoybGl5MnVxaDcyaHdjZDFpIn0.S-c3HtdhqhyAR6izLxY-iQ
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,8 @@ yarn-debug.log*

# Ignores local .env file
.env

/webdrivers

/config/database.yml

# Yarn, from https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
.yarn/*
!.yarn/cache
Expand Down
8 changes: 5 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,28 @@ gem "omniauth-google-oauth2"
gem "omniauth-rails_csrf_protection"

gem "activerecord-import"
gem "activerecord-postgis-adapter" # For PostGIS and Geo commands in Active record
gem "addressable"
gem "cssbundling-rails", "~> 1.3"
gem "diffy"
gem "gravtastic"
gem "high_voltage"
gem "http"
gem "inline_svg"
gem "jsbundling-rails", "~> 1.2"
gem "kaminari"
gem "pagy", "~> 9.0"
gem "paper_trail"
gem "phonelib"
gem "rails-i18n"
gem "rgeo-geojson" # For parsing geo json when importing from Geo Norge
gem "simple_form"
gem "simple_form-tailwind"
gem "stimulus-rails"
gem "tailwindcss-rails-webpacker"
gem "turbo-rails"
gem "validate_url"

gem "cssbundling-rails", "~> 1.3"
gem "jsbundling-rails", "~> 1.2"

group :production do
gem "aws-sdk-s3"
gem "newrelic_rpm"
Expand Down
14 changes: 14 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ GEM
timeout (>= 0.4.0)
activerecord-import (1.5.1)
activerecord (>= 4.2)
activerecord-postgis-adapter (9.0.2)
activerecord (~> 7.1.0)
rgeo-activerecord (~> 7.0.0)
activestorage (7.1.3)
actionpack (= 7.1.3)
activejob (= 7.1.3)
Expand Down Expand Up @@ -310,6 +313,7 @@ GEM
childprocess (>= 0.6.3, < 6)
iniparse (~> 1.4)
rexml (~> 3.2)
pagy (9.0.9)
paper_trail (15.1.0)
activerecord (>= 6.1)
request_store (~> 1.4)
Expand Down Expand Up @@ -406,6 +410,13 @@ GEM
actionpack (>= 5.2)
railties (>= 5.2)
rexml (3.2.6)
rgeo (3.0.1)
rgeo-activerecord (7.0.1)
activerecord (>= 5.0)
rgeo (>= 1.0.0)
rgeo-geojson (2.2.0)
multi_json (~> 1.15)
rgeo (>= 1.0.0)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
Expand Down Expand Up @@ -539,6 +550,7 @@ PLATFORMS

DEPENDENCIES
activerecord-import
activerecord-postgis-adapter
addressable
annotate
aws-sdk-s3
Expand Down Expand Up @@ -571,6 +583,7 @@ DEPENDENCIES
omniauth-google-oauth2
omniauth-rails_csrf_protection
overcommit
pagy (~> 9.0)
paper_trail
parallel_tests
pg (~> 1.1)
Expand All @@ -583,6 +596,7 @@ DEPENDENCIES
rails-i18n
rails_real_favicon
redis (~> 5.0)
rgeo-geojson
rspec-benchmark
rspec-rails
rubocop
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ Run `rails db:seed` to get sample data into your app.

You can also set the ENV variable ["SEED_FILE"](https://github.com/lnu-norge/lokaler.lnu.no/pull/66) to load a different seed file than the current environment dictates. Useful for deploying tests on Heroku, as Heroku always wants you to run in production mode - but you might want to seed with development data.

To get geographical data for Fylker and Kommuner, run: `rails geo:import_geographical_areas_from_geonorge`. This will hit the APIs of GeoNorge and create or update any fylker and kommuner, as well as make sure all Spaces are matched with a Fylke and a Kommune.

## Sendgrid setup

You need to set the right sendgrid environment variables, and to get sendgrid to work you will also need to set the ENV variable ["HOST"] to equal to the domain you are using, example: `ENV["HOST"] = "app.herokuapp.com`
Expand Down
1 change: 1 addition & 0 deletions app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@
@import "./space_index.css";
@import "./space_table.css";
@import "./star_picker.css";
@import "./pagy.css";
@import "./tom_select.css";
2 changes: 1 addition & 1 deletion app/assets/stylesheets/autosave-while-typing.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
display: block;
content: "Lagrer...";
opacity: 0;
@apply text-gray-500 animate-pulse;
@apply text-gray-500 motion-safe:animate-pulse;
}
}

Expand Down
Loading
Loading