oracc / oracc-search-front-end

1 stars 1 forks source link

removed duplicate routes #36

Closed jhughes982 closed 2 years ago

jhughes982 commented 2 years ago
jhughes982 commented 2 years ago

Seems good.

I've found the search button doesn't seem to work when switching on responsive mode locally, but it works fine if the page is originally loaded as mobile (and this problem also happened in the previous version). I'm assuming this is a quirk of simulating the mobile version in the browser rather than a problem with the routes.

Yes, this is an issue with the way that the app detects mobile vs. desktop routes. It requires JS logic to detect the viewport width requiring a refresh to check if the width has changed. This would definitely be something I'd want to improve in the future, aiming to use CSS media queries to alter the look of the app depending on viewport width changes. This approach would be more responsive and would not require a refresh when changing the screen size on the fly.

Edit: To clarify, the issue is a mixture of the way the routes have been set up plus the use of JS logic to detect the screen width. So fixing this would require altering both the route logic and the width detection logic in multiple components.