Users can add their repositories from connected code hosts
- Truncate descriptions
Created by: christinaforney
The repositories view in user settings is where users add repositories to Sourcegraph that they have access to on remote code hosts. To add repositories, users must first have a code host connection.
Action items for first iteration:
-
New "Repositories" view in user settings
-
If user does not have any code host connections, display a placeholder that links them to add a code host connection.
-
When user has repositories, list those repositories.
-
By default, group repositories by code host and by user/organization.
-
Display an icon for each code host.
-
Indicate sync status for each repository. Repositories currently syncing or awaiting sync show a spinner.
-
Search input to filter repositories. This should be debounced and filter the list in place.
-
Support pagination (repos/page TBD).
-
Indicate how many repositories there are from how many code host connections.
-
Action item to "Manage repositories."
-
-
View in Figma:
-
New "Manage repositories" view
-
Divide into two sections: "Your repositories" and "Other repositories."
-
Since this iteration won't include third-party login connections, users can add "Other repositories" but not "Your repositories." Show a disabled state "Your repositories."
-
"Your repositories" is a radio list with three options: All mine, all selected orgs/users, selected repos.
-
"All mine": Syncs all repos now and created in the future, on all connected code hosts. No futher sub-UI.
-
"All from selected orgs/users": Sub-UI that lists users and organizations the user can access via code host connections. Grouped by code host, with an icon.
-
"Selected repositories":
-
List of repositories that can be selected. Status indicated with checkbox. Entire row is clickable to toggle state.
-
Checkbox above list selects all repositories, and shows a message indicating how many are selected. This will only sync current repos, not repos created in the future.
-
Search input filters repos in real time, with a debounce on the input.
-
List of repositories is paginated.
-
By default, group repositories by code host and by user/organization.
-
Private repositories are marked with an indicator.
-
-
-
"Other repositories" is a checkbox that reveals a text input. Text input supports URLs to repositories on connected code hosts, one URL per line.
-
In the first iteration, before private repositories are available, users can only add "Other repositories" by pasting URLs once they have a code host connection. This is to avoid complications around "All my (public) repositories" turning into "All my public and private repositories."
-
Users will have to have a login connection with a third-party auth provider to add their own repositories.
-
View in Figma:
On the radar in case it affects implementation:
- The "Manage repositories" UI will be re-used in the future signup flow, with slightly different sizing.