icssc / peterportal-client

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

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

Closed Awesome-E closed 6 months ago

Awesome-E commented 7 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 7 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.