Skip to content

refactor: abstract pull-to-refresh empty state boilerplate into reusable widget - #21

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

refactor: abstract pull-to-refresh empty state boilerplate into reusable widget#21
insign wants to merge 1 commit into
mainfrom
refactor-refreshable-empty-state-7501417824711389159

Conversation

@insign

@insign insign commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Encapsula o boilerplate extenso necessário para tornar estados vazios ("empty states") atualizáveis via pull-to-refresh.

Ao longo do projeto, existia um padrão repetitivo de envolver widgets de estado vazio em um LayoutBuilder, SingleChildScrollView e ConstrainedBox para permitir que o gesto de pull-to-refresh funcionasse dentro de um RefreshIndicator quando a lista está vazia.

Este PR introduz o widget RefreshableEmptyState no core do projeto (lib/core/widgets/refreshable_empty_state.dart) e substitui as ocorrências desse boilerplate espalhadas pelas telas de Workers, DNS e Pages. Essa melhoria elimina código duplicado, padroniza a interface e aumenta a manutenibilidade do projeto.


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

…tyState

This commit introduces a new core widget `RefreshableEmptyState` to encapsulate the verbose boilerplate of wrapping an empty state inside a `LayoutBuilder`, `SingleChildScrollView`, and `ConstrainedBox` just to make it pull-to-refreshable within a `RefreshIndicator`.

This pattern was repeated across several screens (Workers list, DNS records, Pages lists). Abstracting it into a reusable widget significantly reduces code duplication, improving maintainability and readability across the codebase.

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