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

Add components for different states of the API response #1001

Open
wants to merge 8 commits into
base: vb-ld/add-saved-article-routing-behind-switch
Choose a base branch
from

Conversation

lindseydew
Copy link

@lindseydew lindseydew commented Feb 20, 2023

What does this change?

This PR adds the basic components we'll need for rendering the Save for Later page. Since this feature is behind a switch, this is intended as a work in progress to give us the files we need to start iterating on the project. We still need to flesh out what the API request and response will be, which is why this is just testing mocking a call to an external service for now.

How to test

We should check that there is no visibility of these pages in PROD as is it behind a switch.

How can we measure success?

Have we considered potential risks?

Images

Accessibility

Base automatically changed from ld-switches-configuration to vb-ld/add-saved-article-routing-behind-switch February 21, 2023 10:18
saveForLaterAPICall: () => Promise<unknown>;
}

export function SavedArticlesPage(props: SavedArticlesPageProps) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonder if it's worth looking at the AsyncLoader utility used by the AccountOverview? There seem to be two async loaders in use in this repo - useAsyncLoader hook and the AsyncLoader class compononent. I would check with the rest of the MMA team which component is preferred and see if we can align our work with that.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah good shout, I think from our discussion yesterday we think hooks is the right approach?

@lindseydew lindseydew force-pushed the ld-display-saved-articles branch from 5a4f462 to bed6733 Compare February 23, 2023 09:40
@lindseydew lindseydew changed the title Display an error page if S4L call fails Add components for different states of the API response Feb 23, 2023
@lindseydew lindseydew marked this pull request as ready for review February 23, 2023 09:41
@vlbee vlbee force-pushed the vb-ld/add-saved-article-routing-behind-switch branch from 2a75263 to dda4adf Compare March 1, 2023 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants