Skip to content
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

Scroll to comments if being linked to #546

Merged
merged 1 commit into from
Jun 12, 2015
Merged

Conversation

aweiksnar
Copy link
Contributor

  • Scrolls the window to comments if they are linked to, will be more useful as page-sizes grow

@brian-c
Copy link
Contributor

brian-c commented Jun 12, 2015

I'm cool with this, it works fine. But linking to specific sections on a page is typically done with the hash. What do you think of giving the comment root an id="comment-#{@props.comment.id}" and making the links #/talk/1/2?page=3#comment-4?

@aweiksnar
Copy link
Contributor Author

Agree that is a better semantic for linking to parts of the page, but I don't think it works as well with react-router currently like it does out of the box in the browser [https://github.com/remix-run/react-router/issues/394 + some others]. Since these links are presumably going to be visited on hard page refreshes, perhaps it makes more sense to handle at the component level for now

@brian-c
Copy link
Contributor

brian-c commented Jun 12, 2015

Eh, gross, oh well.

brian-c added a commit that referenced this pull request Jun 12, 2015
@brian-c brian-c merged commit 3699c52 into master Jun 12, 2015
@brian-c brian-c deleted the scroll-to-linked-comments branch June 12, 2015 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants