Commit Graph

34 Commits

Author SHA1 Message Date
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
517f74a748 Extract component to render an initialjs avatar
This way it'll be easier to change it.
2023-10-10 15:03:35 +02:00
Javi Martín
cb2aebe2c8 Fix current_user usage in management section
In the management section, `current_user` is the user impersonated by
the manager. We were deciding whether to show the admin menu depending
on the privileges of the current user, but this menu should be shown
according to the privileges of the manager who is impersonating the
user.

We're doing a similar (very subtle) change in the login items. We were
rendering the `login_items` partial passing `current_user: user`.
However, inside this method, we were using `user_signed_in`, which
ignored the `current_user` we were passing. The result was always the
same expect in tests where we manually sign in users, but we're changing
it anyway in order to reduce confusion.
2023-01-16 14:22:23 +01:00
Javi Martín
62b23f1e56 Extract component to show a user's public activity 2021-10-05 13:26:30 +02:00
Julian Herrero
f6489bc604 Use double quotes in app/views 2019-03-19 12:33:07 +01:00
decabeza
ee884ed998 Updates active to is-active class for menus 2018-06-06 12:01:16 +02:00
decabeza
377a1d9f01 improves following view and updates specs 2017-12-07 16:31:05 +01:00
decabeza
d273ba2ba5 improves following page, shows public interest only in this view 2017-12-07 13:40:12 +01:00
decabeza
f6ee472a66 Improve styles for users interest list 2017-10-18 18:55:55 +02:00
decabeza
c5aeaa26ae fixes user show tabs styles 2017-10-18 18:55:07 +02:00
Senén Rodero Rodríguez
3370896ead Add empty interests list message. 2017-07-26 17:48:47 +02:00
Alessandro Cuoghi
556e2598c3 Remove margin bottom in the table inside accordion. Divided into groups of 10 interests. Inserted interests in columns. 2017-07-13 20:29:36 +02:00
taitus
7e2e94d709 Add following tab to user public page. 2017-07-13 20:29:34 +02:00
Alessandro Cuoghi
52e195d837 Add tab. Add accordion. Add style. Pass test scss-lint. 2017-07-13 20:14:55 +02:00
Senén Rodero Rodríguez
4b2310c135 Move and refactor method from follow to user model to get user interests. Add specification to check the discard of duplicate interests. 2017-07-07 15:18:34 +02:00
taitus
14ec4f5315 Add styles and translations for users interests. 2017-07-07 13:37:53 +02:00
taitus
19820e4432 Add public interests validation and show interests on user profile 2017-07-07 13:34:43 +02:00
kikito
cb7ea79aaf Replaces spending proposals by budget investments in user/show 2016-09-09 12:19:38 +02:00
rgarcia
d40af1e94c do not display button to send message to myself 2016-06-16 16:05:09 +02:00
rgarcia
95d244003e do not display link to send direct message 2016-06-15 12:03:38 +02:00
Alberto Garcia Cabeza
29f869046a Adds message for no accepting private messages 2016-06-10 18:01:59 +02:00
Alberto Garcia Cabeza
999f5bbde3 Improves styles for direct messages 2016-06-09 16:01:03 +02:00
rgarcia
c3d06c8bd0 adds direct messages 2016-06-08 20:44:54 +02:00
Alberto Garcia Cabeza
97db98fd3e Removes html role attributes 2016-03-14 19:31:15 +01:00
Alberto Garcia Cabeza
3752f3a53b Adds foundation 6 🎉 2016-02-26 19:33:33 +01:00
rgarcia
7699b99655 allows authors and admins to view their spending proposals in my activity 2016-02-21 18:02:55 +01:00
Alberto Garcia Cabeza
51e44357ff Fixes styles for filters on admin pages 2016-01-11 13:51:29 +01:00
Alberto Garcia Cabeza
66acbdbb66 Removes unused classes 2015-12-16 11:58:36 +01:00
Juanjo Bazán
a881ced801 adds user's email to activity page for admins 2015-11-12 12:04:34 +01:00
Alberto Garcia Cabeza
ca8f410319 Adds styles for user's activity page 2015-11-06 12:28:04 +01:00
Juanjo Bazán
f57eef4929 makes public activity toggleable 2015-11-04 13:51:31 +01:00
Juanjo Bazán
fe0618e2c1 restyling user's page 2015-11-03 19:54:57 +01:00
Juanjo Bazán
15e2ca815d adds activity page with user's proposals 2015-11-03 19:29:35 +01:00
Juanjo Bazán
7f1fe034a3 adds user's public show page 2015-11-03 19:29:35 +01:00