Recidiviz / justice-counts

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

[Agency Dashboard] Remove slug from published data url for agency dashboards #1443

Closed nichelle-hall closed 4 months ago

nichelle-hall commented 4 months ago

Description of the change

Updates URL for published_data so that the FE an correctly fetch data to render the dashboard pages. I tested this manually by deploying the changes to staging with the BE changes and visiting the dashboard for various agencies.

Related issues

Closes #1444

Checklists

Development

This box MUST be checked by the submitter prior to merging:

These boxes should be checked by the submitter prior to merging:

Code review

These boxes should be checked by reviewers prior to merging:

nichelle-hall commented 4 months ago

Awesome! Thank you for taking care of the FE, @nichelle-hall!

Small nit (b/c it doesn't affect the current functionality and things are working as expected) but we're still using the slug in the FE routing and navigation. We could clean this up by removing the slug from App.tsx routes, AgencyOverview.tsx (but, keeping the /${slugify(category)}), and Home.tsx in L70 (removing the /${encodeURI(agency.name)).

I thought about removing it... I thought that it looked good aesthetically to have the name there. But there is no reason for it...

I'll open up a follow-up PR to remove it + announce to CSG that there is a change.

@lilidworkin any opinions / vetos on this? ^^

lilidworkin commented 4 months ago

@nichelle-hall @mxosman I actually think it might be better to leave it in the URLs so we don't break the dashboards for CSG! I mean those dashboards are essentially deprecating now and I'm not sure if they are using them, but I don't see a reason to make the change.

nichelle-hall commented 4 months ago

Ok! Sounds good @lilidworkin. And that's a good point. The whole point of this change is to help deprecate the current dashboard.

mxosman commented 4 months ago

Oh yeah - great call on all fronts - nevermind my nit! Thank you both for your thoughts on this!