Skip to content

feat: mobile usability - #2

Merged
fabiuhp merged 9 commits into
CriciDev:mainfrom
ericklucioh:feat/mobile-usability
Jun 21, 2026
Merged

feat: mobile usability#2
fabiuhp merged 9 commits into
CriciDev:mainfrom
ericklucioh:feat/mobile-usability

Conversation

@ericklucioh

Copy link
Copy Markdown
Member

adicina toggle button no nav

@ThiagoDeMattiaScoti ThiagoDeMattiaScoti left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A princípio tudo certo e nos conformes

@fabiuhp fabiuhp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mandei imagens pra tu no whatsapp

@fabiuhp fabiuhp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Complementando a review anterior, deixei os pontos principais inline nos trechos do diff para ficar mais fácil de ajustar. A direção da melhoria é boa os comentários são para evitar regressões no mobile/acessibilidade.

Comment thread assets/css/app.css
top: calc(100% - 0.2rem);
right: 0;
left: 0;
display: none;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aqui a navegação mobile passa a ficar totalmente escondida por padrão e só volta quando o Alpine aplica nav--open. Isso melhora o visual, mas cria uma regressão de fallback: se o JS/CDN falhar ou for bloqueado, o botão aparece e os links ficam inacessíveis. Sugiro deixar um fallback sem JS, por exemplo com <details>/<summary>, ou manter a nav acessível por padrão e só esconder depois que JS inicializar.

Comment thread pages/home/page.templ Outdated
<link rel="preconnect" href="https://fonts.googleapis.com"/>
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin/>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;700&family=Space+Grotesk:wght@400;500;700&display=swap" rel="stylesheet"/>
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Como o menu mobile passa a depender desse script, eu evitaria usar uma versão flutuante (@3.x.x). Uma atualização futura dentro do 3.x pode mudar comportamento sem alteração no repo. Se Alpine continuar aqui, melhor fixar uma versão exata ou considerar um script local pequeno para esse toggle.

Comment thread pages/home/page.templ Outdated
x-on:click="navOpen = !navOpen"
x-bind:aria-expanded="navOpen.toString()"
aria-controls="site-nav"
aria-label="Abrir navegação"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pequeno ajuste de acessibilidade: o label fica sempre Abrir navegação, mesmo quando o menu já está aberto. Também seria bom renderizar aria-expanded="false" no HTML inicial, antes do Alpine inicializar, e marcar os três spans decorativos do ícone com aria-hidden="true".

Comment thread assets/css/app.css Outdated
@media (max-width: 640px) {
.shell {
width: min(var(--shell), calc(100vw - 1.5rem));
width: min(var(--shell), calc(100vw - 4rem));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Esse calc(100vw - 4rem) deixa 2rem de margem de cada lado em telas pequenas. Em celulares estreitos, o conteúdo útil fica bem reduzido e isso pode piorar leitura/CTAs/cards. Eu manteria algo mais próximo do anterior (calc(100vw - 1.5rem)) ou no máximo calc(100vw - 2rem), corrigindo qualquer overflow no elemento específico.

Comment thread internal/app/app.go
return fallback
}

func displayURL(addr string) string {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A função é simples e útil, mas mexe com alguns formatos sensíveis de endereço. Valeria adicionar um teste table-driven para proteger casos como :8080, 0.0.0.0:8080, [::]:8080, 127.0.0.1:3000 e localhost:8080. Não vejo como bloqueador forte, mas ajuda a evitar regressões.

@ericklucioh

Copy link
Copy Markdown
Member Author

fiz os ajustes comentados aqui, oq foi recomendado no whatsapp eu abri uma issue

@ericklucioh
ericklucioh requested a review from fabiuhp June 20, 2026 00:03
@fabiuhp
fabiuhp merged commit 3900183 into CriciDev:main Jun 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants