Commit Graph

21 Commits

Author SHA1 Message Date
Javi Martín
55d2cfe5b1 Use link list helper in admin menus
For now we're not including lists with nested lists.
2020-12-07 15:28:56 +01:00
Javi Martín
bdf30aa14e Use CSS to display icons in the admin menu
This way we simplify the HTML and generating similar menus will be
easier. We also improve the experience for screen reader users, who
might have been hearing the icons as text because we weren't using the
`aria-hidden` attribute.

We're still keeping the "icon-" classes for compatibility with CONSUL
installations which might have changed this code.
2020-11-27 12:33:42 +01:00
Javi Martín
125106f9c0 Simplify code to have an off-canvas menu
While Foundations's off-canvas menu allows us to forget about writing
CSS, it also leads to complicated HTML.

Ideally Foundation would provide an easy way to simplify what we're
doing, but I haven't found anything in the documentation.

We could simplify the HTML a bit more if we used a CSS grid layout
instead of a flex one, but old browsers have better support for the
latter.

Note we're using `breakpoint(medium)` so we can group the CSS for small
screens and follow SCSS-Lint rules at the same time.

Also note behavior of the main area when the menu appears on small
screens is slightly different: it doesn't move the main content to the
right. I've done it this way so we don't have any overflow issues,
unlike the previous version.

There's a small issue using a label and a checkbox to enable/disable the
menu: sighted keyboard users with a small screen might not be able to
enable the menu. So we're adding the `:focus-within` pseudoclass so the
menu can be normally navigated using the keyboard. Even if old browsers
don't support this pseudoclass, we believe the probability of a sighted
user using a small screen, navigating with the keyboard and using an old
browser is really low, particularly in the admin area.

We're also adding the `aria-hidden` attribute on the label, since the
menu is never hidden for screen readers and so having a control to show
it could be confusing. Since the label is not focusable, we're complying
with the fourth ARIA rule:

> Do not use role="presentation" or aria-hidden="true" on a focusable
> element .
>
> Using either of these on a focusable element will result in some users
> focusing on 'nothing'.
2020-09-21 15:14:20 +02:00
Julian Herrero
129a258f19 Use double quotes in app/views/moderation 2019-03-19 12:16:50 +01:00
Angel Perez
c64e93867a Allow moderators to moderate investments 2018-07-20 18:42:34 -04:00
iagirre
f58bc5d886 Add the menu entry for prop. notifications
A new menu for the sidebar has been added, so that the moderator
can access to the index from the menu.
2018-07-02 18:17:56 +02:00
decabeza
0bf31bde6c Updates all active to is-active classes 2018-06-06 12:02:13 +02:00
Angel Perez
ab9d612128 'Proposals' feature can be enabled/disabled
Fixes #1886
2017-11-17 13:10:55 -04:00
Alberto Garcia Cabeza
3ec0971b37 Replaces icons i tags for span 2016-03-14 19:32:48 +01:00
Josep Jaume Rey Peroy
2d45828cad Feature-flag debates 2016-01-18 13:05:00 +01:00
kikito
757205a93e Unifies bulk & debates moderation forms in a single one 2015-09-21 15:41:01 +02:00
kikito
84e905ff70 adds proposals moderation to mod menu 2015-09-13 22:14:22 +02:00
kikito
b9ebe8c2c4 Implements basic bulk debates functionality 2015-09-08 19:44:50 +02:00
Juanjo Bazán
f2426e09fa adds users to moderator's menu 2015-09-07 17:57:08 +02:00
Alberto Garcia Cabeza
da0c937983 Adds new texts for admin and moderation pages 2015-08-31 21:49:36 +02:00
kikito
3b3f25f14e merges with master 2015-08-26 13:22:07 +02:00
Juanjo Bazán
46bd0f2c7f adds basic style/content to moderation dashboard 2015-08-26 12:24:37 +02:00
Alberto Garcia Cabeza
8037a82fef Adds styles to moderation admin 2015-08-25 15:19:54 +02:00
kikito
720630e0ab Fixes failing spec which expected a menu id 2015-08-23 18:32:00 +02:00
kikito
5db63228ad Adds moderation sidebar 2015-08-23 00:02:40 +02:00
rgarcia
101477c7da refactors admin layout 2015-08-14 13:33:30 +02:00