Feature/menu cart ux refinement#450
Open
saidai-bhuvanesh wants to merge 6 commits into
Open
Conversation
added 6 commits
June 3, 2026 15:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Description
PR Title: [UX] Critical Menu Experience & Cart UX Refinement
📝 Overview
This pull request focuses on optimizing the core food ordering experience of ChaatBazaar. It resolves a layout rendering bug where duplicated card footers were rendered, fixes a runtime crash during cart item removals, introduces silent quantity updates inside the cart drawer sidebar, and improves touch target accessibility dimensions on mobile viewports.
🛠️ Key Changes
Unified Menu Card Footer Layout
Cleaned up createCard inside
js/main.js
to resolve a merge issue that rendered two separate footers and add-to-cart buttons.
Refactored the price section to conditionally render original prices and discount percentage badges only if the item has an active discount (originalPrice > price), avoiding empty badge borders.
Fixed removeFromCart Runtime Crash
Removed duplicate const removedItem declarations in the same scope inside
js/main.js
that triggered runtime exceptions and blocked cart item decrements.
Cleanly wired the function to call cartManager.decreaseQuantity and trigger UI updates.
Silent Drawer Quantity Adjustments
Upgraded addToCart with a conditional showFeedback flag.
Click handlers on quantity control buttons inside the cart drawer now update item counts silently without spamming repetitive toast alert notifications. Menu page clicks continue to show notifications as normal.
WCAG-Compliant Touch Targets (44px)
Styled .qty-controls button inside
css/style.css
to have a minimum target footprint of 44px by 44px with flexible item alignment.
Added interactive scale(0.92) micro-interactions on hover and click states.
Voice Search Code Quality Restoration
Extracted pre-existing, garbled speech recognition and search input listeners inside the init() function into a clean helper method setupVoiceSearch().



📷 Visual Previews (After Changes)