codeatlas-ui lint: gutter, header sem frame e superfície aninhada (resto de #1154)

未關閉
#1,318 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
35/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
css, typescript
領域
frontend, tooling

研究方向

Start by reading how rules are registered and asserted in packages/ui/tests/ui-guard.test.ts, then the gate in scripts/mobile-gate.ts and the existing nested-surface rule from #920, which together show how a finding is produced and suppressed by a ca-ui-workaround marker. Before writing a rule, collect real gutter and fixed/sticky-header examples in the repo to pin down what each one rejects, using /docs/getting-started/layout-principles/ for the one-gutter-per-level rule. Done means each new rule has a test that fails without it, codeatlas-ui lint --rules lists it, and the nested-surface item is either extended with gate-only cases or closed with evidence.

由索引模型根據 Issue 內容生成。

描述

area:cli enhancement

Origem: o título de #1154. O PR #1317 entregou só os três critérios de aceite de #1154 (viewport-unit, fixed-bottom-offset, safe-area-bottom); estas três regras do título ficaram de fora para manter o PR pequeno.

O que falta

  • gutter: padding horizontal de página escrito à mão em vez de --ca-page-px / --ca-page-px-sm, ou um filho que soma o seu gutter ao do pai (regra 1 de /docs/getting-started/layout-principles/: um gutter por nível). Definir o que é reprovado antes de escrever a regra: p.ex. padding-inline: var(--ca-space-6) na raiz de uma página, ou AppList/AppForm dentro de PageShell sem embedded.
  • header sem frame: definir com o gate do AC (scripts/mobile-gate.ts) o que conta. Hipótese: um header position: fixed | sticky no topo sem --ca-safe-top e sem superfície opaca (--ca-chrome-surface). Reunir exemplos reais antes de escrever a regra.
  • superfície aninhada: nested-surface já existe (#920: Card/Surface como primeiro filho de outro). Verificar se o gate do AC pega casos que ela não pega (filho que não é o primeiro, Surface dentro de Card através de um wrapper, .ca-surface em CSS) e estender a regra, ou fechar este item com a evidência.

Critério de aceite (testável)

  • Cada regra nova tem um teste em packages/ui/tests/ui-guard.test.ts que falha antes da regra existir.
  • codeatlas-ui lint --rules lista as regras novas; um marcador ca-ui-workaround na linha ou acima desculpa um achado.

Relacionadas: #1154

Mãe: #1089

主要語言
TypeScript
星號
6
分支
3
平均合併
5 小時 21 分鐘
30 天內合併 PR
378

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

codeatlasdev/ui 的其他 Issue

查看 codeatlasdev/ui 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。