Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SDG view with related content #4292

Merged
merged 15 commits into from
Dec 28, 2020
Merged

Add SDG view with related content #4292

merged 15 commits into from
Dec 28, 2020

Conversation

javierm
Copy link
Member

@javierm javierm commented Dec 21, 2020

Objectives

  • Add a page where the most active debates, proposals and processes for a goal are shown

Visual changes

A goal, including its related content, is shown within the new SDG section

@javierm javierm added the SDG United Nations Sustainable Development Goals label Dec 21, 2020
@javierm javierm added this to Reviewing in Consul Democracy via automation Dec 21, 2020
@javierm javierm self-assigned this Dec 21, 2020
@javierm javierm changed the base branch from master to sdg_management December 21, 2020 10:49
@javierm javierm moved this from Reviewing to Doing in Consul Democracy Dec 21, 2020
@javierm javierm marked this pull request as draft December 21, 2020 10:50
@javierm javierm force-pushed the sdg_view branch 2 times, most recently from b0c59a4 to 1fb9150 Compare December 21, 2020 16:56
@javierm javierm force-pushed the sdg_management branch 2 times, most recently from 2e35558 to 74962ef Compare December 21, 2020 17:27
Base automatically changed from sdg_management to master December 21, 2020 17:52
@javierm javierm marked this pull request as ready for review December 21, 2020 18:10
@javierm javierm moved this from Doing to Reviewing in Consul Democracy Dec 21, 2020
@javierm javierm force-pushed the sdg_view branch 7 times, most recently from 522660a to 249bd9d Compare December 22, 2020 23:57
@taitus taitus moved this from Reviewing to Doing in Consul Democracy Dec 23, 2020
Note we're using the code instead of the ID to get the goal in the URL.
IMHO this is what most people would expect; visiting a URL with a "7"
takes you to SDG number 7, and not to the one with "7" as a database ID.

In order to avoid tests (either automated tests or manual tests) passing
by coincidence due to the goal ID and the goal code being the same, I'm
shuffling the codes before entering them in the databse.

I've tried using `resolve` in the routes so the code is automatically
taken into account, but it doesn't work since `resolve` cannot be used
inside a namespace, and here we're within the `sdg` namespace.
@javierm javierm changed the title Add SDG view Add SDG view with related content Dec 23, 2020
@javierm javierm moved this from Doing to Reviewing in Consul Democracy Dec 23, 2020
The same way it's done by the United Nations.
Using the `:only-child` selector we can adjust widths with CSS and don't
have to rely on methods calculating which features are available.
Using data-equalizer is always hard due to the JavaScript it uses, while
the flex layout works all the time.
They were all following the same format.

Note we need to group the `see_all` translation keys together (the same
way it's done with the `most_active` keys) so we don't have an unused
translation warning.

We're also moving the "see all" link in processes outside the feed
content; the same way it's done in debates and proposals and removing
unnecessary classes in the processes feed: the column class is causing
the processes not to be aligned with the debates above them, and the
margin bottom is not needed because the margin of the footer is already
enough.
We were having some style issues when adding the processes feed to the
goal view because of this lack of separation.

We're using a <section> tag so it's clear where the <header> tag belongs
to.
We were jumping from h1 to h3 and some of these sections (cards and
processes) had h3 tags inside them.

My best guess is we were using h3 so the titles were smaller. So I'm
adding a CSS mixin to easily use a font size of a different heading tag.
Note the link to see all processes does not filter by goal because the
legislation section does not have any search filters.
This is a scenario which will likely take place for at least some of the
goals.
Consul Democracy automation moved this from Reviewing to Testing Dec 28, 2020
@javierm javierm merged commit 73e6052 into master Dec 28, 2020
Consul Democracy automation moved this from Testing to Release 1.3.0 Dec 28, 2020
@javierm javierm deleted the sdg_view branch December 28, 2020 20:01
@javierm javierm mentioned this pull request Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SDG United Nations Sustainable Development Goals
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants