prototype

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Prototype

原型

This skill explores one idea as several working variants. The user compares them in the running app, picks one and the others are deleted.
此 skill 将一个想法探索为多个可运行的变体。用户在运行中的应用里比较这些变体,选定一个后,其余变体会被删除。

Real code, then gone

真实代码,然后移除

Each variant is real code with real data in the real app, not a mockup. Build the number asked for. With no number, build five that differ in approach, not only in colour. The page is temporary and goes once a variant is picked.
Every state of an existing component on one page belongs to
lab
. Copying an outside reference belongs to
match
.
每个变体都是在实际应用中使用真实代码和真实数据实现的,而不是静态模型图。按要求构建相应数量的变体。如果未指定数量,则构建五个在设计方向上各不相同的变体,而不只是颜色不同。该页面是临时的,选定变体后即被移除。
在同一个页面上展示现有组件的每一种状态,属于
lab
。复制外部参考设计属于
match
。

1. Restate the idea

1. 重述想法

Write the idea in one line and the axis the variants explore, such as layout, motion or density. Ask one question when the idea has two readings.
用一行写明想法以及变体所探索的维度,例如布局、动效或信息密度。当一个想法存在两种解读时,只问一个问题。

2. Build real variants

2. 构建真实变体

Use the project's components and real or realistic data. A static image or lorem ipsum is
prototype-real-code
or
prototype-real-data
.
使用项目的组件和真实或逼真的数据。使用静态图片或 Lorem ipsum 属于
prototype-real-code
或
prototype-real-data
。

3. Put them on one page

3. 将它们放在同一个页面

Show every variant on one route. Separate pages per variant is
prototype-one-page
. Copy switcher.js into the app beside that route and load it once, as its header comment shows. Wrap the variants in
<prototype-switcher>
, one child each with
data-variant
and an optional
data-note
.
The switcher ships with the skill, so write the variants only. A switcher, tab row or grid written from scratch is
prototype-shipped-switcher
.
Give each a short label that says how it differs. "Variant 3" is
prototype-label-variants
. Use the app's current theme unless the user asked for both. Light and dark side by side by default is
prototype-one-theme
.
在同一个 route 中展示所有变体。为每个变体分别创建页面属于
prototype-one-page
。将 switcher.js 复制到应用中该 route 所在位置,并按照其头部注释的说明加载一次。用
<prototype-switcher>
包裹这些变体,每个变体对应一个子元素,并带有
data-variant
及可选的
data-note
。
该 switcher 已随 skill 一并提供,因此只需编写各个变体。自行编写 switcher、标签栏或网格属于
prototype-shipped-switcher
。
为每个变体设置一个简短标签,说明它与其他变体的差异。“Variant 3”属于
prototype-label-variants
。除非用户明确要求同时展示浅色和深色主题,否则使用应用当前的主题。默认将浅色和深色主题并排展示属于
prototype-one-theme
。

4. Open it

4. 打开页面

Start the dev server, open the page and look at every variant once. A path in the reply with nothing opened is
prototype-open-it
.
启动开发服务器,打开页面,并逐一查看每个变体。在回复中只提供路径而没有实际打开页面,属于
prototype-open-it
。

5. Prune after the pick

5. 选定后进行清理

The bar's Pick button copies a line such as "Pick Inline Filters from /prototypes/filters" for the user to paste back. When the user picks, move that variant into the product. Delete the losing variants with the route,
switcher.js
and its type declaration. Leftover variants after a pick is
prototype-prune-after-pick
.
切换栏中的“Pick”按钮会复制一行类似“从 /prototypes/filters 选择 Inline Filters”的内容,供用户粘贴回来。用户选定后,将该变体纳入正式产品。删除未选中的变体,同时移除该 route、
switcher.js
及其类型声明。选定后仍残留未选中的变体,属于
prototype-prune-after-pick
。

The pair

成对检查

Every check is a pair. The broken line sits beside the line that replaces it.
RuleBrokenReplacement
prototype-real-code
A static mockup imageThe variant built from project components
prototype-real-data
Lorem ipsum rowsReal or realistic rows
prototype-label-variants
Variant 3
Inline Filters
prototype-one-page
Five routes, one per variantOne route with a switcher
prototype-shipped-switcher
A switcher written from scratch
switcher.js
loaded, only the variants written
prototype-one-theme
Light and dark side by side, unaskedThe app's current theme
prototype-open-it
"Built at
/prototypes/filters
"
The page opened, every variant checked
prototype-prune-after-pick
Four losing variants left in
src/
The pick shipped, the rest deleted
每项检查都由一对内容组成:错误示例与替代方案并列展示。
RuleBrokenReplacement
prototype-real-code
静态模型图使用项目组件构建的变体
prototype-real-data
Lorem ipsum 数据行真实或逼真的数据行
prototype-label-variants
“Variant 3”“Inline Filters”
prototype-one-page
五个 route,每个对应一个变体一个带 switcher 的 route
prototype-shipped-switcher
自行编写的 switcher加载
switcher.js
,仅编写各个变体
prototype-one-theme
未经要求便并排展示浅色和深色主题应用当前的主题
prototype-open-it
“已构建于
/prototypes/filters
”
已打开页面,并检查了每个变体
prototype-prune-after-pick
src/
中残留四个未选中的变体
已交付选中的方案,其余变体均已删除

Reporting

报告

Severity.
HIGH
is a variant that does not run, or losing variants left after a pick.
MEDIUM
is placeholder data, unlabelled variants, variants that differ only in colour or a hand-built switcher.
LOW
is a page that was not opened for the user.
Format. One finding per root cause:
file:line - [rule-id] what is wrong
Then a
Rule | Count | Severity
summary.
Block
when any
HIGH
remains,
Approve
otherwise. Mark every variant you could not open as
Not verified
.
严重程度。 无法运行的变体,或选定方案后仍残留未选中的变体,属于
HIGH
。占位数据、未标注的变体、仅颜色不同的变体,或手工编写的 switcher,属于
MEDIUM
。未为用户打开的页面,属于
LOW
。
格式。 每个根本原因对应一项发现:
file:line - [rule-id] what is wrong
随后提供
Rule | Count | Severity
汇总。只要仍有任何
HIGH
,就标记为
Block
;否则标记为
Approve
。将每个无法打开的变体标记为
Not verified
。