fix: case court report modal ui changes #6185
Draft
+80
−10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What github issue is this PR for, if any?
Resolves #5888, #6165
What changed, and why?
This PR changes the modal displayed at
/case_court_reports
by constraining the width of the select options seen when the modal is opened. Currently, if an option is long enough it will overflow through the side of the modal, after these changes it is truncated with ellipses. It also now displays an error message when a user tries to generate a report without first making a selection and clears the error when a selection is made or the modal is closed. Closing the modal will also reset the selected case.How is this tested? (please write tests!) 💖💪
Note: if you see a flake in your test build in github actions, please post in slack #casa "Flaky test: " :) 💪
Note: We love capybara tests! If you are writing both haml/js and ruby, please try to test your work with tests at every level including system tests like https://github.com/rubyforgood/casa/tree/main/spec/system
Screenshots please :)
Run your local server and take a screenshot of your work! Try to include the URL of the page as well as the contents of the page.
In a previous office hours session, @FireLemons and I discussed some of the issues referenced in this PR and he mentioned some UX improvements that could make sense for this modal as well. The main changes that were discussed included adding filters for volunteer name and transition status (
transitioned
,non-transitioned
, orboth
). I didn't include any of the changes in this PR, but could make a followup to address them.Feelings gif (optional)
What gif best describes your feeling working on this issue? https://giphy.com/
How to embed:
![alt text](https://media.giphy.com/media/1nP7ThJFes5pgXKUNf/giphy.gif)