github.com/shurcooL/issuesapp/...

Creating a tracker issue from a source file when anonymous fails silently. #18

Closeddmitshur opened this issue 3 years ago
dmitshur commented 3 years ago

Repro:

  1. Go into Incognito Mode
  2. Go to https://src.sourcegraph.com/sourcegraph@master/.tree/circle.yml
  3. Try to open an issue on a line
  4. Nothing happens

The error console shows that it redirects you to a URL consisting of the entire HTML page body.

This is especially bad because you lose what you typed in.

Originally filed by @sqs at https://trello.com/c/pjfcS6q2/994-creating-a-tracker-issue-from-a-source-file-when-anonymous-fails-silently.

Write Preview Markdown
dmitshur commented 3 years ago

Image

When there's no authenticated user, we should display a message like "Sign in to comment."

One thing to be careful is presenting a green "Create Thread" button when the user isn't logged in. This can prompt them to write up a detailed message, only to later realize they have no account and can't post it. That'd be a bad thing.

We can display a green Create Thread button on the main tracker page because it redirects to a page where you can start typing it (and prompt you to login first if you're not). But not on the threads pages where you post replies in-place.

Write Preview Markdown
dmitshur commented 3 years ago

/cc @renfredxh FYI.

Write Preview Markdown
renfredxh commented 3 years ago

We should be able to accomplish this by adding a user context to the Sourcegraph front-end, so we can check if the user is logged in and display a link to sign up/sign in otherwise.

Write Preview Markdown
dmitshur commented 3 years ago

I've talked with @renfredxh just now. We now have the Current User available in the frontend JS world, which was a blocker previously.

Write Preview Markdown
dmitshur commented 3 years ago

This issue was external and no longer applies to issuesapp itself. The feature of creating issues from source files is not currently available or supported.

Closing.

Write Preview Markdown
dmitshur closed this 3 years ago
to comment.