91be939c19
## Issue Now that we batch-resolve the comment authors before displaying the comments, the linked-comment scrolling logic didn't work well with nested replies. ## Change Previously, I didn't want to put the logic at the lowest level (`Comment`) because it was hard for the child to know whether to scroll or not. For example, we don't want to scroll when user changes the comment filters or presses the Refresh Comments button. Relented and moved the logic to `Comment`, and pass a flag via `window` (I know this is frowned upon by some) to indicate whether a scrolling is needed. This is probably more efficient overall as we don't need to scan the DOM, and with minimal delay as we scroll immediately after the linked-comment is mounted. ## Known issues In markdown posts with lots of images, a layout shift due to delayed inline-image fetching can cause the scrolling to be inaccurate. This should be fixed by reserving space for markdown post images. |
||
---|---|---|
.. | ||
component | ||
constants | ||
effects | ||
modal | ||
page | ||
redux | ||
scss | ||
util | ||
analytics.js | ||
app.js | ||
comments.js | ||
i18n.js | ||
index.jsx | ||
logWarningConsoleMessage.js | ||
native.js | ||
recsys.js | ||
reducers.js | ||
rewards.js | ||
store.js |