julkascript / cardflow

The open-source Trading Card Game market
MIT License
10 stars 4 forks source link

Implement a mobile search field #91

Closed RyotaMitaraiWeb closed 2 months ago

RyotaMitaraiWeb commented 2 months ago

This PR is part of my efforts to implement some of the mobile Figma wireframes. This PR focuses on the search field. Review the UI

There are some major refactors / design changes:

The mobile search field consists of components separate from the desktop one's, as trying to maintain a single component that reflects both is very hard without breaking the desktop variant's design or writing very messy code (since the desktop search field overrides some of MUI's default stylings to achieve its design, which makes it harder to write responsive code). Also, the mobile search is implemented as a dialog, meaning that there is a backdrop when opened. I have opted for this approach because it better redirects the user's focus to the search field and makes it easier to locate the field itself.

Note: for the search results, the user may have to scroll slightly to the right to see the full name if the screen is particularly small (something like ~330px width) and the name is particularly long. I haven't addressed it, as it's not an issue on even modestly bigger resolutions and the overflow is minor at best anyways.

Let me know if there are any issues

julkascript commented 2 months ago

Looks and feels good. However, on devices with width less than 650, the search tends to go way too much to the middle. I think some mobile users may not have such a solid experience.

image image

RyotaMitaraiWeb commented 2 months ago

The issue comes from the fact that the home page is overflowing in that viewport. If you test the field on a page that doesn't overflow (like the Login page), the button is rendered correctly.

My next PR will address this (+ a few other pages)

julkascript commented 2 months ago

oh yes, correct, nvm