Commit Graph

30 Commits

Author SHA1 Message Date
Javi Martín
597a21eca9 Add alt attribute to map images
We were using it on the map displayed on the sidebar, but we weren't
using it in the other places were the map is rendered.
2024-11-12 18:25:20 +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
756a16f67a Remove investment filters in groups
The interface was a bit confusing, since after clicking on "See
unfeasible investments" (or similar), we were on a page where no
investments were shown.

Besides, since commit 7e3dd47d5, the group page is only linked from the
"my ballot" page, through a link inviting the user to vote in that
group, and it's only possible to vote selected investments (which is the
default filter during the final voting phase).

The only reason we had these links here was these links weren't present
in the investments page. But they're present there since commit
04605d5d5, so we don't need them in the group page anymore.
2021-10-29 15:01:40 +02:00
decabeza
4a9aae9806 Add groups index page
When render the investment list component with the link "see all
investments", now we redirect to groups index page when a budget has
multiple headings.
2021-08-09 21:45:29 +02:00
Javi Martín
3cd2529791 Fix huge header in participatory budgets
The budget header was supposed to be huge, but only in the participatory
budgets index or show actions. It was still huge, with plenty of empty
space, when there was no budget, or in the "submit my ballot" and
"select a heading" pages.
2021-08-09 20:07:51 +02: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
Javi Martín
6cfb862553 Remove unneeded turbolinks: false link parameter
It was added because a test failed without turbolinks. However, writing
the test so it doesn't update the database at the same time the browser
is doing a request also solves the problem and makes the test more
robust.
2021-03-18 14:06:47 +01:00
Javi Martín
f5c1cfbf8c Fix group investments filters links
They were pointing to the budget page instead of the budget group page,
which made navigation weird.
2021-03-15 18:14:46 +01:00
decabeza
d912b80e74 Move phases header close to phases section 2021-03-11 19:37:58 +01:00
Javi Martín
27e1721348 Remove unnecessary HTML classes
There are negative margins on .expanded.budget elements, and so these
rules are redundant.
2021-03-11 19:37:58 +01:00
Javi Martín
1d42fe54f0 Simplify HTML class for budget header
There were some issues using `.budget.expanded`, like a link having that
class which would force us to a `:not(.button)` selector or similar,
making the CSS more complex.
2021-03-11 19:37:58 +01:00
Javi Martín
7b96180a76 Upgrade Turbolinks to version 5.2.1
We didn't upgrade Turbolinks when we upgraded to Rails 5 so we didn't
upgrade too many things at the same time, and postponed it... until now
:).

Note upgrading Turbolinks fixes an issue with foundation's sticky when
using the browser's back and forward buttons. We're adding tests for
these scenarios.

Co-authored-by: Senén Rodero Rodríguez <senenrodero@gmail.com>
2020-08-05 14:10:22 +02:00
decabeza
a57397dd6c Always use map image from admin site customization images 2019-05-07 14:43:04 +02:00
Julian Herrero
a963a99c55 Use correct scope to sort headings by name 2019-02-13 13:35:09 +01:00
decabeza
a2161f3ace Hide voted group css class if current filter is unfeasible 2019-02-05 17:16:04 +01:00
Bertocq
2a678dfd4a Order group headings by name on listing 2018-01-31 23:20:57 +01:00
decabeza
f1ce68a445 changes back link on header to budgets_path 2018-01-19 14:35:05 +01:00
decabeza
d49b6e5aa4 adds rel canonical on show views 2017-05-17 14:10:38 +02:00
Juanjo Bazán
81c4a13305 shows links to unfeasible/selected only after budget is balloting 2017-05-09 17:36:42 +02:00
rgarcia
c0488c3b3c refactors investment filters 2017-05-06 04:57:06 +02:00
Alberto Garcia Cabeza
6ab6986d9e adds unselected investment link 2017-05-05 19:07:37 +02:00
Alberto Garcia Cabeza
45450d74ff improves styles for unfeasible investments 2017-01-16 18:45:42 +01:00
rgarcia
5f7269a070 displays unfeasible budgets link from home 2017-01-16 03:09:08 +01:00
Juanjo Bazán
bdb55805a1 uses back_link_helper all around 2017-01-11 13:03:12 +01:00
Alberto Garcia Cabeza
01ba8f7ea9 improves styles on budgets groups show 2017-01-05 12:56:46 +01:00
Alberto Garcia Cabeza
8b1e8fed5b improves styles for budgets views 2017-01-04 19:18:41 +01:00
kikito
2ec4f53367 investment-project -> budget-investment 2016-12-02 19:21:46 +01:00
Alberto Garcia Cabeza
c42877efb1 Improves styles for select heading page 2016-09-12 18:45:47 +02:00
rgarcia
16794c580c groups and headings navigation 2016-09-10 16:22:43 +02:00
rgarcia
9d4f2d1aff Displays budget groups 2016-09-10 16:22:41 +02:00