Recidiviz / justice-counts

Technical infrastructure for the Justice Counts initiative
GNU General Public License v3.0
2 stars 0 forks source link

Persist current metric after switching to a different child agency via the dropdown #1332

Closed lilidworkin closed 5 months ago

lilidworkin commented 6 months ago

With the new drop down for superagencies in Explore Data, would it be possible for the metric that is currently viewed to be the same metric viewed when you switch between child agencies?

nichelle-hall commented 6 months ago

@mxosman to you for now!

nasaownsky commented 6 months ago

Hi @lilidworkin! So I've looked through current functionality and codebase, and my question is: could you please be more specific with this task? I'm a little bit rusty with this project after switching to Insights and back again, and not exactly understand what's needed to be done here. Persist metric in what form? Like stay on the same page after switching? Or store previous metric somewhere? Thank you very much in advance!

lilidworkin commented 6 months ago

Of course, always please feel free to ask for more clarification @nasaownsky . I know it must be hard switching between these projects!

Actually now that I look into it, I'm not exactly sure what the idea was here :) Let me look into it and get back to you!

lilidworkin commented 6 months ago

Okay @nasaownsky actually ignore that comment above (just deleted it) -- it's simpler than that. The idea is if you are using the dropdown to switch between child agencies in the same sector, then we should stay on the same metric. So for example, if you are on Child Agency A, viewing the Arrests metric in the Law Enforcement sector, and you switch to Child Agency B, which also belongs to the Law Enforcement sector, then redirect to the page for the Law Enforcement Arrests metric for that agency.

For instance, if we are here, on Child Agency AAB Delete, on Law Enforcement Expenses metric, and we use the dropdown to switch to AABB Delete, we should switch to the Law Enforcement Expenses page for that agency, i.e. here.

Let me and @mxosman know if that makes sense!

mxosman commented 6 months ago

Hi all! Thank you for the quick follow up, Lili! Hope you're taking it easy on yourself with the switching back and forth, @nasaownsky! I'm happy to help clarify further and help you ramp back up in any way I can!