app icon indicating copy to clipboard operation
app copied to clipboard

feat: Public workspaces don't have a path auth when creating a new workspace without being logged in

Open bdougie opened this issue 1 year ago • 22 comments

Situation

I was testing the public workspace for OpenSauced to see what the experience was like if a repository insight was shared.

https://app.opensauced.pizza/workspaces/1b814876-2007-4125-91bf-9792b93ee6d2/repositories

Below is an incognito browser that I am not logged into OpenSauced with.

Screen Shot 2024-02-28 at 3 49 06 PM

Problem

When I click "create a workspace" I'd expect to be asked to log in. Instead I get a 404.

Screen Shot 2024-02-28 at 3 49 09 PM

Solution

Add an auth redirect that takes the user to log in and return to the creation flow.

Additional info

Also pizza.new is broken because of this.

bdougie avatar Feb 28 '24 23:02 bdougie

Thanks for the issue, our team will look into it as soon as possible! If you would like to work on this issue, please wait for us to decide if it's ready. The issue will be ready to work on once we remove the "needs triage" label.

To claim an issue that does not have the "needs triage" label, please leave a comment that says ".take". If you have any questions, please reach out to us on Discord or follow up on the issue itself.

For full info on how to contribute, please check out our contributors guide.

github-actions[bot] avatar Feb 28 '24 23:02 github-actions[bot]

It 404s at the moment because they're not logged in. It's a 401 really but we pretend like the page is not found like GitHub does for stuff you don't have access to.

The Create workspace link is supposed to be removed when logged out. It didn't make it into the MVP. If we want to keep it, we can redirect to the login.

nickytonline avatar Feb 29 '24 01:02 nickytonline

We can do either, but I lean toward some action encourages the not logged in user is recommended to log in.

Maybe that is replacing the drop down with sign up to do X

bdougie avatar Feb 29 '24 01:02 bdougie

I think the redirect to login makes sense. Thoughts @brandonroberts @isabensusan?

nickytonline avatar Feb 29 '24 12:02 nickytonline

Redirect works for me. It does bring up the question of whether we want to automatically send people to the GitHub login modal, or back to the feed to login, and redirect them back to the previous page

brandonroberts avatar Feb 29 '24 14:02 brandonroberts

Or perhaps a dedicated login page with the GitHub login

brandonroberts avatar Feb 29 '24 14:02 brandonroberts

A dedicated login page would make sense.

nickytonline avatar Feb 29 '24 14:02 nickytonline

Let's not hide the "Create a new workspace" cta for non-logged in users, we want to leverage every chance we get to entice non-logged in users to login/signup.

Here's a couple low/mid-effort ways I can think of to tackle this UX: A - [lowest effort] When the non-logged in user hovers over the "create new workspace" button, we show a tooltip saying "You need to log in to create a new workspace" --> on click we redirect to the Github Login B - If a non-logged in user clicks on the "create new workspace" button, we trigger a "Login" saying that they need to login to create a workspace, and show the "Connect with GitHub" CTA --> on click we redirect to the Github Login (that way we avoid creating a dedicated login page for now, which isn't super high priority atm).

B would be preferred, but I know modals can be trickier than they seem @nickytonline . We can always come back and create a dedicated login page in the mid term, but ideally we fix this quicker with one of these two solutions.

@brandonroberts @bdougie @nickytonline any thoughts?

isabensusan avatar Feb 29 '24 16:02 isabensusan

I lean towards B. Shortcuts tend to be permanent solutions.

Perhaps this is A as a PR 1 and then B as a follow up PR?

bdougie avatar Feb 29 '24 17:02 bdougie

Option B sounds good to me. We have some examples for modals already

brandonroberts avatar Feb 29 '24 17:02 brandonroberts

Bumping this.

I preparing a demo for a team and realize this will be a little awkward with me manually adding them, but that would require them connecting their GitHub first.

Note: this is a large enterprise and chances that happening is low.

bdougie avatar Mar 18 '24 23:03 bdougie

So we want the "Create New" buttons to make them connect their GitHub?

brandonroberts avatar Mar 19 '24 04:03 brandonroberts

I'd defer to @isabensusan on the specifics what we put there, but if we leave it as "create a workspace" we should remove the dropdown and convince the user to click and log in to onboard.

This is an edge case that we should shepherd towards a viral loop eventually.

bdougie avatar Mar 19 '24 12:03 bdougie

Suggested Solution

Here's an approach we could take for now (as described in the mock):

  1. Show a pill next to the workspace name in the header that says "public"
  2. Add the copy: “Sign up to get your own workspace” to the login button in the navbar
  3. Remove the dropdown, instead replace it with the name of the workspace (and the orange square, to add a pop of color)

And as an extra: 4. Add a card in the sidebar to entice users to create their own workspace with a CTA to connect their github account, and with a "Learn More" link to workspaces documentation (link to use)

image

Non suggested approach

We could also add a toast, but because we are already showing the "introduction to workspaces" modal, I don't want to add more pop ups that could get too annoying. Adding an option to create your own workspace within the "introduction to workspaces" modal isn't an option either, because people won't know what a workspace even is yet.

isabensusan avatar Mar 19 '24 18:03 isabensusan

Suggested Solution

Here's an approach we could take for now (as described in the mock):

  1. Show a pill next to the workspace name in the header that says "public"
  2. Add the copy: “Sign up to get your own workspace” to the login button in the navbar
  3. Remove the dropdown, instead replace it with the name of the workspace (and the orange square, to add a pop of color)

And as an extra: 4. Add a card in the sidebar to entice users to create their own workspace with a CTA to connect their github account, and with a "Learn More" link to workspaces documentation (link to use)

image ## Non suggested approach We could also add a toast, but because we are already showing the "introduction to workspaces" modal, I don't want to add more pop ups that could get too annoying. Adding an option to create your own workspace within the "introduction to workspaces" modal isn't an option either, because people won't know what a workspace even is yet.

I like the CTA for connecting GH in the sidebar, but probably for large screens only. There wouldn't be much realestate on a phone in the sidebar for it.

For the Public pill, I'm going to create a separate issue for that as that's a nice addition in general outside of this feature.

nickytonline avatar Mar 20 '24 12:03 nickytonline

I created #2981 for the Public/Private pill.

nickytonline avatar Mar 20 '24 12:03 nickytonline

I wonder if on mobile we can create a bottom banner to entice non logged in users to sign up so we don't lose that opportunity?

image

isabensusan avatar Mar 21 '24 14:03 isabensusan

Part of this is resolved by https://github.com/open-sauced/app/pull/2935 where you can start the creation of a new workspace without being logged in, connect your account, and finish completing it.

https://github.com/open-sauced/app/pull/2935

brandonroberts avatar Apr 01 '24 17:04 brandonroberts

Is this resolved or do we want to do more work here? When I checked in the incognito window, I can start to create, but the only buttons I can use are connect with GH? This is better than a 404, but is also a little confusing. It feels like you're missing a button.

image

BekahHW avatar Apr 25 '24 14:04 BekahHW

This is not resolved. The user is still presented with a blank dropdown. Adding context to the sidebar should be a follow up to #3259

https://github.com/open-sauced/app/issues/2812#issuecomment-2007917285

bdougie avatar Apr 30 '24 04:04 bdougie

Related https://github.com/open-sauced/app/issues/3377

bdougie avatar May 15 '24 13:05 bdougie

Is this resolved or do we want to do more work here? When I checked in the incognito window, I can start to create, but the only buttons I can use are connect with GH? This is better than a 404, but is also a little confusing. It feels like you're missing a button.

The problem is fixed now you can open the workspace creation flow. I don't think there is enough for the user to have context on why they would create a workspace.

I'd love for us to scope this design @isabensusan did to prompt the user to "get their own workspace"

image

This already exist on mobile

Screenshot 2024-05-15 at 6 48 13 AM

bdougie avatar May 15 '24 13:05 bdougie