-
Notifications
You must be signed in to change notification settings - Fork 2
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
Display local council boundaries and add some basic council data #506
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #506 +/- ##
==========================================
- Coverage 82.50% 82.11% -0.39%
==========================================
Files 104 105 +1
Lines 3440 3483 +43
Branches 347 359 +12
==========================================
+ Hits 2838 2860 +22
- Misses 515 532 +17
- Partials 87 91 +4 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, Area page and Explore page both work for councils 👍
Have suggested a few improvements.
@@ -120,9 +120,11 @@ <h3 class="h5"><a href="{% url 'area' area_type=overlap_constituency.old_area.ar | |||
</a> | |||
</li> | |||
{% endif %} | |||
{% if is_westminster_cons %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice if this was two-space indented, like the conditional above ;-)
(I try to always do this inside Django templates, as per the "suggestion" in https://pages.mysociety.org/coding-standards.html)
0d146c4
to
165bd4d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good 👍 Two small things:
There’s too much vertical space above the public opinion section, on council area pages, because the (empty) MP section is still there in the markup. Any way we could skip printing that section entirely, if we’re on a council page?
And is there any way we can get a filter in the DataSet admin, to filter by council type(s)?
00793df
to
06ec6ad
Compare
Corrects headers according to what's displayed. Sorts by Council or Constituency name as appropriate. Make sure GSS codes can be displayed for councils.
There is no point repeating the dataset’s label in its description. If the import script does not set a description, the dataset shouldn’t have one.
Fixes #504. AreaSearchView no longer artificially limits results to WMC area_types, and area_search.html presents matching areas grouped by area_type. I’ve gone with a custom `grid` layout on the area_search.html (rather than Bootstrap columns) to more gracefully handle a variable number of columns – there might be 1, 2, or 3, depending on the search input. I also fixed a bug in the `highlight` filter, which raised a TypeError when passed a None `search` parameter. `search` is None when the user has used geolocation rather than submitting a search term.
-"select button" display the area name + description. -"select button" Opens a modal displaying the area option with an description for each one of them. -Button content is updated when user selects an option.
This prevents “MP” showing as an always-empty column when you’re exploring by local authority. I implemented this as an `areaTypeHasMP()` method, because `selectableDatasets`` changes when you enter search text, and I don’t want all of the columns to appear/disappear as you search. While I was there, I also took the opportunity to refactor the four separate “Loading datasets…” status messages into a single, centred one.
use a lookup for the cons column if present
move range display into include allow a range related dataset for datasets
This is mostly for launch day
Not clear why it was ever using file.get to set the area type as it's never had an area_type key. Changed to using the area_type of the importer as that's the correct thing.
f0e8006
to
f983cff
Compare
This adds local council boundaries to the map along with imports for the population and the type so there is some data there. It also makes minimal changes to the area page for local councils.