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
[UI:Mobile] Add mobile screen view for the grade-report page #5409
Conversation
Add smaller screens view fix line break in buttons
Codecov Report
@@ Coverage Diff @@
## master #5409 +/- ##
============================================
- Coverage 20.87% 20.86% -0.01%
Complexity 5945 5945
============================================
Files 147 147
Lines 19271 19272 +1
============================================
Hits 4022 4022
- Misses 15249 15250 +1
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mobile view should look similar to the desktop view so I think the border boxes should be removed. Take a look at how the course settings page looks similar to the desktop view but with a few small changes to fit on mobile displays. We probably don't need any border but you can use the <hr>
delimiter instead
Add the line $this->core->getOutput()->enableMobileViewport();
to the report controller under showReportPage
to enable media queries based on display size
A bigger issue is that we should be writing mobile-first CSS this means if we're adding new CSS the display page should be first programmed to render on mobile screens and media queries should be used after to target desktop and tablet views.
https://zellwk.com/blog/how-to-write-mobile-first-css/
Take a look at navigation.css and the navigation page to see how this done. On that note try and reuse CSS that is defined everywhere like in server.css before writing more.
Done for this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check if the PR fulfills these requirements:
What is the current behavior?
Currenlty the page layout breaks on smaller screen devices...
What is the new behavior?
Added responsiveness and now the page looks like this
Other information?
Involves a little code refactoring also as I scrapped out the table layout plus inline styling in the report page and created a different CSS file for styling.