Commit Graph

17061 Commits

Author SHA1 Message Date
Javi Martín
a1785b0621 Remove note about Semantic Versioning
We don't have a public API, so this system doesn't apply to us.
2021-11-23 17:57:58 +01:00
Senén Rodero
cd376f90fb Merge pull request #4745 from consul/spanish_translation
Fix user edit page title
2021-11-23 17:47:32 +01:00
Senén Rodero
d6673475f3 Merge pull request #4743 from consul/i18n_crowdin
Update translations from Crowdin
2021-11-23 17:47:17 +01:00
Senén Rodero Rodríguez
a52517a9f7 Fix user edit page title
The error is only present at the Spanish language.
2021-11-23 16:55:42 +01:00
Senén Rodero Rodríguez
fff30e0a1c Update translations from Crowdin 2021-11-23 13:56:53 +01:00
Senén Rodero
64fc2a836a Merge pull request #4738 from consul/i18n_crowdin
Update translations from Crowdin
2021-11-19 16:12:39 +01:00
Javi Martín
43994e054c Merge pull request #4741 from consul/track_invalid_id_spec
Query the database before a visit in campaigns test
2021-11-19 13:00:00 +01:00
Javi Martín
e9abb153d6 Merge pull request #4739 from consul/investment_filters_visibility
Make investment filters less prominent
2021-11-19 12:58:24 +01:00
Javi Martín
006128da57 Query the database before a visit in campaigns test
This test was failing sometimes. One possible cause (although it might
not be the only one) is we were querying the database with
`Campaing.last` after starting the process running the browser with a
`visit`. In the past doing so has resulted in database inconsistencies
while running the tests.

Since after running the test more than 1500 times we weren't able to
reproduce the failure, it's possible that this change doesn't fix the
issue which caused the test to fail, but in the worst case scenario we
reduce the number of possible reasons why it fails.
2021-11-18 15:04:22 +01:00
Senén Rodero
f64377ad5a Merge pull request #4740 from consul/flake
Fix flaky spec in campaign-tracking tests
2021-11-18 10:15:07 +01:00
Senén Rodero
a6d61faa3a Merge pull request #4736 from consul/typos
Fix typos in proposals dashboard and budgets admin
2021-11-18 10:13:55 +01:00
Javi Martín
e612705463 Make investment filters easier to understand
So now:

* In the first few phases, no filters are shown (just like before)
* During the valuation phase, we show "Active" and "Unfeasible"
* During the final voting, we show "Active" (which now refers to the
  selected investments), "Not selected for the final voting" and
  "Unfeasible"
* When the budget is finished, we show "Winners", "Not selected for the
  final voting" and "Unfeasible"

Now each investment is shown in one (and only one) of the filters
(except when the budget is finished; in this case we don't show selected
investments which didn't win), and we remove the confusing "Not
unfeasible" filter by only showing it during the valuation phase (before
filters are selected) and renaming it to "Active". We also rearrange the
filters so the default one for each phase is shown first.

The idea of using the "Active" text for investments which can be
selected during the selection phase and voted during the final voting is
experimental. Right now, for simplicity, since we assume filters will
always use the same text, we're removing the "Active" filter when the
budget is finished, since having both "Winners" and "Active" filters
would be confusing.
2021-11-16 19:18:25 +01:00
Senén Rodero Rodríguez
652f85cba3 Update spec expectations to avoid flake specs
The last expectation we were using in this test is satisfied before
going back to the admin stats page, as the campaing2 name is not
present before clicking the `Go back` link. Because of this, the
test could end while the request thrown by the `Go back` link is
not completed yet, which can collide with the following test and
cause a flake spec.
2021-11-16 16:12:05 +01:00
Javi Martín
64892cf3ea Make investment filters less prominent
As mentioned in commit 36d795f69, investment filters aren't that
important; actually, most citizens won't use them at all, and are there
mainly for transparency purposes.

So we're moving them to the bottom of the sidebar, just like the links
for selected/archived/retired proposals in the proposals section.
2021-11-16 14:50:08 +01:00
Javi Martín
6eddf5d395 Merge pull request #3855 from consul/rubocop_open
Add Security/Open rubocop rule
2021-11-16 12:55:43 +01:00
Javi Martín
dc87f9d69a Add Security/Open rubocop rule
The `open` method can be used to open files or URLs and it's deprecated
in Ruby 2.7. In this case, it's clear we're dealing with a URL, so we
can use `URI.parse`.

The code was a bit strange, since it returned a value and had a side
effect: opening the URL. I'm not sure about the intention of the code;
my best guess is we wanted to test the URL exists and was accessible
before returning it (and, if that's the case, IMHO the code should be a
bit more explicit in order to show the intention behind it), but it
could also be an unintended side effect which was there by accident.

Now the URL is no longer opened; if the URL isn't accessible, we'll find
out when trying to connect to it with the Savon client.
2021-11-16 12:37:32 +01:00
Javi Martín
5519518cfb Parse cached attachment URLs with remote storages
In commit 5a4921a1a we replaced `URI.parse` with `URI.open` due to some
issues during our tests with S3.

However, there are some security issues with `URI.open` [1], since it
might allow some users to execute code on the server.

So we're using `URI.parse#open` instead.

[1] https://docs.rubocop.org/rubocop/cops_security.html#securityopen
2021-11-16 12:37:32 +01:00
Javi Martín
e5fbd34eac Extract method to check for a filesystem storage
We'll use this method to write a test dealing with remote storages.
2021-11-16 12:37:14 +01:00
Javi Martín
b548e16ba0 Merge pull request #4735 from consul/rubocop_offenses_1.4
Fix Rubocop convention offenses
2021-11-16 12:36:47 +01:00
Senén Rodero Rodríguez
d9e3ff42ac Update translations from Crowdin 2021-11-15 11:54:26 +01:00
Senén Rodero Rodríguez
e119870e9d Fix typo at source string
Thanks to chkoun.
2021-11-12 13:05:38 +01:00
Senén Rodero Rodríguez
2ccc3d1cac Replace wrong word with the correct one
When referring to budget we use the word headings instead of headers.
2021-11-11 10:45:26 +01:00
Javi Martín
c2410cb461 Fix RSpec/LetSetup Rubocop offense
It was accidentally introduced in commit 756a16f67. Pronto didn't warn
us because in that commit we deleted the code where the `group` method
was used.
2021-11-10 19:50:43 +01:00
Javi Martín
28ee026951 Fix Layout/EmptyLines Rubocop offense
It was accidentally introduced in commit 2b709f1a3. Pronto didn't warn
us because the blank lines were together after removing the blank lines
between them.
2021-11-10 19:50:06 +01:00
Senén Rodero
b0af76efdb Merge pull request #4711 from consul/typos
Fix typos in budget administration texts
2021-11-10 18:39:30 +01:00
Javi Martín
5a9d4aa2f7 Merge pull request #4732 from consul/fix_mobile_investment_layout
Fix investment list layout on small/medium screens
2021-11-09 14:14:14 +01:00
Javi Martín
a8ff04d9b7 Fix investments list layout on small screens
The flex layout didn't work well on small screens, since there was
barely any space for the elements.
2021-11-09 12:27:11 +01:00
Javi Martín
e54b6b3d97 Increase investments width in management section
I'm not sure whether it now looks worse on extra large screens, but I'm
positive it looks much better on medium and large screens, particularly
when investments have images.
2021-11-09 01:36:19 +01:00
Javi Martín
8ec77723ed Use buttons instead of inputs to remove supports
We're starting to use buttons instead of submit inputs where possible
because buttons are easier to style; for instance, buttons allow
pseudoelements. Rails has also changed the `button_to` helper to always
generate a <button> tag in recent versions [1].

In this case, buttons get on better with flex layouts, since by default
some browsers display submit inputs with `white-space: pre`, meaning
some of the text isn't visible on small screens.

[1] See pull request 40747 in https://github.com/rails/rails
2021-11-09 01:35:39 +01:00
Javi Martín
0aa040409d Merge pull request #4730 from consul/budgets_remove_supports
Add setting to allow removing investments supports
2021-11-08 11:41:01 +01:00
decabeza
9979b53994 Add setting to allow remove investments supports 2021-11-08 01:37:41 +01:00
decabeza
1a73b20d9b Fix supported investments layout 2021-11-08 01:15:13 +01:00
Javi Martín
a08886fcf4 Remove obsolete investment-projects-list selector
It isn't used since we deleted spending proposals in commit d0b8fef6b.
2021-11-08 01:14:58 +01:00
raoulkramer
d9bca5ea5d Remove a potentially pre-existing server.pid in entrypoint.sh (Merge pull request #4684)
With this solution we don't need to amend the docker-compose.yml file.
2021-11-06 01:34:42 +01:00
Javi Martín
54f234b876 Merge pull request #4726 from consul/translate_budget_links
Translate budget and budget phase main link url
2021-11-05 19:39:39 +01:00
Javi Martín
048458dce8 Use hints instead of placeholders in URL fields
Placeholders are hard to read due to their low contrast, and users might
want to read them after they're already gone, and so they cause both
accessibility and usability issues.
2021-11-05 16:40:36 +01:00
Javi Martín
3a704005b0 Remove duplicate translation keys for example URLs
They were accidentally introduced in commit db9ac79e0.
2021-11-05 16:40:36 +01:00
Senén Rodero Rodríguez
7ad838c57d Translate budget and budget phase main link url 2021-11-05 16:40:36 +01:00
Senén Rodero Rodríguez
30afb64bac Do not consider attributes using the :unless option as required
Remove some of the factories introduced in commit 66334b5 as now we do
not need them anymore.

Co-Authored-By: Javi Martín <35156+javierm@users.noreply.github.com>
2021-11-05 16:40:36 +01:00
Javi Martín
d1a5bdb949 Merge pull request #4725 from consul/sdg_icons_croatian
Add SDG icons in Croatian
2021-11-05 16:19:11 +01:00
Sebastia
96a3522e10 Merge pull request #4729 from consul/update-deploy-secrets-example
Add consistency between deploy-secrets and installer
2021-11-05 15:50:27 +01:00
taitus
6543009942 Add consistency between deploy-secrets and installer
The installer creates the application in the following path:
home_dir: "/home/{{{ deploy_user }}"

We update the variable "deploy_to" in the deploy-secrets
file to be consistent with the installer.

While we are modifying the file we also update the "user"
variable in staging and preproduction sections with the
installer default value: "deploy_user: deploy" the same as
we already have in the production section.
2021-11-05 12:39:47 +01:00
Sebastia
edbe412837 Merge pull request #4727 from consul/unify-spec-components-expectations
Unify spec components expectations
2021-11-04 13:11:05 +01:00
taitus
934ce21871 Allow passing :with argument to :be_rendered
We need it in order to check the rendered content.
2021-11-04 10:49:36 +01:00
taitus
612872ac7a Define and apply matcher :be_rendered
Add this changes to make components specs clear
2021-11-04 10:49:36 +01:00
taitus
2b35144540 Unify expectations on spec components folder
In this PR (https://github.com/consul/consul/pull/4683) a new syntax was introduced
in the component specs to check that the component was not rendering.
It seems interesting to add this syntax to the rest of the cases and thus unify the way
we check that a component is not rendering.
2021-11-04 10:49:36 +01:00
Javi Martín
21170d0f24 Merge pull request #4721 from consul/sass_warning
Fix Sass deprecation warning
2021-11-03 11:38:35 +01:00
Javi Martín
9e1f28e64e Merge pull request #4718 from consul/single_heading_links
Simplify navigation in single heading budgets
2021-11-03 11:38:12 +01:00
Javi Martín
281bc6dbe9 Add SDG icons in Croatian
The icons have been obtained thanks to one of the SDG ambassadors in
Croatia and the Centar Društvenih Inovacija [1].

[1] https://cdi.hr/
2021-11-02 16:26:25 +01:00
Javi Martín
caebaac1cc Fix investments link in single heading budgets
The link to "See all investments" didn't have the `heading_id`
parameter, which resulted in the ballot information not being displayed
when in the voting phase.

We could modify the link to include the `heading_id` parameter, but IMHO
it's more robust to select the heading automatically when there's only
one heading. That way manually accessing the page without a `heading_id`
parameter will still work as if the heading had been selected.
2021-10-29 15:23:23 +02:00