Skip to content

Add repositories page to user settings.

Administrator requested to merge user-settings-repositories into main

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'

Screenshot 2020-11-25 at 16 16 39

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

Loading