martinberlin/cale-integrations

80/99 Make cale.es mobile friendly

Closed this issue · 3 comments

The site is not rendering correctly on mobile. Points of disonance start with:

  1. Top menu being bigger as 100% mobile screen (Tested with a Samsung S3)
  2. Admin backend also hard to use
  3. JSON config should appear on the top of the screen when you are on mobile so is easier to copy and paste to the CALE App without scrolling

Research: https://ourcodeworld.com/articles/read/432/how-to-detect-mobile-devices-in-symfony-3

INFO: First try to this Bundle and seems to be deprecated, at least with Symfony 4.4

!!  PHP Fatal error:  Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Too few arguments to function Symfony\Component\Config\Definition\Builder\TreeBuilder::__construct(), 0 passed in /var/www/cale.fasani.de/vendor/suncat/mobile-detect-bundle/SunCat/MobileDetectBundle/DependencyInjection/Configuration.php on line 32 and at least 1 expected in /var/www/cale.fasani.de/vendor/symfony/config/Definition/Builder/TreeBuilder.php:26

Maybe there is a smart way to avoid adding a Bundle just to detect mobile. There should be a way without adding a full library for this. Used lastly:

https://stackoverflow.com/a/37486785/3886804

Reduced images to width=100% in homepage.
Still needs work in the backend side. Some tables should have less columns if a mobile client is detected like:

  • Screen

  • Api

Works much better now. Still pending for the weekend to update:

  • User admin dashboard (Datatables width overflows screen)
  • Check rest of backend areas

It has been mostly addressed but there are parts that need more work, may reopen in the future