Skip to content

v0.6.4

Latest

Choose a tag to compare

@github-actions github-actions released this 24 Nov 07:31
4ad3973

steps: walk through a diagram, no code needed

0.6.3 linked a diagram to code. Most explanations have no code: an order lifecycle, a deploy pipeline, a state machine. Now a steps block in a panel with a flow, state or tree diagram and no code block gives each step an explanation (#465):

```flow
Cart -> Pay -> Ship
```

```steps
Cart: The customer fills the cart.
Pay: The payment goes through.
Ship: The warehouse sends the parcel.
```
  • On the page: the diagram and a numbered list of the explanations sit side by side, in the order you wrote them; on a narrow screen they stack with the diagram on top. Click an item or an explanation, or press Enter or Space on either, and the item, its edges and its explanation light up. Previous, Next and the arrow keys move, and the current explanation scrolls into view. Esc clears.
  • Print, PNG, PDF and no script: every step is numbered on its item, beside the numbered list.
  • Writing it: each line is <item>: <explanation>, with no line numbers. am render reports an item that is not in the diagram, and says so when the step looks like it was written with lines. A panel with code works as in 0.6.3.

Fix

  • steps: on a narrow screen, a diagram stacked above its code was pushed to the right by its expand button. It is centred again, like any other diagram (#465).

Full list: #465.


steps:不写代码,也能一步一步讲一张图

0.6.3 把图和代码连了起来。但很多讲解没有代码,比如一笔订单的生命周期、一条部署流水线、一个状态机。现在,面板里有 flow、state 或 tree 图而没有代码块时,steps 块给每一步配一句讲解(#465):

```flow
Cart -> Pay -> Ship
```

```steps
Cart: 顾客把商品放进购物车。
Pay: 支付完成。
Ship: 仓库把包裹寄出。
```
  • 在页面上:图和带编号的讲解列表按你书写的先后并排;窄屏时上下堆叠,图在上。点击图中的项目或某条讲解(或在两者上按 Enter、空格),项目、它的连线和那条讲解一起高亮。“上一步”“下一步”和方向键切换,当前讲解会滚进视野;Esc 取消。
  • 打印、PNG、PDF 和没有脚本时:每一步的编号标在它的图项目上,旁边是带编号的讲解列表。
  • 写法:每行写 <项目>: <讲解>,不带行号。am render 会报告不在图里的项目;如果这一步看起来是带着行号写的,也会提示。有代码的面板和 0.6.3 一样。

修复

  • steps:窄屏上下排时,图会被它的展开按钮挤到右边。现在和其他图一样居中(#465)。

完整列表:#465。