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

Only 30 comments shown for an issue on the webcompat site #1044

Closed
hallvors opened this issue May 10, 2016 · 7 comments
Closed

Only 30 comments shown for an issue on the webcompat site #1044

hallvors opened this issue May 10, 2016 · 7 comments
Assignees

Comments

@hallvors
Copy link
Contributor

Compare the number of comments shown here:
webcompat/web-bugs#1470
and here:
https://webcompat.com/issues/1470

The webcompat site seems to show only the first 30 or so.

@hallvors
Copy link
Contributor Author

https://developer.github.com/v3/issues/comments/#list-comments-on-an-issue - probably some paging built-into the API, note how the example shows LINK rel=next header..

@miketaylr
Copy link
Member

Yeah, just had that same thought. Shouldn't be very hard to fix, thanks @hallvors.

@miketaylr
Copy link
Member

miketaylr commented May 12, 2016

So, a couple of different ways we could fix this:

  1. At the API (server) level. If we detect pagination, we request until the last page, lump all the comments into a single response and serve that to the client.
  2. At the client level. Similar to option 1, but we do it with JS. Not sure there's any benefit, because comments are loaded after we render everything else.
  3. At the client level. We can lazily load comments 31+ after initial page load, or if you scroll down. Downside is if you tried to bookmark a comment that hasn't been loaded yet, it won't work the way you intended it to.

@karlcow thoughts?

@miketaylr
Copy link
Member

(I kinda feel like the first option is the way to go, but open to other ideas)

@adamopenweb
Copy link
Collaborator

adamopenweb commented May 20, 2016

@miketaylr number 1 sounds best. Do you think it will increase load times? (I'm guessing this scenario doesn't happen very often)

@miketaylr
Copy link
Member

@adamopenweb Thanks. It might a bit -- but it should only do that for issues with more comments (which as you say, it pretty rare).

I also thought of a cheap hack, we can actually request up to 100 comments at a time. So we can do a quick band-aid fix and then maybe our Outreachy participant can work on the "good" fix. :)

@miketaylr
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants