icssc / peterportal-client

A web application to aid UCI students with course discovery and planning.
https://peterportal.org
MIT License
16 stars 14 forks source link

Small screen layouts should not be exclusive to touch-first (mobile) devices #422

Closed Awesome-E closed 9 months ago

Awesome-E commented 9 months ago

Use case: opening a split view window on desktop, I would much rather have the mobile layout than this. I think we should be using CSS media queries rather than just checking what device type the client is on when the page first loads.

image

(steps to reproduce is same as the use case)

js0mmer commented 9 months ago

We should do away with the react-device-detect library and use an alternative that offers media query hooks for components that are conditionally rendered for mobile/desktop. This will allow re-rendering when the screen size hits a certain threshold. The developers of react-device-detect mention some themselves in their README.