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 摘要。