Skip to content

user invites: Add home page invite colleagues feature

Administrator requested to merge ps/homepage-invite-flow into main

Created by: philipp-spiess

Fixes https://github.com/sourcegraph/sourcegraph/issues/31558 Fixes #31703 (closed)

This is a first iteration on the UI for the changes explained in https://github.com/sourcegraph/sourcegraph/issues/31558.

We want to allow users to invite potential collaborators when they have finished the post-sign-up process and on on-prem.

We're still working on further improving the messaging for users and admins, so this is not intended to be shipped this way (hence I put it behind the experimental feature flag). I wanted to get this up for review already though since it slowly grows and it's better to merge into main to avert further diversion.

TL;DR of my changes:

  • We add a new feature flag that, when enabled and the instance has emails configured, will change the saved searches/community contexts section into a tab panel and display the invitations panel there as well.
  • The invitations panel was made so that it works in all screen sizes. Individual users shown there are buttons and it will show the invite text when hovering or focusing via keyboard navigation.
  • The tab panel will remember the selection so a user can opt-out of this view by switching to the other tab just ones.
  • The test plan contains screenshots to make sure nothing regresses when the feature flag is disabled.
  • Most of the meat here was about getting the layout to work correctly, especially in responsive mode.

Test plan

I plan on adding UI tests later as we have ruled out some of the edge cases here and are closer to opening up the feature flag so for now you have to suffice with a collection of screenshots and videos.

Test Matrix

Cloud On-Prem
Disabled cloud-disabled onprem-disabled
Mail not configured cloud-no-email-enabled---NOTE onprem-no-email-enabled---NOTE
No contributors cloud-no-contributors onprem-no-contributors
Recommendation cloud-recommendation onprem-recommendation

Note: When Emails are not configured, we might want to change the text cc @rrhyne.

Functionality

https://user-images.githubusercontent.com/458591/156162865-9b78c199-10fd-4450-bf8b-f6678835ed0c.mov

Responsive Mode

https://user-images.githubusercontent.com/458591/156162709-45327481-87a3-4d8c-85b1-95b3fc3db26d.mov

Merge request reports

Loading