Commit Graph

17301 Commits

Author SHA1 Message Date
taitus
4eda906a93 Move current goal images to origal folder
We keep the original images (with a larger size) in case we want to resize them to
another size in the future.
2021-03-24 16:42:20 +01:00
Javi Martín
e371ad1f80 Merge pull request #4404 from consul/budget_styles
Change budgets section styles
2021-03-24 16:08:39 +01:00
decabeza
aabf8493f8 Use brand colors on budgets section 2021-03-24 15:50:26 +01:00
Alberto
048ca61207 Improve styles for budgets voting phase 2021-03-24 15:50:25 +01:00
Alberto
f79edf6ba4 Improve message to submit ballot 2021-03-24 15:48:24 +01:00
Alberto
10eb7f47c8 Use underscores on HTML IDs 2021-03-24 15:48:24 +01:00
Alberto
896fee6e99 Improve icon to remove investment from ballot
Note we're absolutely positioning the link instead of the icon; that way
keyboard users will be able to focus on the icon. Until now, users would
focus on an empty link.

For the same reason, we couldn't use `click_link` with Capybara, since
it would fail to click an empty link. Now we can.

Co-authored-by: Javi Martín <javim@elretirao.net>
2021-03-24 15:48:24 +01:00
Javi Martín
8be7abe5fd Remove obsolete CSS selectors
The `investment-project` and `investment-project-show` classes aren't
used since commit d0b8fef6b.
2021-03-24 15:48:24 +01:00
Javi Martín
fb8c476fb2 Extract component for ballot investment
Using component inheritance we can remove duplication and share the same
view.
2021-03-24 15:48:24 +01:00
decabeza
72a24128a6 Improve upload image and documents buttons 2021-03-24 15:48:24 +01:00
Javi Martín
4bb12c573f Fix invisible text selection on brand text
When an element had a text using the brand color and was a child of an
element with a brand background, the selection was invisible.
2021-03-24 15:48:24 +01:00
Javi Martín
f124828cd8 Fix invisible text selection on brand backgrounds
Since we were defining the selection to have the same text color and
background color as the element they were in, it resulted in the
selection being invisible.

It wasn't that noticeable because we were using this color combination
mainly in links and buttons, and selecting their text is not as common.
But we plan to use the `$brand` color on budget headers as well, and
this issue is more obvious there.

Browsers like Chrome weren't that affected because they automatically
make the selection semi-transparent and so the selected text still had a
slightly different color. In order to prevent this effect when the
selection is white, we're using a 0.99 opacity (in this case Chrome
ignores numbers higher that 0.998).
2021-03-24 15:48:24 +01:00
Javi Martín
e2d540d203 Extract code to define brand background
Setting the color to `$white` or `#fff` while setting the background to
`$brand` is a pattern we were using in many places. Since we're going to
edit it in order to fix the `::selection` behavior, we're defining the
pattern in one place.
2021-03-24 15:48:24 +01:00
Javi Martín
8ec7f0efc0 Remove obsolete styles
These styles are not used since commit db7d57b14.
2021-03-24 15:48:24 +01:00
Javi Martín
c08aa6ade5 Split SCSS mixins in several files
One file was OK when we only had a couple of mixins, but recently we've
been adding quite a few.

We can now avoid a SCSS Lint warning by excluding just the file with the
affected mixin.
2021-03-24 15:48:24 +01:00
Javi Martín
25c55bfd62 Merge pull request #4439 from consul/bump_mimemagic
Bump mimemagic to version 0.3.6
2021-03-24 15:44:04 +01:00
Javi Martín
decc7351f6 Bump mimemagic to version 0.3.6
Mimemagic 0.3.5 and earlier have been yanked due to a licensing issue.
2021-03-24 15:16:00 +01:00
Javi Martín
bb38ce9d1f Merge pull request #4438 from consul/secret_key_base
Comment secret key base on production environments
2021-03-23 19:14:32 +01:00
Javi Martín
3529ee777a Merge pull request #4433 from consul/gitlab_ci
Add experimental Gitlab CI integration
2021-03-23 14:09:42 +01:00
Javi Martín
de746b4004 Add experimental Gitlab CI integration
Based on the configuration recommended by Knapsack PRO [1] and Pronto
[2].

So far there are a few issues:

* Bundled gems don't seem to be cached
* The Ruby version can't be read from .ruby-version and needs to be set
  manually
* Tests are slower than when run on Github Actions or Travis CI
* There seem to be many flaky tests, maybe because tests are slower
  (this might actually help us fixing flaky bugs or performance
  bottlenecks)

An advantage of Gitlab CI is we can access the screenshots taken when a
system test fails.

[1] https://docs.knapsackpro.com/2019/how-to-run-parallel-jobs-for-rspec-tests-on-gitlab-ci-pipeline-and-speed-up-ruby-javascript-testing
[2] https://github.com/prontolabs/pronto/#gitlab-integration
2021-03-23 13:02:41 +01:00
Javi Martín
c161d7b5f6 Comment secret key base on production enviroments
Although our installer automatically generates a secret key base, we
want to avoid any chance of installations who don't use the installer
having an empty secret key base or using the default secret key base we
provide to use on development and test environments.
2021-03-22 20:33:18 +01:00
Javi Martín
7c39eed0ee Merge pull request #4432 from consul/knapsack_forks
Avoid timeouts in Knapsack PRO
2021-03-22 19:23:53 +01:00
Jakub Krzus
ca047b9a52 welcome_not_verified translations in seed are being generated 2021-03-22 17:52:39 +00:00
Jakub Krzus
a50b14a354 welcome_level_two_verified translations in seed are being generated 2021-03-22 17:52:22 +00:00
Jakub Krzus
465725aa90 welcome_level_three_verified translations in seed are being generated 2021-03-22 17:50:05 +00:00
Jakub Krzus
44bec30bf8 privacy translations in seed are being generated 2021-03-22 17:50:05 +00:00
Jakub Krzus
c690635b6c conditions translations in seed are being generated 2021-03-22 17:50:05 +00:00
Jakub Krzus
0c0a97a906 accessibility translations in seed are being generated 2021-03-22 17:50:05 +00:00
Jakub Krzus
2781fbac96 faq translations in seed are being generated 2021-03-22 17:49:36 +00:00
Javi Martín
5bbf1f6857 Merge pull request #4435 from consul/dependabot_config
Remove dependabot config file
2021-03-20 22:48:43 +01:00
Javi Martín
a8d6b9b330 Disable dependabot
Due to a bug in dependabot (see issue 2198 in the
`dependabot/dependabot-core` repository), Dependabot would open pull
requests on every fork, which would be inconvenient.

So we're disabling the updates until this issue is fixed; since we
currently have almost 50 open pull requests, it shouldn't affect us that
much.
2021-03-20 22:36:49 +01:00
Javi Martín
ad638b6a0f Merge pull request #4412 from consul/dependabot/bundler/rails-5.2.4.5
Bump rails from 5.2.4.4 to 5.2.4.5
2021-03-20 20:14:14 +01:00
Javi Martín
cefa015b71 Merge pull request #4312 from consul/dependabot/bundler/redcarpet-3.5.1
[Security] Bump redcarpet from 3.5.0 to 3.5.1
2021-03-20 20:09:20 +01:00
dependabot[bot]
83f23b3ef1 Bump rails from 5.2.4.4 to 5.2.4.5
Bumps [rails](https://github.com/rails/rails) from 5.2.4.4 to 5.2.4.5.
- [Release notes](https://github.com/rails/rails/releases)
- [Commits](https://github.com/rails/rails/compare/v5.2.4.4...v5.2.4.5)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-20 20:02:02 +01:00
dependabot-preview[bot]
ebdd889a5d [Security] Bump redcarpet from 3.5.0 to 3.5.1
Bumps [redcarpet](https://github.com/vmg/redcarpet) from 3.5.0 to 3.5.1. **This update includes a security fix.**
- [Release notes](https://github.com/vmg/redcarpet/releases)
- [Changelog](https://github.com/vmg/redcarpet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/vmg/redcarpet/compare/v3.5.0...v3.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-20 18:56:01 +00:00
Javi Martín
416b474122 Avoid timeouts in knapsack PRO
The way it's recommended since knapsack_pro version 2.3.0 [1].

[1] https://github.com/KnapsackPro/knapsack_pro-ruby/blob/master/CHANGELOG.md#230
2021-03-20 19:20:46 +01:00
Javi Martín
bb75c03ae0 Remove unneeded line loading knapsack pro tasks
This line isn't needed since knapsack_pro version 0.46.0 [1].

[1] https://github.com/KnapsackPro/knapsack_pro-ruby/blob/master/CHANGELOG.md#0460
2021-03-20 19:11:57 +01:00
Javi Martín
c1cdcf25ba Merge pull request #4257 from consul/dependabot/bundler/pg_search-2.3.5
Bump pg_search from 2.3.4 to 2.3.5
2021-03-20 19:11:03 +01:00
dependabot-preview[bot]
bd39e3ce4a Bump pg_search from 2.3.4 to 2.3.5
Bumps [pg_search](https://github.com/Casecommons/pg_search) from 2.3.4 to 2.3.5.
- [Release notes](https://github.com/Casecommons/pg_search/releases)
- [Changelog](https://github.com/Casecommons/pg_search/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Casecommons/pg_search/compare/v2.3.4...v2.3.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-20 15:36:11 +00:00
Javi Martín
3fcdfddf0d Merge pull request #4406 from consul/dependabot/add-v2-config-file
Create Dependabot config file
2021-03-20 16:07:36 +01:00
dependabot-preview[bot]
f6bddcb32b Create Dependabot config file 2021-03-20 14:52:16 +00:00
Javi Martín
5194fae65f Merge pull request #4392 from consul/dependabot/bundler/nokogiri-1.11.2
[Security] Bump nokogiri from 1.10.10 to 1.11.2
2021-03-20 15:29:47 +01:00
dependabot-preview[bot]
fc87a111d2 [Security] Bump nokogiri from 1.10.10 to 1.11.2
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.10 to 1.11.2. **This update includes security fixes.**
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.10.10...v1.11.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-20 01:32:41 +00:00
Javi Martín
06f07758f1 Merge pull request #4397 from consul/unify_budgets
Unify budget landing pages
2021-03-19 18:17:51 +01:00
Javi Martín
644557a094 Remove redundant code to set ballot referer
We were setting it twice: once inside the action and once after the
action.
2021-03-19 15:08:33 +01:00
Javi Martín
2552330fe0 Fix "go back" link in ballot page
Since the `@ballot_referer` variable was only set in the lines
controller, it didn't work when we accessed the ballot page without
adding a line.

Note it still doesn't work if we access the ballot page directly by
entering the URL in the browser's address bar.
2021-03-19 15:08:33 +01:00
Javi Martín
135e154fe3 Fix "go back" link in budget group and investments
Even if we usually only access these pages for the current budget, that
might not always be the case, and now that we've unified budget landing
pages, there's no point in them pointing to the index anymore.
2021-03-19 15:08:33 +01:00
decabeza
05e3584430 Adjust groups and headings styles 2021-03-19 15:08:33 +01:00
decabeza
f3c7b59658 Fix heading tag hierarchy on budgets index 2021-03-18 15:03:22 +01:00
Julian Herrero
7e3dd47d5a Unify budget landing pages
There was a big difference between the current budget and a specific
budget landing page. This didn't really make too much sense. Also, it
was not possible to know how a draft participatory budget will look
before it was published.

By unifying those two views now they will look quite similar and it
will be possible for administrators to preview any draft budget and to
know how the budget will look like before actually publishing it.
2021-03-18 15:03:21 +01:00