hypothesis / product-backlog

Where new feature ideas and current bugs for the Hypothesis product live
118 stars 7 forks source link

Remove the hypothes.is/stream page #394

Open seanh opened 6 years ago

seanh commented 6 years ago

The legacy "stream" page at https://hypothes.is/stream should be removed. This page hasn't been used since we introduced the new https://hypothes.is/search page a long time ago (I don't think there are any links to /stream anywhere anymore).

The /stream page, even at its peak when we were actually using it as on of the primary pages of Hypothesis, always had a lot of bugs.

Because of the way it's implemented (the client sidebar code is reused to provide this standalone page) the stream page often receives a lot of bugs - changes made to the sidebar accidentally break the stream.

Because the stream is now legacy and no one uses it, these bugs go unnoticed and pile up.

Some issues that can currently be observed on https://hypothes.is/stream:

  1. Message not available cards instead of realtime annotations

    screenshot from 2017-12-04 13-22-50

  2. The username of the logged in user, instead of the annotation's creator, appearing on annotation cards

  3. Reply buttons and functionality extremely badly broken

    screenshot from 2017-12-04 13-30-02

  4. Scrolling completely broken

    peek 2017-12-04 13-32

  5. Third-party annotations, which don't work properly on the stream, are nonetheless appearing on the stream.

  6. Probably a lot more problems.

Some of these issues are over a year old.

See also: Slack discussion.

It would take a long time to fix all of the above bugs, and for the reasons cited above more bugs are just going to appear anyway, so my suggestions is that we just remove the stream page.

robertknight commented 6 years ago
  1. Message not available cards instead of realtime annotations

As you've noted, this is a longstanding known bug.

  1. The username of the logged in user, instead of the annotation's creator, appearing on annotation cards

I can reproduce this for annotations that are added after the page is loaded in response to Web Socket notifications. From some brief debugging I see that what is happening is:

  1. Annotation notifications from the web socket are missing a "user_info" field.
  2. The client dispatches an ADD_ANNOTATIONS action with the annotation received from the WS
  3. After that action is dispatched, a new annotation is added to the app state and user_info is populated. It looks like this is done (in the wrong place) here: https://github.com/hypothesis/client/blob/0315976d8dd55ae7254b1b740120f1a8787f7a07/src/sidebar/components/annotation.js#L113

So it looks like the bug here is actually an issue in "h" where the user_info field is missing in WS notifications, at least in certain contexts.

  1. Reply buttons and functionality extremely badly broken
  2. Scrolling completely broken

I'm not going to look into these right now, but as with the username issue above, there is a possibility that the error is just a symptom of something broken in the app that may apply in other contexts.

  1. Third-party annotations, which don't work properly on the stream, are nonetheless appearing on the stream.

This is happening because the /search API does not filter annotations by authority and we don't provide any way to do this in the API either.