webcompat / webcompat.com

Source code for webcompat.com
https://webcompat.com
360 stars 191 forks source link

Add more internal links on /activity/user to help navigation flow #1418

Open heatherbooker opened 7 years ago

heatherbooker commented 7 years ago

There are two spots in /activity/<user> I see that would be nice if the text was linked, so that you can navigate more smoothly with less effort. (I also see there has been some discussion going on around /activity endpoints so feel free to close if irrelevant!)

1) When you try to go to /activity/\ and are not logged in, the "log in" part of the following message could be linked:

Yikes! Unauthorized. Please log in. (401)

2) When you go to /activity/ and are logged in, the "go report something" part of the following message (under "Issues reported by \") could be linked:

Nothing here currently, go report something!

Just suggesting because my brain is lazy and wants to look no further than the error message to know what to click next. :)

zoepage commented 7 years ago

Seems to be related to https://github.com/webcompat/webcompat.com/issues/1391 :)

Maybe also @karlcow would like to add some input here? :)

karlcow commented 7 years ago

Related to this we currently have

Back to to the issue.

So when not logged in on webcompat.com

GET https://webcompat.com/activity or https://webcompat.com/activity/

There is a 404 status code, which is good because there is no resources here and no link from anywhere on the site to this.

This URI has currently no attached semantics. #1406 proposed to do just that, create a semantics on this URI.

Now as I explained on a call the status code that we receive in an HTTP response is not tied to the body.

Here the HTTP headers.

HTTP/1.1 404 NOT FOUND
Connection: keep-alive
Content-Encoding: gzip
Content-Security-Policy-Report-Only: default-src 'none'; connect-src 'self'; font-src 'self'; img-src 'self' https://www.google-analytics.com https://*.githubusercontent.com; script-src 'self' 'unsafe-eval' 'unsafe-inline' https://www.google-analytics.com; style-src 'self' 'unsafe-inline'; report-uri /csp-report
Content-Type: text/html; charset=utf-8
Date: Sat, 11 Mar 2017 03:06:02 GMT
Server: nginx/1.1.19
Strict-Transport-Security: max-age=31536000; includeSubDomains;
Transfer-Encoding: chunked
Vary: Accept-Encoding
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block

capture d ecran 2017-03-11 a 04 02 03.

So instead of the Yikes only, we could have a message saying the same current thing, but proposing people to navigate somewhere to the homepage or maybe the about or contribute page. This is different to what is proposed in #1391 A redirect on a page means the content has moved temporally here or permanently other there. Aka there was something here and we moved it elsewhere. (Like a shop closing, and giving the new address 301 permanent redirect )

GET https://webcompat.com/activity/foobar

This parts seems a duplicate of #877

gives currently a 401 which is also the correct answer in certain cases, but not all. :) See #877 for the details. And indeed would benefit of getting a link to https://webcompat.com/login