Open akolson opened 6 months ago
@akolson , Could you assign this to me?
Hi @shivam-daksh, this is a larger issue that is currently now 'help wanted'. I can chat with my colleagues on whether this would be available for contribution, but since I assigned you some other issues just a while ago, please message us again here after those are resolve. Generally I would recommend searching for 'help wanted' - chances of assignment are higher there.
Overview
This task involves implementing pagination to show more recommendations. Pagination is based on whether recommendations are above (good) or below (not so good) the relevance threshold. Other tasks include implementing loading and errors states, and API interaction. API interaction is based on data from the public API for now, as the recommendations backend is still in development.
Description and outcomes
Design requirements
A maximum of
10
recommendations are loaded at a time (See Figma designs).If
10
resources are recommended on initial load;View more
link that loads more resources.< 10
resources are recommended on clickView more
,Show other resources anyway
link that loads resources below the relevance threshold.Show other resources anyway
link when there are no more resources below the relevance threshold.View more
link again that loads more resources.If
< 10
resources are recommended on initial load;Show other resources anyway
link that loads resources below the relevance threshold.Show other resources anyway
link when there are no more resources below the relevance threshold.if
0
resources are recommended on initial load;Show other recommendations
link that loads resources below the relevance threshold.Show other recommendations
link when there are no more resources below the relevance threshold.When loading recommendations initially, an indeterminate spinner is displayed.
Clicking
View more
,Show other resources anyway
,Try again
, orShow other recommendations
links displays an indeterminate spinner below the current recommendations.When an error is encountered, an appropriate message and a
Try again
link, that reloads the failed recommendations, is displayed.The spinner is dismissed once loading of recommendations is completed or an error occurs.
The spinner should always be after the last recommendation (if any).
Markup requirements
Styling requirements
Architectural requirements
/mock/recommendations?overrideThreshold=true
.overrideThreshold
is an optional query parameter that allows recommendations that may not be useful to be returned to the user. It is aboolean
, with a default value offalse
.Acceptance Criteria
View more
,Show other resources anyway
, andShow other recommendations
links display the intended pagination, and loading behavior.Try again
link is displayed in the event of an error while loading recommendationsAssumptions and Dependencies
The mock backend (See Architectural requirements);
overrideThreshold
query parameter to return recommendations that may not be useful to a user.Is blocked by;
Scope
The scope of this task is limited to;
Accessibility Requirements
NA
Resources