You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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;
Display the View more link that loads more resources.
If < 10 resources are recommended on click View more,
Display the Show other resources anyway link that loads resources below the relevance threshold.
Hide the Show other resources anyway link when there are no more resources below the relevance threshold.
Else display the View more link again that loads more resources.
If < 10 resources are recommended on initial load;
Display the Show other resources anyway link that loads resources below the relevance threshold.
Hide the Show other resources anyway link when there are no more resources below the relevance threshold.
if 0 resources are recommended on initial load;
Display the Show other recommendations link that loads resources below the relevance threshold.
Hide the 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, or Show 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).
Implement a mock backend that uses data from the public API.
Use Mock Service Worker, a client agnostic library, to mock the recommendations request.
The endpoint is /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 a boolean, with a default value of false.
The mock backend should interact with the UI to provide pagination behavior, and loading and error states as described in the Figma designs.
Acceptance Criteria
Clicking the View more, Show other resources anyway, and Show other recommendations links display the intended pagination, and loading behavior.
Pagination support text is displayed as specified in the Figma designs.
A Try again link is displayed in the event of an error while loading recommendations
Appropriate text is displayed incase of errors during loading as specified in the Figma designs.
Tests are written to verify correctness of page.
Assumptions and Dependencies
The mock backend (See Architectural requirements);
akolson
changed the title
[WIP - DO NOT ASSIGN]: Implement pagination for recommended resources
Implement pagination for recommended resources
Jun 14, 2024
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;
Import from other channels
page to display recommendations #4565Scope
The scope of this task is limited to;
Accessibility Requirements
NA
Resources
The text was updated successfully, but these errors were encountered: