fix(a2ui-playground): bump preview QR code size to 128px#2704
Conversation
The web/native preview QR codes were 80px on a side. For known-demo URLs (~100-120 chars, QR version 5-6, ~40x40 modules) each module rendered at only ~2px, right at the lower bound of phone camera scanning. Bumping to 128px gives ~3px per module, much more reliable to scan, and since `.previewQrContent` uses align-items: center the row naturally grows with the QR so multi-line text blocks no longer look cramped.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughQR presentation changes: the preview panel now renders QR codes at 128px and the QR section CSS uses a column flex layout with gap, plus a responsive min-height adjustment on the panel body. ChangesPreview QR changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Pull request overview
This PR increases the A2UI playground preview QR code render size to improve phone-camera scannability for Web and Native preview URLs.
Changes:
- Updates preview QR codes from 80px to 128px.
- Leaves the existing QR generation settings unchanged.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
React Example#8701 Bundle Size — 238KiB (0%).694e452(current) vs 735f695 main#8687(baseline) Bundle metrics
|
| Current #8701 |
Baseline #8687 |
|
|---|---|---|
0B |
0B |
|
0B |
0B |
|
0% |
0% |
|
0 |
0 |
|
4 |
4 |
|
204 |
204 |
|
81 |
81 |
|
44.59% |
44.59% |
|
2 |
2 |
|
0 |
0 |
Bundle size by type no changes
| Current #8701 |
Baseline #8687 |
|
|---|---|---|
145.76KiB |
145.76KiB |
|
92.24KiB |
92.24KiB |
Bundle analysis report Branch Huxpro:Huxpro/a2ui-playground-im... Project dashboard
Generated by RelativeCI Documentation Report issue
Web Explorer#10277 Bundle Size — 903.53KiB (0%).694e452(current) vs 735f695 main#10264(baseline) Bundle metrics
|
| Current #10277 |
Baseline #10264 |
|
|---|---|---|
45.06KiB |
45.06KiB |
|
2.22KiB |
2.22KiB |
|
0% |
0% |
|
9 |
9 |
|
11 |
11 |
|
231 |
231 |
|
11 |
11 |
|
27.12% |
27.12% |
|
10 |
10 |
|
0 |
0 |
Bundle size by type no changes
| Current #10277 |
Baseline #10264 |
|
|---|---|---|
499.15KiB |
499.15KiB |
|
402.16KiB |
402.16KiB |
|
2.22KiB |
2.22KiB |
Bundle analysis report Branch Huxpro:Huxpro/a2ui-playground-im... Project dashboard
Generated by RelativeCI Documentation Report issue
React Example with Element Template#969 Bundle Size — 204.36KiB (0%).694e452(current) vs 735f695 main#956(baseline) Bundle metrics
|
| Current #969 |
Baseline #956 |
|
|---|---|---|
0B |
0B |
|
0B |
0B |
|
0% |
0% |
|
0 |
0 |
|
4 |
4 |
|
124 |
124 |
|
50 |
50 |
|
45.19% |
45.19% |
|
2 |
2 |
|
0 |
0 |
Bundle size by type no changes
| Current #969 |
Baseline #956 |
|
|---|---|---|
145.76KiB |
145.76KiB |
|
58.61KiB |
58.61KiB |
Bundle analysis report Branch Huxpro:Huxpro/a2ui-playground-im... Project dashboard
Generated by RelativeCI Documentation Report issue
The 128px QR bump in 8a328a0 overflowed `.previewQrSection`, which had `max-height: 132px` (120px on <=980px viewports) with `overflow-y: auto`. With ~20px of vertical padding, that left only ~112px for the QR — so the 128px image triggered a vertical scroll instead of letting the row grow. Removing the cap (and the now-unused `overflow-y: auto`) lets the section size to its content. `.previewPanelBody` already has `flex: 1; min-height: 0`, so the iframe area absorbs the extra height without breaking the column layout.
Merging this PR will degrade performance by 14.31%
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
React MTF Example#1835 Bundle Size — 208.94KiB (0%).694e452(current) vs 735f695 main#1821(baseline) Bundle metrics
|
| Current #1835 |
Baseline #1821 |
|
|---|---|---|
0B |
0B |
|
0B |
0B |
|
0% |
0% |
|
0 |
0 |
|
3 |
3 |
|
199 |
199 |
|
78 |
78 |
|
44.08% |
44.08% |
|
2 |
2 |
|
0 |
0 |
Bundle size by type no changes
| Current #1835 |
Baseline #1821 |
|
|---|---|---|
111.23KiB |
111.23KiB |
|
97.71KiB |
97.71KiB |
Bundle analysis report Branch Huxpro:Huxpro/a2ui-playground-im... Project dashboard
Generated by RelativeCI Documentation Report issue
React External#1816 Bundle Size — 699.5KiB (0%).694e452(current) vs 735f695 main#1803(baseline) Bundle metrics
|
| Current #1816 |
Baseline #1803 |
|
|---|---|---|
0B |
0B |
|
0B |
0B |
|
0% |
0% |
|
0 |
0 |
|
3 |
3 |
|
17 |
17 |
|
5 |
5 |
|
7.13% |
7.13% |
|
0 |
0 |
|
0 |
0 |
Bundle analysis report Branch Huxpro:Huxpro/a2ui-playground-im... Project dashboard
Generated by RelativeCI Documentation Report issue
Summary
Bumps the Web/Native preview QR codes in the A2UI playground from 80px to 128px so they're actually scannable from a phone camera.
For known-demo URLs (~100–120 chars → QR version 5–6, ~40×40 modules), 80px gave each module only ~2px — right at the lower bound of phone camera scanning. 128px gives ~3px per module, much more forgiving.
Side effect:
.previewQrContentusesalign-items: centerwith no fixed height, so the row naturally grows with the QR. Multi-line text blocks (title + description + URL row) no longer feel cramped next to a tiny code.The encoder settings (
errorCorrectionLevel: 'L',margin: 1) are already minimal — there's no compression headroom left on the encoder side, so the only meaningful fix for scannability is to render the same modules at more pixels.Test plan
Summary by CodeRabbit