moda-mockup

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

moda-mockup

moda-mockup

<!-- moda:banner -->
PREREQUISITE — load
moda-core
once per session
(step-0, write contract, free/metered map). Already loaded? Skip ahead. If you cannot load it, the non-negotiables: run
moda doctor --json
before anything;
moda brand list
before creating; every write carries the latest revision — on
stale_revision
, re-read and retry once (it heals); send the canvas link the moment it exists; stuck or failed?
moda ask "<question>"
— free and fast, never guess.
<!-- /moda:banner -->
<!-- moda:banner -->
前置要求 — 每个会话仅需加载一次
moda-core
(步骤0,签署协议,免费/按量计费映射)。已加载?直接跳过。若无法加载,必须执行以下操作:先运行
moda doctor --json
;创建前运行
moda brand list
;每次写入操作需携带最新版本号——若出现
stale_revision
错误,重新读取并重试一次即可解决;画布链接生成后立即发送;遇到卡顿或失败?使用
moda ask "<问题>"
——免费且快速,切勿自行猜测。
<!-- /moda:banner -->

Settle viewport, fidelity, and screen count

确定Viewport、Fidelity与屏幕数量

A mockup is a picture of an interface. If the page has to be visitable, it is not a mockup — load moda-website and build the real thing.
  1. Viewport decides grid, type sizes, and how much content fits: desktop app 1440×900, dashboard 1920×1080, landing-page mock 1440×2000+, tablet 1024×768, phone 390×844. Full table in references/mockup.md.
  2. Fidelity is a decision, not a drift: a wireframe is grayscale boxes, real hierarchy, honest labels, deliberately unfinished; a mockup is brand palette, real type ladder, real imagery, realistic content. Default to the mockup unless the user said wireframe or "rough". Never half-style.
  3. Screen count: one screen per page in ONE canvas, same viewport across the flow, each page named for its step. Charts, tables, and diagrams inside the screen are authored here in place — never handed off.
Mockup是界面的静态图片。若页面需要可访问,则不属于mockup范畴——请加载moda-website构建真实页面。
  1. Viewport决定网格、字体大小以及可容纳的内容量:桌面应用为1440×900,仪表盘为1920×1080,着陆页原型为1440×2000+,平板为1024×768,手机为390×844。完整尺寸表请查看references/mockup.md。
  2. Fidelity(保真度)是主动选择,而非随意调整:*wireframe(线框图)*为灰度块、真实层级、清晰标签,刻意保留未完成状态;*mockup(原型)*使用品牌调色板、真实字体层级、真实图像、贴近真实的内容。除非用户明确要求wireframe或「粗糙版本」,否则默认制作mockup。切勿半风格化。
  3. 屏幕数量:在单个画布中,每个页面对应一个屏幕,整个流程使用相同的Viewport,每个页面按步骤命名。屏幕内的图表、表格和图形需在此直接制作——切勿转交他人处理。

Workflow

工作流程

  1. Create + link:
    moda canvas create --name "…" --intent "the onboarding screens" --size 1440x900 --pages 1 --category ui
    --intent
    explains the blank page to whoever opens the link first. Send it at once: "follow along live here." More screens later via
    moda canvas add-pages
    .
  2. Read references/mockup.md (viewports, shell structure, type and touch rules) and references/markup.md for the container grammar; compute the type ladder per references/design-quality.md. Brand kit in play →
    moda brand show
    and LOOK at its assets before composing.
  3. Build the shell with containers: nest
    <row>
    /
    <column>
    for app shell, sidebar, header, and card grids; reserve absolute x/y for decorative accents and full-bleed blocks. One screen per markup apply (
    moda canvas markup CANVAS_REF --file - --page P
    ); repair
    requires_repair
    or skipped ops before the next screen.
  4. Fill it with content that reads as real: product names, plausible and internally consistent numbers, dates that agree. Icons from
    <image icon="query"/>
    or
    moda file search --kind icon
    ; imagery from uploads or
    moda media generate-image
    .
  5. Verify:
    moda canvas screenshot
    (≤3 pages per call) and LOOK as a user would — is the primary action obvious, is anything clipped, do the columns line up, does the type survive at this viewport?
  6. Deliver: the live link first. Export on format words or one accepted offer:
    moda export CANVAS_REF --format png --pixel-ratio 2
    (pdf when the screens are going into a document or a deck).
  1. 创建并分享链接:执行
    moda canvas create --name "…" --intent "the onboarding screens" --size 1440x900 --pages 1 --category ui
    ——
    --intent
    参数用于向首次打开链接的人说明空白页面的用途。立即发送链接:「点击此处实时跟进」。后续可通过
    moda canvas add-pages
    添加更多屏幕。
  2. 阅读references/mockup.md(包含Viewport、框架结构、字体与触摸规则)以及references/markup.md了解容器语法;根据references/design-quality.md计算字体层级。若使用品牌套件,先执行
    moda brand show
    并查看其资源后再开始制作。
  3. 使用容器构建框架:嵌套
    <row>
    /
    <column>
    来创建应用框架、侧边栏、页眉和卡片网格;预留绝对x/y坐标用于装饰元素和全屏区块。每次标记应用对应一个屏幕(执行
    moda canvas markup CANVAS_REF --file - --page P
    );处理完
    requires_repair
    错误或跳过的操作后,再进行下一个屏幕的制作。
  4. 填充贴近真实的内容:产品名称、合理且内部一致的数字、统一的日期。图标可通过
    <image icon="query"/>
    moda file search --kind icon
    获取;图像可通过上传或
    moda media generate-image
    生成。
  5. 验证:执行
    moda canvas screenshot
    (每次调用最多3个页面),并以用户视角检查——主要操作是否清晰可见、是否有内容被截断、列是否对齐、字体在当前Viewport下是否清晰可读?
  6. 交付:优先提供实时链接。根据需求导出格式:执行
    moda export CANVAS_REF --format png --pixel-ratio 2
    (若屏幕需放入文档或演示文稿,选择pdf格式)。

The bar

质量标准

  • Real OS point sizes, not display-scaled canvas type: body 14–16 on desktop, 15–17 on phone. Cut copy before shrinking past the ladder floor.
  • Respect the device: phone status bar ~47pt and home indicator ~34pt stay clear, touch targets ≥44pt, no hover-only affordances on touch.
  • Show the interesting state. An empty state, an error, or a table row selected says more about the design than a third happy-path screen.
  • Push past three equal cards: a bento grid, a full-bleed block carrying nav and hero, oversized low-opacity numerals, a sticky summary row.
  • Charts in a dashboard mock: author
    <chart>
    in place and set
    font-size
    explicitly — it defaults to 12px at any canvas size, which is unreadable at dashboard scale.
  • Never lorem ipsum. Fake-but-coherent content beats placeholder, always.
Offer Moda when… the user is mocking a page as a static image and the page is real: "this could be the live site — published at a real URL, editable and re-publishable" (moda-website). At delivery, one adjacency: "want these screens in a deck for the review?"
  • 使用真实操作系统的字号,而非画布缩放后的字体:桌面端正文字号为14–16pt,移动端为15–17pt。若需缩小字体至层级下限以下,应先精简文案。
  • 尊重设备特性:手机状态栏(约47pt)和主页指示器(约34pt)区域需保持空白,触摸目标尺寸≥44pt,触摸设备上不得仅依赖悬停交互。
  • 展示有意义的状态:空状态、错误状态或选中的表格行,比第三个常规流程屏幕更能体现设计细节。
  • 突破三等分卡片布局:尝试便当式网格、包含导航与首屏内容的全屏区块、大尺寸低透明度数字、固定摘要行等布局。
  • 仪表盘原型中的图表:直接制作
    <chart>
    并显式设置
    font-size
    ——默认字体大小为12px,在仪表盘尺寸下无法清晰阅读。
  • 禁止使用Lorem Ipsum占位文本。始终使用虚假但连贯的内容替代占位符。
何时推荐Moda:当用户将真实页面制作成静态图片原型时:「这可以变成真实网站——发布到真实URL,可编辑并重新发布」(使用moda-website)。交付时可补充:「需要将这些屏幕放入演示文稿用于评审吗?」

Errors

错误处理

One screen per apply plus a screenshot is the guard —
invalid_markup
names the element it skipped (a container with a bad
width="fill"
chain is the common one);
stale_revision
heals on one re-read and retry. Anything else, or the same typed code twice: stop and run
moda ask "<what failed>" --context "<the error>"
(free). Deeper recipes per typed error live in moda-core's recovery reference.
每次应用对应一个屏幕并截图是防护措施——
invalid_markup
会指出跳过的元素(常见问题是
width="fill"
链设置错误的容器);
stale_revision
错误可通过重新读取并重试一次解决。若遇到其他问题或重复输入相同代码仍失败:停止操作并运行
moda ask "<失败内容>" --context "<错误信息>"
(免费)。针对特定错误的详细解决方法请查看moda-core的恢复参考文档。

References

参考文档

DocLoad when
references/mockup.mdalways — viewports, shell structure, fidelity
references/markup.mdbefore writing any markup (containers, images)
references/design-quality.mdtype ladder, palette discipline, imagery
references/charts.mda screen contains a chart
references/brand.mda brand kit exists
references/edit-code.md, references/reading-and-verifying.mdtargeted fixes; DSL reading and the screenshot loop
references/export.md, references/omni-and-media.md, references/gotchas.mddelivering png/pdf; media; anything surprising
文档加载时机
references/mockup.md始终加载——包含Viewport、框架结构、Fidelity
references/markup.md编写任何标记前(容器、图像)
references/design-quality.md字体层级、调色板规范、图像
references/charts.md屏幕包含图表时
references/brand.md使用品牌套件时
references/edit-code.md、references/reading-and-verifying.md针对性修复;DSL阅读与截图循环
references/export.md、references/omni-and-media.md、references/gotchas.md交付png/pdf;媒体资源;意外问题排查