Skip to content

fix(pos): drop icons from Dine In and Online order-type buttons - #727

Merged
itsbkm merged 2 commits into
mainfrom
fix/order-type-button-labels
Sep 11, 2026
Merged

itsbkm merged 2 commits into
mainfrom
fix/order-type-button-labels

Conversation

@itsbkm

@itsbkm itsbkm commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Remove the icon from the Dine In and Online buttons in the POS cart panel's order-type toggle, keeping icons on Takeaway and Delivery.
  • Add whitespace-nowrap so each label renders on a single line instead of wrapping.

Test plan

  • npm run lint — no new warnings/errors
  • Manual code review of the conditional icon rendering

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Style
    • Updated order-type button spacing and horizontal padding.
    • Icons remain visible for takeaway and delivery options; dine-in and online options display without icons.

Icon + label was wrapping onto two lines in the narrow order-type
toggle; dropping the icon and adding whitespace-nowrap keeps each
label on a single line.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Warning

Review limit reached

Next included review available in 51 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: b99e7775-efaa-49b7-8f6b-4a1de92b6872

📥 Commits

Reviewing files that changed from the base of the PR and between 349ac95 and d25c703.

📒 Files selected for processing (1)
  • frontend/src/components/pos/CartPanel.tsx

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 3668b8a0-0d95-4d8b-a8fe-070b3130feb9

📥 Commits

Reviewing files that changed from the base of the PR and between ea01bf3 and 349ac95.

📒 Files selected for processing (1)
  • frontend/src/components/pos/CartPanel.tsx

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The order-type selector now hides icons for dine_in and online. It keeps icons for takeaway and delivery. Buttons also use a flex gap and horizontal padding.

Changes

Order-type presentation

Layer / File(s) Summary
Order-type button rendering
frontend/src/components/pos/CartPanel.tsx
The selector computes showIcon for each order type. Icons render only for takeaway and delivery. Buttons use gap-1 and px-2 with whitespace-nowrap.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 349ac

The presentation-only update has no unresolved material production risk.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description includes a relevant summary and test plan, but it omits most required template sections, including Related work, Scope, Verification results, Compatibility & data safety, Screenshots, … Update the description to include all required template sections. State the related issue or None, define the scope, document the exact verification commands and results, describe compatibility and data impact, add screenshots if applicable…
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: removing icons from the Dine In and Online POS order-type buttons.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description includes a relevant summary and test plan, but it omits most required template sections, including Related work, Scope, Verification results, Compatibility & data safety, Screenshots, and the Contributor checklist.

Resolution

Update the description to include all required template sections. State the related issue or None, define the scope, document the exact verification commands and results, describe compatibility and data impact, add screenshots if applicable, and complete the Contributor checklist.

✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/order-type-button-labels

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

The follow-up narrows whitespace-nowrap to the Dine In and Online buttons while continuing to hide their icons.

  • Takeaway and Delivery labels may now wrap.
  • Dine In and Online labels remain constrained to one line.
  • No new security concerns were identified.

Confidence Score: 4/5

The PR is not yet safe to merge because localized Dine In and Online labels can still overflow the fixed-width order-type control.

The previous finding is only partially fixed: Takeaway and Delivery may wrap now, but whitespace-nowrap remains on Dine In and Online, including the previously identified long Turkish Online label, so the fixed-width layout can still overflow.

Files Needing Attention: frontend/src/components/pos/CartPanel.tsx

Important Files Changed

Filename Overview
frontend/src/components/pos/CartPanel.tsx Conditionally removes icons and limits no-wrap styling to Dine In and Online; the previous localization overflow finding remains partially unfixed.

Reviews (2): Last reviewed commit: "fix(pos): scope whitespace-nowrap to ico..." | Re-trigger Greptile

Applying it to every button could overflow the fixed-width toggle for
longer translated Takeaway/Delivery labels (e.g. German "Zum
Mitnehmen") since those buttons keep their icon and still need to wrap.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@itsbkm

itsbkm commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

Fixed: scoped whitespace-nowrap to only the icon-less Dine In / Online buttons so Takeaway/Delivery (which keep their icon) can still wrap for longer translated labels. See d25c703.

@itsbkm
itsbkm merged commit e3c2c8b into main Sep 11, 2026
15 checks passed
@itsbkm
itsbkm deleted the fix/order-type-button-labels branch September 11, 2026 21:28
@itoqa

itoqa Bot commented Sep 11, 2026

Copy link
Copy Markdown

Ito QA test results
Commit: d25c703: 9 test cases ran, 9 passed ✅.

Summary

Coverage spans the POS order-type lifecycle: selecting each service mode, showing only its relevant fields, clearing incompatible delivery or online details during transitions, and preserving online order information through payment. It also checks rapid switching plus desktop, mobile, and translated-label presentation, covering both happy-path business behavior and responsive UI edge cases.

Safe to merge — the exercised order-type flows, state isolation, order metadata retention, and responsive presentation all passed with no PR-attributable regressions or unresolved failures. No merge blocker was identified.

Tests run by Ito

View full run

Result Severity Type Description
✅ — General After entering a delivery address and switching to Online and then Takeaway, the address disappeared and the takeaway checkout showed no delivery fields.
✅ — General After online details were entered, switching to Delivery showed only the delivery address and the checkout identified a delivery order without online-only details.
✅ — General After entering delivery details and quickly switching from Online to Takeaway, Takeaway was the only selected option. Delivery and Online controls stayed hidden, and checkout opened as a takeaway order.
✅ — Rev The completed order stayed marked as Online and kept both the Swiggy platform and REV6-ONLINE-001 reference after payment.
✅ — Select Each order type became active when selected and showed only its matching controls. Takeaway ended active with the other order-type controls hidden.
✅ — Tenant The restaurant POS showed Dine in, Takeaway, Delivery, and Online. Clicking Dine in selected it successfully.
✅ — Toggle The POS cart showed all four order types. Dine in and Online had no icons and stayed on one line, while Takeaway and Delivery kept their icons.
✅ — Toggle The Dine in and Online buttons show their translated labels on one line without icons.
✅ — Toggle The mobile cart drawer shows Dine in and Online without icons and keeps both labels on one line. Takeaway and Delivery keep their icons and can still wrap when needed.

Tip

Reply with @itoqa to send us feedback on this test run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant