APPROVE ✅
The core bug is fixed: both previously string-literal icon renderings were replaced with real Vue component rendering via v-if/v-else.
git diff --stat main...fix/issue-17-mockup-iconsscaffold/spec-site/src/pages/MockupEditorPage.vue | 5 ++++-
scaffold/spec-site/src/pages/MockupListPage.vue | 5 ++++-
2 files changed, 8 insertions(+), 2 deletions(-)
- Before:
- Used mustache with string literals like:
'<Icon name="unlock" :size="14" />''<Icon name="lock" :size="14" />'
- This renders text, not a Vue component.
- Used mustache with string literals like:
- After:
- Replaced with:
<Icon v-if="c.props.locked" name="unlock" :size="14" /><Icon v-else name="lock" :size="14" />
- Replaced with:
- ✅ Correctly renders real Icon components.
- Before:
{{ m.viewport === 'mobile' ? '📱' : '<Icon name="monitor" :size="14" />' }}- Desktop icon branch rendered as text.
- After:
- Replaced with:
<span v-if="m.viewport === 'mobile'">📱</span><Icon v-else name="monitor" :size="28" />
- Replaced with:
- ✅ Correctly renders Icon component for desktop.
git diff --name-only main...fix/issue-17-mockup-iconsscaffold/spec-site/src/pages/MockupEditorPage.vue
scaffold/spec-site/src/pages/MockupListPage.vue
✅ Only spec-site files were modified.
-
Viewport fallback behavior is broad (Low)
v-elseinMockupListPage.vuetreats any non-mobilevalue as desktop monitor icon.- If backend starts sending unexpected values (
tablet,unknown,null), UI may silently show incorrect desktop icon. - Suggestion: explicit
v-else-if="m.viewport === 'desktop'"+ fallback icon/text.
-
Potential visual alignment mismatch (Low)
- Mobile uses emoji in
<span>, desktop uses SVG Icon at fixed size28. - Emoji font metrics differ by OS/browser; cards can appear slightly misaligned.
- Suggestion: normalize via wrapper style (
display:flex; align-items:center; justify-content:center;) and fixed box size.
- Mobile uses emoji in
-
No regression test coverage in this PR (Low)
- Template rendering bug was fixed, but no test/assertion added to prevent future regressions.
- Suggestion: add component test asserting that icon element is present and that raw
<Icon ...>text is absent.
-
Inline conditional complexity can grow (Low)
- Current
v-if/v-elseis correct, but repeated template branching for icon selection may spread. - Suggestion: move to computed helper (e.g.,
isLocked,isMobile,viewportIconName) if additional states are introduced.
- Current
APPROVE — Fix is correct, scope is minimal, and the original rendering bug is resolved without unrelated changes.