Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a lot of UI issues on Guest home page #124

Merged
merged 40 commits into from
Nov 1, 2023
Merged

Fix a lot of UI issues on Guest home page #124

merged 40 commits into from
Nov 1, 2023

Conversation

tien-thanh-hua
Copy link
Collaborator

@tien-thanh-hua tien-thanh-hua commented Nov 1, 2023

I wanna sleep and there are way too many things to describe, so I'll just put up screenshots instead. Also, screw merge conflicts I'll fix them later

Q: Where is the "Best-Selling Food" section?
A: Will be worked on after this.

Q: Both Google sign-up and sign-in buttons are not responsive!
A: It's Google's fault for not allowing relative units for width attributes. Fixing it using JS is possible, but it takes valuable time. Time that should be used for other important issues.

A picture is worth 1024 words 😃

image

image

image

image

image

image

image

image

To free space on main navbar + less visual confusion for users who want to focus on main page functions such as food search, checking cart, login.
Also change how cart badge selection works to support multiple instances of cart badges instead of 1 (ideally there is one for <1024px and 1 for larger screens).
- Add scroll to results after performing a keyword search
- Fix "Show more" button showing all food items instead of 12 per click
Searching now visually removes the active state of the selected food category button prior to the search event.
Also fix potential cart badge visual bugs
I had to revert the earlier db6d0e3 commit because it inherently broke all modals when opened from an opened modal (I don't know why).

Of course, this also reverted my previous fix for the language dropdown not opening for the first click. Between the two problems however, obviously not being able to recover passwords and/or creating an account is far more serious.
Who could have thought a "show" class could do so much harm?

Also fix the language button on small screens not being visually updated on translated pages.
There is a weird issue with One Tap: it still pops up even after successful login. Thankfully, it has a skip option (that only supports cookies however). As such I decided to make the default login option to use cookies instead of session (user can still choose whether to use either)
Add translation exception to "FFood"
Adding "notranslate" class to the button element itself will also disable translation for the button tooltip. That means the tooltip will display "Ngôn ngữ" regardless of selected language.

Instead, I add notranslate to individual dropdown items.
...kinda, because somehow you can still do so after the first failed dragging attempt. At least the drag "preview" effect doesn't look as visible as the original effect.
- Align buttons to the actual category cards, not the entire carousel container (not 100% accurate, but looks acceptable)
- Fix buttons' erratic behavior on large (992px < width < 1200px) sizes
- Hide buttons on <576px width (users will have to swipe fingers)
- Fix carousel not swipe-able unless user clicks its buttons at least once
@tien-thanh-hua tien-thanh-hua self-assigned this Nov 1, 2023
@tien-thanh-hua tien-thanh-hua added bug Something isn't working enhancement New feature or request frontend very high priority Your project depends on it urgent Fix this ASAP labels Nov 1, 2023
@tien-thanh-hua tien-thanh-hua added this to the Guest milestone Nov 1, 2023
@khengyun khengyun merged commit f39d2ad into main Nov 1, 2023
1 check failed
@khengyun khengyun deleted the fix/guest/home-ui branch November 1, 2023 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request frontend urgent Fix this ASAP very high priority Your project depends on it
Projects
Status: Done
2 participants