Page MenuHomePhabricator

[dagit] Allow copying filter state to URL on Run page
ClosedPublic

Authored by dish on Tue, Oct 13, 4:46 PM.

Details

Summary

Resolves #3029

A handful of changes to the behavior of query parameters on the Run page in dagit:

  • Allow setting filter values via URL params:
    • steps to set the step selection on the Gantt chart
    • logs to set log filter tokens
    • levels to set the levels filter on the logs view
  • Add a "Copy URL" button to the logs toolbar to allow deep linking to the current filter state
  • Add the ability to use a query: token in the logs filter, since it's used implicitly by step selection

I also made the jest config not insist on tests being in __tests__ directories, since I think this is the kind of thing that adds friction to creating new tests (which we need more of).

Test Plan

View a Run page. Modify filters, and click "Copy URL" in each case, then open that copied URL to a new tab and verify correct filter initialization.

  • Change step selection, using wildcard characters and multiple steps. Verify proper filtering behavior.
  • Change log filter tokens, verify same.
  • Change levels, verify same.
  • Change a combination of these, verify same.

Diff Detail

Repository
R1 dagster
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

dish requested review of this revision.Tue, Oct 13, 4:55 PM
sashank added inline comments.
js_modules/dagit/package.json
155

+1

js_modules/dagit/src/runs/LogsToolbar.tsx
87–97

Nice :)

149

Would it be more clear to say "Copy URL with query?", so that the user knows their current search will be persisted in the query? Might be too many words.

js_modules/dagit/src/runs/getRunPageFilters.test.ts
3

Love it

This revision is now accepted and ready to land.Thu, Oct 15, 9:52 PM
js_modules/dagit/src/runs/LogsToolbar.tsx
149

Yeah, we run out of horizontal space pretty quickly in there. Let's see what feedback looks like, and if it's unclear I can try to come up with something clearer.

js_modules/dagit/src/runs/Run.tsx
87–98

derp

Remove rogue console.log