-
Notifications
You must be signed in to change notification settings - Fork 1
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
Can't comment without scrolling. #27
Comments
@mbanerjeepalmer would a possible solution be to only show the comment box after the user has scrolled and selected a paragraph? our database isnt currently designed to support commenting on the article as a whole. |
Personally I'd argue that the problem is with the assumptions the database makes, in that case. I think this type of tool is much more useful when it's flexible. Instead perhaps we could be less tightly coupled to a particular type of content (i.e. the DOM) and database (i.e. our DynamoDB). As a short term fix, what about allowing the user to comment on the 0th paragraph? So when the page loads, the selected paragraph is set to 0. Viewers see thoughts left on the whole article and commenters leave comments on the whole article. (0th is a prescriptive solution. It could be something else, but the basic idea is 'a default that the database understands.' |
I'll have a look into this, but this requires a change in UI too. currently the comments dont display until you scroll-select a paragraph. would a comment on the whole article be displayed in the same manner to paragraph comments(in terms of location on the page) - this would mean that it disappears to give way to paragraph comments when the user scrolls. alternative is to have the "whole article" type of comments show up somewhere else, like maybe at the end of the article like a traditional blog post/news article. |
I'd suggest the first solution. A response to the whole piece of content shows in the normal UI, but only at the top. That way there's a parallel between what the commenter and reader see. Regarding the implementation
As far as I can see the box does appear when you first paste a link. So I'm suggesting that when it first loads, perhaps we set the selected index to 0. That way, both commenter and reader comment/view according to the default value. Then when the user scrolls down we increment the value. You'd need to think about the edge case though: what happens when a user wants to go back up and see/respond to the comment on the 0th index? Do we set the value to 0 when they reach the top? How would they then reach the 1st paragraph in that case? Maybe we give them some overflow area? Just some suggestions. Up to you how you want to implement - you're writing the code here. |
If you try to add a comment immediately after submitting a URL, without scrolling down, then you get an error:
Seems no paragraph is selected when the user hasn't scrolled at all.
The expected behaviour is that the user comments on the whole article.
The text was updated successfully, but these errors were encountered: