Page MenuHomeElementl

Add step contextual menus, url-persisted pagination to partition matrix
ClosedPublic

Authored by bengotow on May 5 2021, 2:25 AM.

Details

Summary

This diff adds a contextual menu to the red/green squares on the partition matrix that replaces the modal click behavior and makes it much easier to jump to the step logs in the most recent run (the common case). It's still two clicks, but the clicks are right next to each other! (https://github.com/dagster-io/dagster/issues/3790)

I also switched the "step logs" click handlers to use standard links so that command-clicking on the menu item / button opens the run logs in a new tab.

This diff also moves partition matrix pagination state to the URL so that if you click Prev a few times and navigate away and come back, you're still on the same page. (https://github.com/dagster-io/dagster/issues/4105) This actually exposed a few bugs in the useQueryPersistedState hook which I fixed and added test cases for. Now if you memoize the "options" passed to the hook, the setState method it returns remains identical between renders (matching the React.useState behavior more closely)

image.png (470×734 px, 68 KB)

Test Plan

Run two new tests

Diff Detail

Repository
R1 dagster
Lint
Lint Not Applicable
Unit
Tests Not Applicable