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

Followers/Following list doesn't contain all items, pagination needed #258

Closed
aershov24 opened this issue Aug 1, 2018 · 12 comments · Fixed by #4375
Closed

Followers/Following list doesn't contain all items, pagination needed #258

aershov24 opened this issue Aug 1, 2018 · 12 comments · Fixed by #4375
Labels
bug always open for contribution external contributors welcome contribution is welcome!

Comments

@aershov24
Copy link

TASK or Feature

Request or User Story

It seems there is currently a limitation how many followers you could see on the https://dev.to/dashboard/user_followers page. Consequently there is no ability to follow people back who followed you while ago.

Definition of Done

user_followers page contains all the list of following users or has pagination to reach anyones contact to follow back.

@jessleenyc
Copy link
Contributor

@benhalpern are you thinking pagination or infinite scroll for this?

@stale
Copy link

stale bot commented Jan 7, 2019

Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue in 7 days. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If this issue still requires attention, please respond with a comment. Happy Coding!

@stale stale bot added the stale label Jan 7, 2019
@stale stale bot closed this as completed Jan 14, 2019
@michael-tharrington
Copy link
Contributor

Need to reopen.

@jessleenyc
Copy link
Contributor

This is approved if anyone wants to work on it.

@omenking
Copy link
Contributor

omenking commented Apr 9, 2019

@jessleenyc what was wanted here? infinite scroll or traditional pagination?

@jessleenyc
Copy link
Contributor

@omenking let's go with infinite scroll!

@omenking
Copy link
Contributor

omenking commented Apr 9, 2019

So infinite scroll exists on articles/index so going to see how I can translate that over to the dashboard/followers page.

Here I see a loading articles element

    <div class="loading-articles" id="loading-articles">
      loading...
    </div>

I'm thinking this has the js required to infinite scroll

<%= render "stories/stories_list_script" %>

Yep it looks like I'm right. I can do the same here for the other page. I do wonder if @benhalpern wants inline javascript because I would think it may be preferred for this code to go into app/javascripts. My though being this code does not get minified/uglified being over here. I don't personally care which way but can align to whatever standards the project wants to achieve.

You know what. I think stories_list_script doesn't have to do with infinite scroll now that I'm reading it.

@omenking
Copy link
Contributor

omenking commented Apr 9, 2019

Doing a search for 'loading-articles I was able to locate infinite scroll functionality.

Screen Shot 2019-04-09 at 7 30 40 PM

I see an insertArticles and so I guess I'll be writing an insertFollowers / insertFollowings
I'm seeing Algolia being used here which I'm seeing is used everywhere in the app. I guess Algolia is not just used for search but is also a cache for many other things

user-dashboard is being used for multiple elements from different pages but I need a distinct id for each of theses pages so changing

  • user-dashboard-articles for dashboards#show
  • user-dashboard-following for dashboards#following
  • user-dashboard-followers for dashboards#followers

Oh, dashboard#following is not as straightforward as followers because it has multiple sub listings eg.

  <h2>Followed tags (<%= @user.following_tags_count %>)</h2>
  <h2>Followed users (<%= @user.following_users_count %>)</h2>
  <h2>Followed organizations (<%= @followed_organizations.count %>)</h2>

This is problematic here, I'll have to see what this looks like production. Maybe will need to break these up into their own pages so we can then add infinite scroll.

So see here. So a sub navigation could be added or there can be one flat nav. In either cases these need to be on their own page. So I will do that and then ask how we would like the nav to work.

Screen Shot 2019-04-09 at 7 45 31 PM

Look at that we have lots of room:

Screen Shot 2019-04-09 at 8 03 47 PM

Okay so biggest issue here is I don't have sufficent seed data, going to spin up a new ticket to do that now.

omenking added a commit to omenking/dev.to that referenced this issue Apr 10, 2019
This was referenced Apr 10, 2019
@eschafer
Copy link

Hi - just wanted to point out that this page has a footer, which would potentially be really difficult to get to with an infinite scroll above it.

@omenking
Copy link
Contributor

This is the footer. I think this would be negligible if we couldn't access it because of the infinite scroll.

Screen Shot 2019-05-12 at 12 30 12 PM

I really want this feature so I'm going get on this again this week. It's mostly done but I have to do Q&A with it.

@johncurcio
Copy link
Contributor

I'd love to work on this if nobody is working anymore. @omenking are you still working on this?

@omenking
Copy link
Contributor

omenking commented Oct 9, 2019

go for it. I did finish it but was never able to have it easily tested based on the lack of seed data

johncurcio added a commit to johncurcio/dev.to that referenced this issue Oct 11, 2019
johncurcio added a commit to johncurcio/dev.to that referenced this issue Oct 11, 2019
johncurcio added a commit to johncurcio/dev.to that referenced this issue Oct 11, 2019
johncurcio added a commit to johncurcio/dev.to that referenced this issue Oct 21, 2019
johncurcio added a commit to johncurcio/dev.to that referenced this issue Oct 21, 2019
johncurcio added a commit to johncurcio/dev.to that referenced this issue Oct 21, 2019
johncurcio added a commit to johncurcio/dev.to that referenced this issue Nov 13, 2019
johncurcio added a commit to johncurcio/dev.to that referenced this issue Nov 13, 2019
johncurcio added a commit to johncurcio/dev.to that referenced this issue Nov 13, 2019
benhalpern pushed a commit that referenced this issue Nov 20, 2019
…4375) [deploy]

* Add infinite scroll to followers list (#258)

* Refactor fetchNext function for clarity (#258)

* Sepparate following tab into multiple tabs to support infinite scroll (#258)

* Add infinite scroll to following pages (#258)

* Add tests to infinite scroll api

* Refactor dashboard loading text

* Refactor infine scroll function

* Fix duplicated entries problem in infinite scrolling

* Switch randomized attributes to sequential to avoid InvalidRecord error

* Add acceptance tests for infinite scroll

* Remove unused following method

* parameterize limit per page for followers and followings

* Split follows endpoint into followers and followings

* Authenticate user with api key in followers and followings

* Split followers endpoint into users and organizations

* Add redundant html to sublist partial

* Speed up infinite scroll tests

* Refactor api json responses to use partials

* Authenticate api user before follows create

* Resolve conflicts on scrolling js

* Improve partials organization and fix organization username bug

* Improve readability of unauthorized test

* Use let! to create scrolling test data

* Fix not working podcasts link

* Refactor initScrolling to remove linting errors

* Fix codeclimate coding style issue

* Test tags forms and podcasts hyperlinks

* Fix eslint issue with double equals

* Improve before_action usage and readability
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug always open for contribution external contributors welcome contribution is welcome!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants