Page MenuHomeElementl

[dagit] Use RepoNavItem

Authored by dish on Mar 16 2021, 6:48 PM.



Start using the multi-repo filter nav item in the Dagit left nav, including the RepoSelector popover.

  • If the user has localStorage settings for which repos to show, show all matching repos loaded in the workspace.
  • If there are no matches: if only one repo is loaded, show it. If multiple repos are loaded, show the first one in the list.

When a single repo is selected, show its name and a reload button. When multiple repos are selected, show "X of Y shown".

This diff also connects the reload buttons in the RepoSelector, and closes the popover when the user clicks to browse a given repo.

Test Plan

Load an empty workspace. Verify that the empty state looks correct.

Load a workspace with a single repo. Verify that it shows the name of the repo, and that the reload button works as expected.

Load a workspace with multiple repos. Verify that the localStorage behavior works as described above. Add and remove repos for filtering, verify that the pipelines, solids, schedules, and sensors load properly, and that the "X in Y shown" display looks correct.

Reload repos from the popover, and browse to repos. Verify behavior for each.

Diff Detail

R1 dagster
Lint Not Applicable
Tests Not Applicable

Event Timeline

dish requested review of this revision.Mar 16 2021, 6:57 PM

Should it be "Repositories" instead of "Repository"?

Good point, at least in the plural case it probably should be.

I'm a fan! I pulled it down and poked at it a bit and it seems like a pretty clear improvement over the previous repo switcher and this code looks clean. Really like having a "filter" vs a "selection" concept here.

This revision is now accepted and ready to land.Mar 17 2021, 4:59 PM
This revision was automatically updated to reflect the committed changes.