Wp-calypso: Manage Following Refreshing: formatting when only one recommended site is shown

Created on 16 May 2017  路  15Comments  路  Source: Automattic/wp-calypso

When only one recommended site is shown the follow button looks a bit lonely:

one item

This is particularly obvious when dismissing sites and you are left with one:

remove sites

Reader [Type] Bug

Most helpful comment

Deployed changes to API (D5768) that returns the correct number of requested recommendations (as long as we don't run out). Changeset 157404.

All 15 comments

weird. are you seeing any errors in your console?

Whenever it gets down to 2 it should make requests for more and fill really quickly.

its busted actually. i'll look into this

@samouri any updates on this one?

Got sidetracked yesterday. I'm back on course!

Root cause analysis:

  • The api won't respect the number of sites requested. Even though we are always requesting 4 site recs, it can (and often does) return < 4. I think this started when we started adding filtering so that it won't return already-followed sites.
  • The code relies on having the exact number requested as a mechanism to make sure it doesn't send out duplicate requests. This is clearly too fragile.

Action items:

  1. build out a more robust store for site recs
  2. @aaronyan can we fix the api as well?

I believe this should be fixed in #14247 馃憤

Reopening because it's still possible to get one recommendation:

screen shot 2017-05-24 at 11 53 14

@samouri: Yep, I think we can change the API to return the correct number of requested sites. Diff ready for review at D5768.

cc: @gibrown

@bluefuton, do you have any repro steps? I don't know how to replicate that

@bluefuton @samouri it is always going to be possible to get an odd number of recommendations, or to run out of recommendations (after dismissing some). Agree we can make the API better, but the UI should still handle the case where we run out of recos.

The sun will rise, hail will fall, and server requests will fail.

@samouri No consistent repro steps, but it definitely happens from time to time.

Agree we can make the API better, but the UI should still handle the case where we run out of recos.

+1 :)

Deployed changes to API (D5768) that returns the correct number of requested recommendations (as long as we don't run out). Changeset 157404.

Seeing as we want to look pretty even during hailstorms, I think this becomes a designer question right?

cc @jancavan @fraying

question becomes: how should the ui look when we only have one site to recommend?

how should the ui look when we only have one site to recommend?

I think it's fine how it looks now. I've removed the extra padding (as shown on that mockup^^) around a single site rec.

Was this page helpful?
0 / 5 - 0 ratings