Commit Graph

20028 Commits

Author SHA1 Message Date
Javi Martín
2f59fde4e2 Merge pull request #5444 from consuldemocracy/dependabot/bundler/exiftool_vendored-12.80.0
Bump exiftool_vendored from 12.60.0 to 12.80.0
2024-03-23 21:59:58 +01:00
dependabot[bot]
594dcbd367 Bump delayed_job_active_record from 4.1.7 to 4.1.8
Bumps [delayed_job_active_record](https://github.com/collectiveidea/delayed_job_active_record) from 4.1.7 to 4.1.8.
- [Commits](https://github.com/collectiveidea/delayed_job_active_record/compare/v4.1.7...v4.1.8)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-23 03:31:17 +00:00
Javi Martín
d790ed89c7 Merge pull request #5298 from consuldemocracy/dependabot/bundler/acts-as-taggable-on-10.0.0
Bump acts-as-taggable-on from 9.0.1 to 10.0.0
2024-03-23 03:53:30 +01:00
Javi Martín
65e14fd23f Add initializer included in acts-as-taggable-on 10.0.0
Similar to what we do with other gems, we add the commented code.
2024-03-23 03:38:13 +01:00
dependabot[bot]
7f725b9eee Bump acts-as-taggable-on from 9.0.1 to 10.0.0
Bumps [acts-as-taggable-on](https://github.com/mbleigh/acts-as-taggable-on) from 9.0.1 to 10.0.0.
- [Release notes](https://github.com/mbleigh/acts-as-taggable-on/releases)
- [Changelog](https://github.com/mbleigh/acts-as-taggable-on/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mbleigh/acts-as-taggable-on/compare/v9.0.1...v10.0.0)

---
updated-dependencies:
- dependency-name: acts-as-taggable-on
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-23 03:38:13 +01:00
Javi Martín
534f7b6b40 Merge pull request #5307 from consuldemocracy/dependabot/bundler/pronto-0.11.2
Bump pronto from 0.11.1 to 0.11.2
2024-03-23 03:37:03 +01:00
dependabot[bot]
0b30b6a86b Bump pronto from 0.11.1 to 0.11.2
Note we aren't bumping the rugged gem (which Dependabot automatically
did) because it causes Pronto to stop working with GitHub Actions.

Bumps [pronto](https://github.com/prontolabs/pronto) from 0.11.1 to 0.11.2.
- [Release notes](https://github.com/prontolabs/pronto/releases)
- [Changelog](https://github.com/prontolabs/pronto/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prontolabs/pronto/compare/v0.11.1...v0.11.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-23 03:23:50 +01:00
Javi Martín
a5c8a64497 Merge pull request #5436 from consuldemocracy/dependabot/bundler/knapsack_pro-7.0.1
Bump knapsack_pro from 5.7.0 to 7.0.1
2024-03-23 03:22:40 +01:00
dependabot[bot]
070cb31858 Bump knapsack_pro from 5.7.0 to 7.0.1
Bumps [knapsack_pro](https://github.com/KnapsackPro/knapsack_pro-ruby) from 5.7.0 to 7.0.1.
- [Changelog](https://github.com/KnapsackPro/knapsack_pro-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v5.7.0...v7.0.1)

---
updated-dependencies:
- dependency-name: knapsack_pro
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-23 02:01:18 +00:00
Javi Martín
ed813b1291 Merge pull request #5384 from consuldemocracy/dependabot/bundler/rubocop-performance-1.20.2
Bump rubocop-performance from 1.19.1 to 1.20.2
2024-03-23 02:59:08 +01:00
dependabot[bot]
68285aae06 Bump rubocop-performance from 1.19.1 to 1.20.2
Note we're removing the Performance/StringIdentifierArgument rule
because now it also replaces methods in interpolation, and we don't
particularly prefer using `send(:"#{method}_name")` over
`send("#{method}_name)`. We actually use the latter about two thirds of
the time.

We'll add this rule again if it ever offers the option to ignore the
cases where interpolation is used, although it's highly doubtful that'll
ever happen because this rule is meant for (insignificant) performance
gains and not for code clarity.

Bumps [rubocop-performance](https://github.com/rubocop/rubocop-performance) from 1.19.1 to 1.20.2.
- [Release notes](https://github.com/rubocop/rubocop-performance/releases)
- [Changelog](https://github.com/rubocop/rubocop-performance/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-performance/compare/v1.19.1...v1.20.2)

---
updated-dependencies:
- dependency-name: rubocop-performance
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-23 02:43:24 +01:00
Javi Martín
897b5fe872 Merge pull request #5434 from consuldemocracy/dependabot/bundler/rspec-rails-6.1.2
Bump rspec-rails from 5.1.2 to 6.1.2
2024-03-23 02:42:57 +01:00
Javi Martín
5b35226ad0 Merge pull request #5308 from consuldemocracy/dependabot/bundler/globalize-6.3.0
Bump globalize from 6.2.1 to 6.3.0
2024-03-23 02:36:51 +01:00
dependabot[bot]
7473c9edf1 Bump rspec-rails from 5.1.2 to 6.1.2
Bumps [rspec-rails](https://github.com/rspec/rspec-rails) from 5.1.2 to 6.1.2.
- [Changelog](https://github.com/rspec/rspec-rails/blob/main/Changelog.md)
- [Commits](https://github.com/rspec/rspec-rails/compare/v5.1.2...v6.1.2)

---
updated-dependencies:
- dependency-name: rspec-rails
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-23 01:17:56 +00:00
dependabot[bot]
006816c56e Bump globalize from 6.2.1 to 6.3.0
Bumps [globalize](https://github.com/globalize/globalize) from 6.2.1 to 6.3.0.
- [Changelog](https://github.com/globalize/globalize/blob/main/CHANGELOG.md)
- [Commits](https://github.com/globalize/globalize/compare/v6.2.1...v6.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-23 01:17:14 +00:00
Javi Martín
659c834e91 Merge pull request #5296 from consuldemocracy/dependabot/bundler/responders-3.1.1
Bump responders from 3.1.0 to 3.1.1
2024-03-23 02:16:20 +01:00
dependabot[bot]
797e9cb7e8 Bump responders from 3.1.0 to 3.1.1
Bumps [responders](https://github.com/heartcombo/responders) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/heartcombo/responders/releases)
- [Changelog](https://github.com/heartcombo/responders/blob/main/CHANGELOG.md)
- [Commits](https://github.com/heartcombo/responders/compare/v3.1.0...v3.1.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-23 00:59:00 +00:00
Javi Martín
aeef760acd Merge pull request #5292 from consuldemocracy/dependabot/bundler/paranoia-2.6.3
Bump paranoia from 2.6.2 to 2.6.3
2024-03-23 01:57:09 +01:00
dependabot[bot]
9f2f63cc69 Bump paranoia from 2.6.2 to 2.6.3
Bumps [paranoia](https://github.com/rubysherpas/paranoia) from 2.6.2 to 2.6.3.
- [Release notes](https://github.com/rubysherpas/paranoia/releases)
- [Changelog](https://github.com/rubysherpas/paranoia/blob/core/CHANGELOG.md)
- [Commits](https://github.com/rubysherpas/paranoia/compare/v2.6.2...v2.6.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-23 00:39:08 +00:00
dependabot[bot]
a145531f17 Bump exiftool_vendored from 12.60.0 to 12.80.0
Bumps [exiftool_vendored](https://github.com/exiftool-rb/exiftool_vendored.rb) from 12.60.0 to 12.80.0.
- [Commits](https://github.com/exiftool-rb/exiftool_vendored.rb/compare/v12.60.0...v12.80.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-23 00:33:14 +00:00
Javi Martín
f1043403da Merge pull request #5293 from consuldemocracy/dependabot/bundler/devise-4.9.3
Bump devise from 4.9.2 to 4.9.3
2024-03-23 01:31:49 +01:00
Javi Martín
8d2c2c473e Base Devise initializer on the latest version
We haven't updated this initializer for years, so here's the updated
version. The `expire_auth_token_on_timeout` doesn't seem to exist
anymore, and a few more options have been added.

Note that the default Devise initializer configures
`config.responder.error_status` and `config.responder.redirect_status`
so they follow Hotwire/Turbo conventions. For now, I'm commenting these
lines because we currently don't use Hotwire/Turbo.
2024-03-23 01:12:35 +01:00
dependabot[bot]
965283d81d Bump devise from 4.9.2 to 4.9.3
Bumps [devise](https://github.com/heartcombo/devise) from 4.9.2 to 4.9.3.
- [Release notes](https://github.com/heartcombo/devise/releases)
- [Changelog](https://github.com/heartcombo/devise/blob/main/CHANGELOG.md)
- [Commits](https://github.com/heartcombo/devise/compare/v4.9.2...v4.9.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-23 01:12:35 +01:00
Javi Martín
8ae6b6daef Merge pull request #5338 from consuldemocracy/dependabot/bundler/spring-4.1.3
Bump spring from 2.1.1 to 4.1.3
2024-03-23 01:12:25 +01:00
Javi Martín
e4e0cb5d47 Don't use spring in the test environment
Spring now (since version 3, I think) requires `config.cache_classes =
false` in order to work. However, that means that tests would be slower
for developers who don't use spring (like me).

I'd personally vote for removing spring completely (Rails removed it as
a default installation option in August 2021 [1]), but for now we're
keeping it for backwards compatibility.

[1] See pull request 42997 in https://github.com/rails/rails
2024-03-23 00:58:49 +01:00
dependabot[bot]
c87f7a7e9a Bump spring from 2.1.1 to 4.1.3
Bumps [spring](https://github.com/rails/spring) from 2.1.1 to 4.1.3.
- [Release notes](https://github.com/rails/spring/releases)
- [Changelog](https://github.com/rails/spring/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rails/spring/compare/v2.1.1...v4.1.3)

---
updated-dependencies:
- dependency-name: spring
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-23 00:58:48 +01:00
Javi Martín
69b2d767b1 Merge pull request #5424 from consuldemocracy/dependabot/bundler/pg-1.4.6
Bump pg from 1.4.3 to 1.4.6
2024-03-23 00:58:09 +01:00
Javi Martín
a878185a41 Merge pull request #5396 from consuldemocracy/main_section
Add a link to skip to the main content
2024-03-23 00:56:26 +01:00
dependabot[bot]
84097bb002 Bump pg from 1.4.3 to 1.4.6
Bumps [pg](https://github.com/ged/ruby-pg) from 1.4.3 to 1.4.6.
- [Changelog](https://github.com/ged/ruby-pg/blob/master/History.md)
- [Commits](https://github.com/ged/ruby-pg/compare/v1.4.3...v1.4.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-23 00:36:40 +01:00
Javi Martín
b9e137619a Simplify the way we provide the title in most cases
This is consistent with the way we're providing the main class.

Note we're still setting the title using a block in more complex cases.
2024-03-23 00:35:47 +01:00
Javi Martín
e867135a07 Always provide the title before writing anything else
This way our views are more consistent.
2024-03-23 00:35:47 +01:00
Javi Martín
45c1f93562 Add a link to skip to the main content
While people using screen readers already have keyboard shortcuts to
jump to the <main> tag, there are people who navigate the page with the
keyboard using just the tab key, and for them, this link provides a way
to save time and start reading the main content instead of having to
manually go through all the navigation links every time a new page is
loaded.

Note that we had to add an additional `width: 0` rule because
Foundation's `element-invisible` would apply `1px` and the test checking
for `visible: :hidden` would faile.
2024-03-23 00:35:47 +01:00
Javi Martín
2b962f2789 Use a <main> tag on every page
Many pages had this tag, but many other didn't, which made navigation
inconsistent for people using screen readers.

Note that there are slight changes in two pages:

* The homepage now includes the banner and the content of the
  `shared/header` element inside the <main> tag
* The budgets index now includes the banner inside the <main> tag

I see both potential advantages and disadvantages of this approach,
since banners aren't necessarily related to the main content of a page
but on the other hand they aren't the same across pages and people using
screen readers might accidentally skip them if they jump to the <main>
tag.

So I'm choosing the option that is easier to implement.

Note we're adding a `public-content` class to the <main> element in the
application layout. This might be redundat because the element could
already be accessed through the `.public main` selector, but this is
consistent with the `admin-content` class used in the admin section, and
without it the <main> element would sometimes have an empty class
attribute and we'd have to use `if content_for?(:main_class)` or
`tag.main` which IMHO makes the code less consistent.

The Capybara::DSL monkey-patch is only done on the `visit` method
because it's the only reliable one. Other methods like `click_link`
generate AJAX requests, so `expect(page).to have_css "main", count: 1`
might be executed before the AJAX request is finished, meaning it
wouldn't properly test anything.
2024-03-23 00:35:43 +01:00
Javi Martín
9c037a484e Make proposals map test more robust
We were testing what happens when clicking on a geozone without HTML
coordinates, which won't happen in a real browser.

So we're now defining the HTML coordinates and clicking on the area in
the test, which is what real people will do.

We also avoid having two consecutive `visit` calls, which will interfere
with the way we plan to test the presence of the <main> tag after every
`visit`.

Note that, the test didn't work with the HTML coordinates defined in the
`with_html_coordinates` trait, with Capybara showing the following
error:

```
Selenium::WebDriver::Error::ElementClickInterceptedError:
element click intercepted: Element
  <area shape="poly"
  coords="30,139,45,153,77,148,107,165"
  href="/proposals?search=California"
  title="California" alt="California">
is not clickable at point (413, 456).
Other element would receive the click:
  <img usemap="#map" src="/assets/map.jpg">
```

The cause of this error was the strange shape of the polygon, which was
greatly concave and and so the middle of its area wasn't part of it.
We're changing the polygon so it's now convex and when Capybara clicks
on its middle point everything will work as expected.
2024-03-23 00:33:41 +01:00
Javi Martín
f1105140ae Remove duplicate <main> tags in management views
There can only be one <main> tag in a document, and we've already got a
<main> tag in the management layout.
2024-03-23 00:33:41 +01:00
Javi Martín
f0baa080b6 Merge pull request #4955 from consuldemocracy/dependabot/bundler/master/graphql-2.0.13
Bump graphql from 1.12.14 to 1.13.22
2024-03-22 23:14:38 +01:00
dependabot[bot]
8e63bd9d20 Bump graphql from 1.12.14 to 1.13.22
Bumps [graphql](https://github.com/rmosolgo/graphql-ruby) from 1.12.14 to 1.13.22.
- [Release notes](https://github.com/rmosolgo/graphql-ruby/releases)
- [Changelog](https://github.com/rmosolgo/graphql-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rmosolgo/graphql-ruby/compare/v1.12.14...v1.13.22)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-22 22:56:42 +01:00
Javi Martín
d0f5a4b80a Merge pull request #5442 from consuldemocracy/code_of_conduct_contact
Update code of conduct contact address
2024-03-22 18:49:54 +01:00
Javi Martín
6c3971871d Update code of conduct contact address 2024-03-22 18:34:47 +01:00
Javi Martín
56a545f86e Merge pull request #5440 from consuldemocracy/remove_link_to_gitter
Remove link to gitter chat
2024-03-22 17:04:24 +01:00
Javi Martín
6bb587c7da Remove link to gitter chat
We're replacing gitter with GitHub Discussions.
2024-03-22 16:39:10 +01:00
Sebastia
9e5344b5d7 Merge pull request #5276 from consuldemocracy/order-cards
Allow sorting homepage cards
2024-03-22 10:56:33 +01:00
taitus
bca3415aa6 Use comments component for investments valuation comments 2024-03-22 08:57:05 +01:00
taitus
260196ca54 Use comments component for legislation annotations and questions 2024-03-22 08:56:13 +01:00
Javi Martín
692d509cf5 Merge pull request #5398 from consuldemocracy/readme_badges
Update badges in README files
2024-03-22 03:05:13 +01:00
taitus
bce1474527 Only render position field on table when cards rendered are not headers 2024-03-21 19:00:56 +01:00
coslajohn
529357c980 Merge pull request #5390 Geozone Admin maps
This makes it easier to see if Geojson has been imported correctly.
2024-03-21 18:47:37 +01:00
taitus
4e9d5d8c5a Allow sorting widget_cards on custom pages 2024-03-21 18:27:49 +01:00
taitus
f795c18bec Allow sorting widget_cards on sdg section 2024-03-21 18:27:49 +01:00
taitus
7c85daac3f Allow sorting widget_cards on homepage
Note that we keep :created_at order as complement to new :order field.

We do this so that current installations will not notice any change in the
sorting of their cards when upgrading, as the default "order" field will always
be 1, so it will continue to sort by the "created_at".
2024-03-21 18:27:49 +01:00