Sinais de frustração (clique repetido, envio inválido repetido) com gate e ajuda

Đang mở
#1,223 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
62/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Start from the parent issue #1089 and the existing Tour and Toaster components in the library to see how a public API and its docs are shaped here. The acceptance criteria are the spec: build createStruggleDetector with the given rageClicks/invalidSubmits/onSignal options and a <HelpOffer> gated to once per session, then add tests covering the 800 px / 2 s click cases, two invalid submits, and the pt-BR copy table. The AC paths named are in a private repo, so expect to read around for them; done is all four checklist items passing.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area:a11y area:components enhancement

Versão: @codeatlasdev/ui 4.6.0 · código lido em main (950628f2) · classe: lacuna (migração do AC)

Problema

O AC depende deste comportamento hoje e a lib não o oferece. Sem ele, a migração perde qualidade no desktop, no mobile ou no PWA.

O que a lib já oferece (para não duplicar) e o que falta

(leitura de origin/main) sem detecção. Tour e Toaster existem, mas não há gatilho de ajuda por sinal.

Referência no AC

Caminhos do repo AC (repo privado, só caminho):

packages/koatla/src/struggle/rage-click.ts, struggle/invalid-submit.ts, struggle/gate.ts, struggle/use-struggle.ts, struggle/bubble-copy.ts, struggle/describe.ts, struggle/struggle.test.ts.

Defeitos do AC (verificados por leitura do código): nenhum por leitura.

Proposta

createStruggleDetector({ rageClicks: { count: 3, windowMs: 800 }, invalidSubmits: 2, onSignal }) e <HelpOffer> com gate (não aparece mais de uma vez por sessão).

Critério de aceite (testável)

  • Três cliques em até 800 px de distância no mesmo alvo disparam rage-click; dois em 2 s não disparam.
  • Dois envios inválidos seguidos no mesmo formulário disparam invalid-submit.
  • Com gate, o sinal aparece no máximo uma vez por sessão.
  • O texto da ajuda vem de uma tabela pt-BR e não contém "ao vivo" nem termos proibidos.

Mãe: #1089

Ngôn ngữ chính
TypeScript
Star
6
Fork
3
Merge trung bình
5 giờ 21 phút
Pull request đã merge (30 ngày)
378

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của codeatlasdev/ui

Tất cả issue của codeatlasdev/ui

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.