1.9 KiB
Remove Market Floating Back Buttons 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: Remove every top-left circular back button from pages under the Market menu while preserving bottom cancel actions and normal list navigation.
Architecture: Generic Market pages continue to use MarketPageShell, with forms explicitly disabling its optional back control. The dedicated presign form removes its standalone back control. A source-contract test prevents either control from returning.
Tech Stack: Vue 3, Vant, Node.js test runner, Vite.
Task 1: Remove Market form floating back controls
Files:
-
Modify:
mobile-oa-h5/src/market/mobile-parity-ui.test.js -
Modify:
mobile-oa-h5/src/views/market/MarketModuleForm.vue -
Modify:
mobile-oa-h5/src/views/market/presign/PresignOrderForm.vue -
Step 1: Write the failing test
Extend the Market UI contract test so the generic form must pass :backable="false" and the dedicated presign form must not contain presign-form-page__back.
- Step 2: Run test to verify it fails
Run: node --test src/market/mobile-parity-ui.test.js
Expected: FAIL because both form implementations currently render a back control.
- Step 3: Write minimal implementation
Pass :backable="false" to MarketPageShell in the generic form and delete the standalone back button from the presign form. Keep the bottom cancel actions unchanged.
- Step 4: Run verification
Run:
node --test
pnpm build
Expected: all tests pass and the production build succeeds.
- Step 5: Verify the original page
Reload the protocol edit page and confirm its iframe accessibility tree contains no button named 返回, while the bottom 取消 and 保存 buttons remain.