Instead, the original was displayed even when the edit was available.
This bug was introduced:
* in 7c935ab for all edited posts, and
* when rich diffs where first added, but only in cases where a perent
comment was edited, and that parent was loaded by clicking `parent`
from a top-level permalinked comment.
To reproduce the bug with the older code, visit
https://www.unddit.com/r/space/comments/y8ul7n/_/it2cz6o/
and then click the Parent link on the top-most comment. Installing
eslint-plugin-react-hooks hopefully prevents future related bugs.
The codebase hasn't been checked against Standard in ages, so remove it
and configure plain ESLint and eslint-plugin-react instead. Also fix a
few small bugs discovered by ESLint and plugin-react.
With Pushshift's increase in the maximum request size from 100 to 250
comments, this also increases the Reddit request rate by 2.5x. This
makes it possible to overrun the API limits, so start tracking and
respecting them. Also switch back to logging into Reddit to increase
these limits.
Appending `?context=#` to a permalink will highlight the permalinked
comment and display above it up to 8 ancestors, similar to Reddit's
behaviour. To keep things fast, this update required that the Pushshift
comments endpoint work with `ids` queries which was fixed around May 11.
Comments in the time ranges below need a workaround which slows down
Pushshift queries, but it's required to retrieve them correctly
* Sep/1/2017 0:00 - Sep/30/2017 23:59:59 UTC
* Feb/1/2018 0:00 - Mar/31/2018 23:59:59 UTC
There were two bugs when a permalinked comment was missing from
Pushshift, but available via Reddit:
* the links below the comment (`permalink reddit reveddit`) were
often broken due to calling `redditIdsToPushshift()` twice
* if removed or deleted, it wasn't counted or colored correctly
* make the post placeholder bigger to minimize the layout changes
as the post loads
* correctly add link clicks to the location history if the current
location differs from the link target
Removed/deleted self-posts are still fetched from Pushshift to get
the selftext, however there's no value in fetching link-posts.
Also:
* Don't display '[deleted]' if no selftext was deleted.
* Add key attributes to the post <div> so that React recreates
it instead of mutating it after the Post loads. This prevents
transitioning the background color (from the dark/light mode css).