Sheet no celular: corpo fica atrás da barra inferior do navegador (ancora no layout viewport, não no visual viewport)

Offen
#1,333 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
55/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
typescript
Bereich
frontend, mobile

Rechercherichtung

Read Sheet.svelte in version 4.6.0 and the viewport script and contracts in related issues #1108 and #1109. Trace how the sheet's bottom position and maximum height use --ca-vh, then check how Sheet, bottom-mode Drawer, and full-screen mobile Dialog share that behavior. Add the Playwright WebKit case described in the issue; done means the body can scroll to its last row while it remains above the visual viewport.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Sintoma (iPhone, navegador com barra inferior, R2K em produção)

Negociações no celular › faixa de etapas › "Etapas do funil" (Sheet da lib, StageSheet.svelte na R2K). O sheet abre, mas só o cabeçalho (alça, título, descrição, ×) aparece acima da barra inferior do navegador; a lista de etapas fica atrás da barra e não dá para rolar até ela. O fundo fica borrado/escurecido normalmente.

  • Versão: @codeatlasdev/ui 4.6.0.
  • Navegador: iOS, navegador com barra de ferramentas inferior flutuante (voltar/avançar/"Perguntar"/abas). No Safari com a barra de endereço embaixo o risco é o mesmo.
  • Captura: cabeçalho do sheet visível entre y≈1250 e y≈1425 (de 1568 px da captura); a primeira linha da lista está cortada pela barra.

Leitura do código (Sheet.svelte, 4.6.0)

dialog.ca-sheet { inset: auto 0 0 0; max-height: min(calc(var(--ca-vh) * 0.88), 720px); }
.ca-sheet__footer/body { padding-bottom: calc(... + var(--ca-safe-bottom)); }
  • O sheet ancora em bottom: 0 do layout viewport. Quando o navegador desenha a barra inferior por cima da página, o fundo do layout viewport fica atrás dela, e env(safe-area-inset-bottom) (--ca-safe-bottom) não cobre a barra do navegador, só a área do home indicator.
  • --ca-vh também segue o layout viewport, então a altura máxima conta espaço que não está visível.

Proposta

  1. Ancorar e dimensionar o sheet pelo visual viewport: bottom = layoutHeight - (visualViewport.offsetTop + visualViewport.height), max-height sobre visualViewport.height (atualizar em resize/scroll do visualViewport). Cabe no script de viewport de #1109 (--ca-app-h, viewport-gap) e no contrato de #1108 (--ca-bottom-clearance).
  2. Alternativa só CSS: max-height em dvh/svh e bottom: calc(100lvh - 100dvh) não resolve barra flutuante sobreposta; por isso o visual viewport.
  3. Teste: Playwright WebKit com visualViewport menor que o layout viewport (emular barra inferior de ~80 px) — a última linha do corpo do sheet tem que ficar inteira acima de visualViewport.height, e o corpo tem que rolar até ela.

Aceite

  • Em iPhone com barra inferior do navegador (Safari e navegadores de terceiros), o corpo inteiro do sheet é alcançável; nada fica atrás da barra.
  • Vale para Sheet, Drawer em modo inferior e Dialog em tela cheia no celular.

Relacionadas: #1108, #1109, #1084.

Vorherrschende Sprache
TypeScript
Sterne
6
Forks
3
Ø Merge
5 Std. 21 Min.
Gemergte PRs (30 T.)
378

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus codeatlasdev/ui

Alle Issues in codeatlasdev/ui

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.