UX: avisar quando a trilha do endereço não existe (Nielsen, severidade 1)

Open Beginner friendly
#348 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
react, typescript
Domain
frontend

Research direction

Start with lerFiltro in painel/src/filtroNoEndereco.ts (around line 22), where an unknown trilha falls back to the default filter. Add a notice near the filter that uses the existing aria-live region, and correct the address with replace so history is not grown. Done when ?trilha=T99 shows the message and the URL becomes clean, covered by painel/src/filtroNoEndereco.test.ts and a component test.

Written by the indexing model from the issue text.

Description

trilha:T4

Objetivo

Avisar quem abre o painel com uma trilha inexistente no endereço (por exemplo, /?trilha=T99) que o filtro voltou para "Todas as trilhas", e corrigir o endereço.

Motivo

Severidade 1 (Nielsen 0 a 4: problema leve). Heurística 9: ajudar a reconhecer e corrigir erros. Com ?trilha=T99&situacao=feitos, lerFiltro (painel/src/filtroNoEndereco.ts, linha 22) cai no padrão, o que é o comportamento certo e documentado. Mas:

  • a página mostra "Mostrando 88 de 161 itens." sem dizer que a trilha pedida não existe;
  • o endereço continua com trilha=T99, e quem copiar o link compartilha um filtro que não funciona.

Acontece quando alguém digita o endereço ou abre um link antigo.

Critérios de aceite

  • Com uma trilha inexistente, um aviso educado aparece perto do filtro: "A trilha T99 não existe. Mostrando todas as trilhas." O aviso usa a região aria-live que já existe.
  • O endereço é corrigido com replace, sem criar uma entrada nova no histórico.
  • Um teste cobre o caso (painel/src/filtroNoEndereco.test.ts e o componente).

Tamanho e prioridade

P (1 a 2 h) · p3.

Fora do escopo

Sugerir a trilha mais parecida ("você quis dizer T9?").

Dominant language
JavaScript
Stars
0
Forks
0
Avg merge
15h 6m
Merged PRs (30d)
118

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from learnTECH-community/formacao-dev

All issues in learnTECH-community/formacao-dev

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.