Skip to content

Refactor: Extract RefreshableEmptyState widget#20

Open
insign wants to merge 1 commit into
mainfrom
refactor-refreshable-empty-state-4904655419675058894
Open

Refactor: Extract RefreshableEmptyState widget#20
insign wants to merge 1 commit into
mainfrom
refactor-refreshable-empty-state-4904655419675058894

Conversation

@insign

@insign insign commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Refatoração do padrão de "pull-to-refresh" em estados vazios para um widget reutilizável RefreshableEmptyState.

Isso agrega valor real ao projeto na área de manutenibilidade, pois elimina um padrão de código verboso (LayoutBuilder -> SingleChildScrollView -> ConstrainedBox com AlwaysScrollableScrollPhysics) que estava duplicado em várias partes do código (Workers, DNS Records, Pages Projects e Pages Domains). Agora, o código fica muito mais limpo e padronizado.

Arquivos alterados:

  • lib/core/widgets/refreshable_empty_state.dart (Novo): Contém o novo widget que encapsula a lógica.
  • lib/features/dns/presentation/pages/dns_records_page.dart: Atualizado para usar o novo widget.
  • lib/features/pages/presentation/pages/pages_list_page.dart: Atualizado para usar o novo widget.
  • lib/features/pages/presentation/pages/pages_project_page.dart: Atualizado para usar o novo widget.
  • lib/features/pages/presentation/widgets/pages_domains_tab.dart: Atualizado para usar o novo widget.
  • lib/features/workers/presentation/pages/workers_list_page.dart: Atualizado para usar o novo widget (duas vezes).

Atualização de documentação (.md):

  • Nenhum arquivo .md precisou ser atualizado. Esta é uma alteração puramente interna (refatoração de código de UI) e não altera os guias arquiteturais, roteiro (roadmap) nem como o projeto deve ser executado ou compreendido por desenvolvedores.

Impacto nos testes:

  • O comando make check (que engloba formatação, análise estática estrita e execução de testes) passou integralmente, confirmando que a refatoração não quebrou os testes existentes e está em conformidade com o budget do linter.
  • Nenhum teste novo precisou ser adicionado ou alterado, pois a mudança é uma extração de widget de UI que mantém exatamente a mesma estrutura hierárquica e semântica final na renderização.

PR created automatically by Jules for task 4904655419675058894 started by @insign

…yState widget

Extracted the verbose LayoutBuilder -> SingleChildScrollView -> ConstrainedBox
boilerplate used for pull-to-refresh empty states into a reusable
`RefreshableEmptyState` widget.

This improves maintainability and reduces code duplication across multiple list views.

Co-authored-by: insign <1113045+insign@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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.

1 participant