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

Handle admin-menu error via action dispatch in data layer #45585

Closed
getdave opened this issue Sep 11, 2020 · 2 comments
Closed

Handle admin-menu error via action dispatch in data layer #45585

getdave opened this issue Sep 11, 2020 · 2 comments
Labels
[Feature] Calypso & wp-admin Navigation All navigation in Calypso and wp-admin, and the unified transitions between the two. [Type] Task

Comments

@getdave
Copy link
Contributor

getdave commented Sep 11, 2020

Sub Issue of #45435

Currently we not handling any errors in the admin-menu data layer

export const handleError = () => {
return null;
};

We need to to decide on the UX if the API encounters an error. How do we handle this? Fallback nav items? Show error message?

More specific tasks include:

  • Create a new action which updates admin-menu state to record the ADMIN_MENU_REQUEST_ERROR state.
  • Reformat adminMenu state to be combined reducers for ui and items so that we can have a flag for the current state of the fetch for menu items (eg: dispatched, success, failed).
  • Dispatch the correct action in the data-layer error scenario and update state accordingly.
@getdave getdave added the [Feature] Calypso & wp-admin Navigation All navigation in Calypso and wp-admin, and the unified transitions between the two. label Sep 11, 2020
@getdave
Copy link
Contributor Author

getdave commented Sep 28, 2020

@Automattic/ajax Any ideas on scenarios where we might need to handle an error from the API in a user-facing manner. If not then we can close out this task.

@obenland
Copy link
Member

Let's close it out for now. We can reopen when we do come across a scenario for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Calypso & wp-admin Navigation All navigation in Calypso and wp-admin, and the unified transitions between the two. [Type] Task
Projects
None yet
Development

No branches or pull requests

3 participants