refactor: Report improvements
This MR:
- Fixes reports to have proper ltr and rtl support #69 (closed)
- Fixes an issue where the trends graph shows newest items on the left instead of the right
- Makes the heights of responses to the rating query relative, more like Google Forms does #63 (closed)
- Fixes the display of status badges so they don't break on mobile devices
- Refactors the placement of factories on the backend
- Refactors test handling on the frontend
- Establishes an initial minimum coverage rating (to be raised on each subsequent MR)
- Adds several testing utilities
- Fixes an HTML syntax error in the checklist table
- Moves react-scripts to the dev dependencies so that
npm audit --production
will show only real potential vulnerabilities.
Supporting information
- Jira ticket: https://tasks.opencraft.com/browse/STAR-2865
- GitLab issue: #69 (closed) #63 (closed)
Dependencies
None or link it here.
Visual changes
Before:
After:
Testing instructions
Step by step procedure
- Start with the master branch
- Create a team with several members
- Create a checklist definition with a rating task
- Create a recurrence with a few seconds between runs and let them run a few times
- Answer the rating tasks with a few of the users, over a handful of the recurrences
- Use the responsive design mode in your browser to see the checklist listing very tiny and notice the statuses line break (for example, 'past due')
- Check the charts. Notice that the trends chart is showing the direction opposite from what would expect with ltr languages.
- Also notice that the bar chart heights are absolute with regards to full percentage, making relative comparison difficult
- add
&lng=ar
to the URL and refresh - Notice that the line chart does not change horizontal orientation as you would expect for an rtl language
- Check out the new branch
- Notice that the line chart has the correct direction for an rtl language
- Notice that the bar chart heights are now relative
- Switch back to English with
lng=en
- Verify that the charts have the correct orientation for an ltr language
- Go back to the checklist listing
- Verify that 'past due' or other status badges no longer line break.
Edited by Fox Piacenti