Skip to content

refactor: Report improvements

Fox Piacenti requested to merge fox/report-improvements into master

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

Dependencies

None or link it here.

Visual changes

Before:

image image image

After:

image image image

Testing instructions

Step by step procedure

  1. Start with the master branch
  2. Create a team with several members
  3. Create a checklist definition with a rating task
  4. Create a recurrence with a few seconds between runs and let them run a few times
  5. Answer the rating tasks with a few of the users, over a handful of the recurrences
  6. 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')
  7. Check the charts. Notice that the trends chart is showing the direction opposite from what would expect with ltr languages.
  8. Also notice that the bar chart heights are absolute with regards to full percentage, making relative comparison difficult
  9. add &lng=ar to the URL and refresh
  10. Notice that the line chart does not change horizontal orientation as you would expect for an rtl language
  11. Check out the new branch
  12. Notice that the line chart has the correct direction for an rtl language
  13. Notice that the bar chart heights are now relative
  14. Switch back to English with lng=en
  15. Verify that the charts have the correct orientation for an ltr language
  16. Go back to the checklist listing
  17. Verify that 'past due' or other status badges no longer line break.
Edited by Fox Piacenti

Merge request reports