Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1.9 KiB
Mini Program Script Home Layout Implementation Plan
For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (
- [ ]) syntax for tracking.
Goal: Make the mini-program script generation home screen keep its headline on one line and place the microphone lower for easier voice input.
Architecture: Reorder existing template blocks in ScriptView.vue without changing data flow or event handlers. Adjust the existing hero CSS so the headline is a single non-wrapping row while preserving the current visual theme.
Tech Stack: Vue 3 single-file component, uni-app mini-program build.
Task 1: Reorder Home Screen Blocks
Files:
-
Modify:
mini-program/src/pages/main/ScriptView.vue -
Move the
inspiration-sectionblock so it appears immediately afterhero-copy. -
Keep
wish-input-wrapafterinspiration-section. -
Keep
profile-boostafterwish-input-wrap. -
Move
orb-wrapandvoice-copyafterprofile-boost. -
Verify no event bindings change:
useRecommendation,shuffleInspirations,submitWish,startVoicePress,endVoicePress,cancelVoicePress, andopenSocialInsightsremain attached to the same elements.
Task 2: Make Headline Single Line
Files:
-
Modify:
mini-program/src/pages/main/ScriptView.vue -
Update the two headline text nodes into a single row under
.hero-copy. -
Change
.hero-copyto a horizontal flex container withwhite-space: nowrap. -
Reduce
.hero-titlefont size enough for common mini-program viewport widths. -
Preserve
.hero-highlightstyling.
Task 3: Validate
Commands:
-
cd mini-program && npm run build:mp-weixin -
git diff --check -
Mini-program build passes.
-
Diff check reports no new whitespace errors.