Add repositories page to user settings.
Created by: arussellsaw
This PR is a first pass at https://github.com/sourcegraph/sourcegraph/issues/15401 but is missing some final work to be considered 'complete'

I've not addressed a few items from the designs here: https://www.figma.com/file/zXvqCASHDzmvKbrAl1EVsd/Public-%26-Private-Repos-for-Users-on-Cloud?node-id=246%3A11 Thematically the things i've not tackled are due to not having the component library in place to make these things happen, and considering i'm not the best at frontend dev i decided to err on the side of productivity, and try to deliver the overall intent of the design rather than taking many multiples of time to deliver the design to the letter. I will summarise these differences into a new ticket for completing this page, but this should unblock any further work on this area for now.
here are the things from the designs that i've not done, and why:
-
Filter summary: just below the filters there is a summary of the filters being applied, the way FilteredConnection works means this data is hard to extract from the actual component, and there's no clean injection point for this component. If i were to do the refactor i think we should uncouple the filters and connections, allowing the view inside to be composed more arbitrarily, meaning we could specify a more complex component to load this summary.
-
Multiple options in selects: In the designs the selects are visually a bit different, and also support multiple options per drop down. I figured it made more sense for me to use simpler selects rather than spin my wheels working on a new component for these selects.
-
Results summary: at the bottom there's a summary of the results, with how many code hosts and repositories there are. Again i think this is due to the architecture of the FilteredConnection component, i can get the number of results easily, but more advance interpretation of the configured filters or data contained was a challenge.
-
Pagination: the designs use a page number based pagination system, rather than the 'show more' button. again this would probably be best done in a larger filtered connection refactor.
Merge request reports
Activity
Created by: codecov[bot]
Codecov Report
Merging #16236 (a24e2e5) into main (46ff162) will decrease coverage by
0.03%
. The diff coverage is13.63%
.@@ Coverage Diff @@ ## main #16236 +/- ## ========================================== - Coverage 52.92% 52.89% -0.04% ========================================== Files 1649 1650 +1 Lines 82535 82601 +66 Branches 7318 7462 +144 ========================================== + Hits 43685 43693 +8 - Misses 35006 35063 +57 - Partials 3844 3845 +1
Flag Coverage Δ go 52.52% <ø> (-0.01%)
integration 29.13% <37.50%> (-0.03%)
storybook 27.98% <0.00%> (-0.03%)
typescript 53.78% <13.63%> (-0.11%)
unit 35.84% <0.00%> (-0.10%)
Impacted Files Coverage Δ client/web/src/site-admin/backend.tsx 3.27% <0.00%> (-0.40%)
...ings/repositories/UserSettingsRepositoriesPage.tsx 0.00% <0.00%> (ø)
client/web/src/user/settings/routes.tsx 65.78% <71.42%> (+1.27%)
client/web/src/user/settings/sidebaritems.ts 100.00% <100.00%> (ø)
.../internal/codeintel/resolvers/graphql/locations.go 83.50% <0.00%> (-2.07%)
cmd/repo-updater/repos/types.go 69.37% <0.00%> (+0.62%)
Created by: quinnkeast
Overall this makes sense to me. Ultimately the frontend design alignment is best handled by a frontend developer, so let's create a separate issue that documents exactly what needs to be done for this to be finished.
In the meantime, there's three changes I think we need to implement before this stage is wrapped up:
- The whole row for each repository should be be clickable, rather than just the repository name
- The check icon should be
$color-bg-3
- The
>
icon should be the blue link colour.
I can create a separate issue for followup items (or let me know if you've got that)!
Created by: arussellsaw
@quinnkeast here's the issue for the next milestone https://gitlab.sgdev.org/root/sourcegraph/-/issues/16297