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

[Street Manager] Only activate asset layer when starting report #5329

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

davea
Copy link
Member

@davea davea commented Jan 15, 2025

Previously all map pans on /around were hitting the Street Manager API unnecessarily.

WIP - /report/new is broken at the very least, probably others.

[skip changelog]

For https://github.com/mysociety/societyworks/issues/4728

Copy link

codecov bot commented Jan 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.44%. Comparing base (1e500b4) to head (816de34).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5329   +/-   ##
=======================================
  Coverage   82.44%   82.44%           
=======================================
  Files         416      416           
  Lines       32912    32920    +8     
  Branches     5281     5281           
=======================================
+ Hits        27133    27141    +8     
  Misses       4219     4219           
  Partials     1560     1560           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dracos dracos force-pushed the street-manager-optimisation branch from 8c93865 to df4667f Compare January 16, 2025 17:30
Previously all map pans on /around were hitting
the Street Manager API unnecessarily.
@dracos dracos force-pushed the street-manager-optimisation branch from df4667f to 816de34 Compare January 16, 2025 17:44
@dracos dracos marked this pull request as ready for review January 16, 2025 17:44
@dracos
Copy link
Member

dracos commented Jan 16, 2025

@davea I've added empty asset_category so relevant() doesn't error at the start and never passes (so tests should be okay now), moved your code into a roadworks function, added setting always_visible in ther eso it (should?) stay on, and added an onload check if the page is new, to activate it then. Let me know if it works for you.

@davea
Copy link
Member Author

davea commented Jan 16, 2025

Lovely, thanks. Looks good here.

@dracos dracos merged commit 816de34 into master Jan 17, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants