Skip to content

Conversation

jrjohnson
Copy link
Member

When All Schools is selected for a report add a school filter to the results so they can be refined.

Fixes ilios/ilios#4912

wip: I've only done competencies to validate the approach.

Copy link

netlify bot commented Mar 21, 2025

Deploy Preview for ilios-frontend ready!

Name Link
🔨 Latest commit 82e288f
🔍 Latest deploy log https://app.netlify.com/sites/ilios-frontend/deploys/67ddc48c3bf64f00085e2d34
😎 Deploy Preview https://deploy-preview-8462--ilios-frontend.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@jrjohnson
Copy link
Member Author

@dartajax please take a look at the subject competency report and see if this is the behavior you had in mind for this ticket. I'm not convinced we aren't better served by having users go back and choose a school to run the report on, but I imagine there are some users who want to toggle around. I'm ok either way, only competencies is done, but if it looks good to you let me know and I'll add this to the rest of the subject report types.

@dartajax
Copy link
Member

@dartajax please take a look at the subject competency report and see if this is the behavior you had in mind for this ticket. I'm not convinced we aren't better served by having users go back and choose a school to run the report on, but I imagine there are some users who want to toggle around. I'm ok either way, only competencies is done, but if it looks good to you let me know and I'll add this to the rest of the subject report types.

I guess the drop-down would appear only if someone happens to run a report with "All Schools" selected and results from more than one school displayed (this second part is preferred by me but not required by any means). The drop-down selection is not activated yet - doesn't do anything but I bet you knew that. Your logic of choosing a school to run the report on seems valid to me too. I am not against that either. However, functionality as described in the ticket (when drop-down appears not that it is active) seems fine.

@jrjohnson
Copy link
Member Author

Forgot it was slightly different, you can try out the fully functioning dropdown in a saved report. Doesn't work yet in the "run report" type.

@dartajax
Copy link
Member

dartajax commented Mar 21, 2025

Forgot it was slightly different, you can try out the fully functioning dropdown in a saved report. Doesn't work yet in the "run report" type.

That click event only runs the first time it is used - not click but select from drop-down using mouse. Also the count should update too.

It works from "All Schools >> Medicine" for example but not "Medicine (once selected) >> Pharmacy or any other switch" - Go back to "All Schools" to reset - should be able to switch schools and get the corresponding results and count.

When All Schools is selected for a report add a school filter to the
results so they can be refined.
@jrjohnson jrjohnson force-pushed the i4912-school-filter branch from 4378309 to 82e288f Compare March 21, 2025 19:56
@jrjohnson
Copy link
Member Author

Fixed the click event, good catch! Fixed the filter count. If only one school returns results the filter won't show up (hard to test without destroying the DB on competencies, but will work for other reports). If all this still looks good I'll start adding it everywhere else.

@dartajax dartajax added the run ui tests Run the expensive UI tests label Mar 26, 2025
@dartajax dartajax added run ui tests Run the expensive UI tests and removed Needs Team Discussion run ui tests Run the expensive UI tests labels Apr 4, 2025
@dartajax
Copy link
Member

dartajax commented Apr 4, 2025

I ran one for ...

All Competencies for 2024 - 2025 in All Schools

... where 2024 - 2025 was an academic year I selected - don't see the school filter there but I assume maybe because only one school was returned or that is out of scope for this PR is my other more likely assumption

@dartajax
Copy link
Member

dartajax commented Apr 4, 2025

oh yeah I guess we need to pre-pend the school for the output report of the one I specified above when acad year is selected - follow-up ticket possibly

Copy link
Member

@dartajax dartajax left a comment

Choose a reason for hiding this comment

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

It works for me on saved reports of the "All Schools" "Competencies" "Anything" report - newly generated reports show the drop-down but there is no functionality there - no prob since that is not supposed to work with the PR I assume - also if a specific academic year is selected, the filters don't appear - again out of scope for this PR - so all good on what was specified at the beginning of this now lengthy comment.

@jrjohnson jrjohnson removed the run ui tests Run the expensive UI tests label Apr 4, 2025
@dartajax dartajax removed their assignment Apr 10, 2025
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.

If All Schools Report Is Run, Provide a Drop-down to Select School
2 participants