-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DRAFT: HRN 598 (1): Scroll to Post Comment Path #653
base: dev
Are you sure you want to change the base?
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## dev #653 +/- ##
==========================================
+ Coverage 47.53% 48.39% +0.86%
==========================================
Files 424 411 -13
Lines 7304 7083 -221
Branches 2024 1947 -77
==========================================
- Hits 3472 3428 -44
+ Misses 3832 3655 -177
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please consider my comment here on the PR and the one at #598 (comment)
src/components/Comment/Comment.js
Outdated
@@ -18,6 +18,7 @@ import ImageAttachments from 'components/ImageAttachments' | |||
export default function Comment ({ | |||
comment, | |||
clearHighlighted, | |||
commentIdFromParams, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to keep this component dumb in-line with what is done with highlighted
. I was hoping for this feature we would re-use the highlighted
and clearHighlight
functionality I added to the component and that it'd be controlled above where those are already managed. In particular setting highlighted
on this comment when navigating to the screen via posts/:postId/comments/:commentId
, and clearHighlight
after a timer of 1-5 seconds. I find the current border styling, and it sticking around forever after navigating a little distracting. The QA part of that all IMHO of course, but as for the code review please consider keeping this component dumb and doing display things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spent the morning trying to revise based on this and got #656
I'm guessing that there is some weird race-condition that isn't making the scroll reliable.
Also see comment here: #598 (comment) |
Hey Loren,
I've pushed up changes on a different branch to this; Essentially it seems
like there are some race-conditions on trying to manage the scrollTo from
outside of the `Comment`. That is one of the advantages of triggering the
call in the component itself; it's a guarantee that the component is
rendered and ready to be scrolled to. Please check the other PR and tell me
what you think or if I'm missing something in the implementation
…On Thu, 31 Aug 2023 at 15:04, Loren Johnson ***@***.***> wrote:
Also see comment here: #598 (comment)
<#598 (comment)>
—
Reply to this email directly, view it on GitHub
<#653 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABHT4AWOL7JMSBQQZ4T7QLTXYEDAPANCNFSM6AAAAAA4B4Z3HY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
(DRAFT 3) HRN 598: Scroll to Post Comment Path (Using comment selection system for highlighting comment from URL)
closes #598