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

[Publisher][Superagencies] Add dropdown for child agencies to Set Up Metrics page #1295

Merged
merged 7 commits into from
Apr 24, 2024

Conversation

nasaownsky
Copy link
Collaborator

Description of the change

  1. Added dropdown UI for child agencies to Set Up Metrics page

Type of change

All pull requests must have at least one of the following labels applied (otherwise the PR will fail):

Label Description
Type: Bug non-breaking change that fixes an issue
Type: Feature non-breaking change that adds functionality
Type: Breaking Change fix or feature that would cause existing functionality to not work as expected
Type: Non-breaking refactor change addresses some tech debt item or prepares for a later change, but does not change functionality
Type: Configuration Change adjusts configuration to achieve some end related to functionality, development, performance, or security
Type: Dependency Upgrade upgrades a project dependency - these changes are not included in release notes

Related issues

closes #1275

Checklists

Development

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

  • Double- and triple-checked that there is no Personally Identifiable Information (PII) being mistakenly added in this pull request

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

  • Tests have been written to cover the code changed/added as part of this pull request

Code review

These boxes should be checked by reviewers prior to merging:

  • This pull request has a descriptive title and information useful to a reviewer
  • This pull request has been moved out of a Draft state, has no "Work In Progress" label, and has assigned reviewers
  • Potential security implications or infrastructural changes have been considered, if relevant

@nasaownsky
Copy link
Collaborator Author

Hello @mxosman!

So, the task says:

  1. The dropdown should only appear if the current agency is a superagency, and it should be populated with that agency's child agencies in alphabetical order. It should also be searchable.
  1. When the user selects a child agencies, the page should behave similar to what would happen if the user had used the menu in the top left to switch to that child agency (but only this page is refreshed).

As I understand this when we select child agency from this new dropdown we should be delivered to Set Up Metric page of selected child agency, but this contradicts the first requirement since the page we will go to wouldn't have dropdown. Or should we not display dropdown after transition to new page? I'm a little bit confused here, so any clarifications would be very helpful, thank you!

@mxosman
Copy link
Contributor

mxosman commented Apr 10, 2024

Hello @mxosman!

So, the task says:

  1. The dropdown should only appear if the current agency is a superagency, and it should be populated with that agency's child agencies in alphabetical order. It should also be searchable.
  1. When the user selects a child agencies, the page should behave similar to what would happen if the user had used the menu in the top left to switch to that child agency (but only this page is refreshed).

As I understand this when we select child agency from this new dropdown we should be delivered to Set Up Metric page of selected child agency, but this contradicts the first requirement since the page we will go to wouldn't have dropdown. Or should we not display dropdown after transition to new page? I'm a little bit confused here, so any clarifications would be very helpful, thank you!

Hi @nasaownsky! Ah - sorry for the confusion. So, I think the idea is that the dropdown persists the whole time. If we are logged into a superagency and go to the Set Up Metrics page, choosing a child agency should keep you on the same page - just viewing the child agency list of metrics (please correct me if I'm wrong @lilidworkin). Though, this does complicate things as you go past the overview page and try to set metrics for the child agencies...

Hmm... just thinking out loud, what if we switch to the child agency after choosing from the dropdown and keep the dropdown visible for the child agency if the user also has access to the superagency? What are your thoughts on that Ilya & @lilidworkin?

@lilidworkin
Copy link
Collaborator

@nasaownsky @mxosman yea this was an oversight on my end -- we should show the dropdown for both superagencies and child agencies! I think that should take care of it. So yea @mxosman basically your second paragraph.

…to nasaownsky/1275-child-agencies-dropdown
@nasaownsky nasaownsky changed the base branch from nasaownsky/1274-child-agencies-persistence to main April 19, 2024 11:46
@nasaownsky
Copy link
Collaborator Author

Hi @mxosman! What do you think about my latest changes? Any ideas to iterate this further?

Also what about this last paragraph from task description?

If the child agencies differ in the systems they belong to -- for instance if some of the child agencies belong to Law Enforcement and some to Courts -- we want to add sections to the dropdown and group the child agencies by which systems they belong to. They should be sorted alphabetically within each section. Reach out to @mxosman and @forrestkim00 when you get to this part for more clarity!

@mxosman
Copy link
Contributor

mxosman commented Apr 19, 2024

Hi @mxosman! What do you think about my latest changes? Any ideas to iterate this further?

This is feeling great! One small request after playing around with it - if I'm switched to the child agency, I lose my reference to the superagency, so I have to go back to the search menu.

Can the dropdown include the superagency when you switch to a child agency? We can update the copy for the search based on whether or not it's a superagency (if we're in a child agency, we can say "Search for agency" instead) - and even add a "(Superagency)" to the label. Let me know if that feels too weird, Ilya & Lili - I just craved being able to go back to the Superagency after clicking away.

@mxosman
Copy link
Contributor

mxosman commented Apr 19, 2024

Also what about this last paragraph from task description?

If the child agencies differ in the systems they belong to -- for instance if some of the child agencies belong to Law Enforcement and some to Courts -- we want to add sections to the dropdown and group the child agencies by which systems they belong to. They should be sorted alphabetically within each section. Reach out to @mxosman and @forrestkim00 when you get to this part for more clarity!

You can skip this part, @nasaownsky! I'll write up a separate task for it, but it's not blocking for this. It's basically adding groupings to the dropdown, so if a Superagency has a bunch of child agencies, and each child agency has a different sector, the dropdown would group them by sector - so you'd see

Dropdown
Law Enforcement (non-clickable group header)
Child Agency 1
Child Agency 2
Prisons (non-clickable group header)
Child Agency 3
Child Agency 4

We may need help from @forrestkim00 regarding how the groupings should look and solve for something @lilidworkin thought of - child agencies belonging to multiple sectors. Anyway - all this to say that no action needed on this part of the task at this time!

@nasaownsky nasaownsky marked this pull request as ready for review April 22, 2024 08:06
@nasaownsky
Copy link
Collaborator Author

@mxosman Please, check my changes and let me know your thoughts about it!

@lilidworkin
Copy link
Collaborator

Can the dropdown include the superagency when you switch to a child agency? We can update the copy for the search based on whether or not it's a superagency (if we're in a child agency, we can say "Search for agency" instead) - and even add a "(Superagency)" to the label.

I love that idea @mxosman !

You can skip this part, @nasaownsky! I'll write up a separate task for it, but it's not blocking for this.

+1 to this, sorry for the confusion! @mxosman lmk if you want me to take a look after you write up the task. Might be a good candidate for Cory actually.

Copy link
Contributor

@mxosman mxosman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks and works great to me, @nasaownsky! Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Superagencies][2/n] Add toggle for child agencies in Set Up Metrics
3 participants