Page MenuHomeElementl

[dagit] QueryCountdown to consolidate some repetitive code
ClosedPublic

Authored by dish on Feb 5 2021, 3:50 PM.

Details

Summary

Now that we've got a few refreshable countdowns in place, it seems like we have a clear pattern of repeated needs that can be abstracted away. Specifically, refreshable countdowns for polling GraphQL queries tend to share the same code, so this diff introduces an Apollo-aware QueryCountdown that encapsulates the useCountdown hook and network status.

Test Plan

View affected countdown components in Dagit, verify that they behave properly.

Diff Detail

Repository
R1 dagster
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dish requested review of this revision.Feb 5 2021, 3:57 PM

This looks like a great refactor to me! Big fan of making these consistent.

This revision is now accepted and ready to land.Feb 5 2021, 4:41 PM