Skip to content

Commit

Permalink
docs: EDU-10188 New content (#2029)
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusps authored Oct 24, 2024
2 parents f470ee2 + 646b292 commit 2fc054a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
8 changes: 7 additions & 1 deletion packages/docs/pages/components/collection/best-practices.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,10 @@ Read the EmptyState documentation for more information.

- **No items have been created or received:** Hide elements that are unnecessary in this state such as any Search, Filter, and Pagination.
- **The search works but no results match the terms:** Keep the Search, Filters, and any Buttons active, and disable both Paginations.
- **Items fail to load or the search fails to return results:** Keep the Search and Filters active, and disable both Paginations. Disable any other button that can't be triggered while in this state.
- **Items fail to load or the search fails to return results:** Keep the Search and Filters active, and disable both Paginations. Disable any other button that can't be triggered while in this state.

### Updating content

- The content on a page should only be updated after an explicit action taken by the user.
- In a listing, if the user tries to access a page that does not exist, either by typing the page number directly into the URL (e.g., ?page=5) or refreshing the page, the system should redirect them to the last available page and display a temporary yellow toast message informing that the page does not exist.
- If the user tries to access an item from a listing that has been deleted, they should be redirected back to the listing and see a temporary yellow toast message informing that the item is no longer available.
8 changes: 7 additions & 1 deletion packages/docs/pages/components/pagination/best-practices.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ Show a loading Pagination when the list is loading, since the number of results
- **Returning after creating an item:** When the user has just created an item and returns to the listing, they should go to the first page with updated results.
- **Returning after editing an item:** When the user has just edited an item and returns to the listing, they should see a list with the same items as before, but with the edited item updated.

### Updating content

- The content on a page should only be updated after an explicit action taken by the user.
- In a listing, if the user tries to access a page that does not exist, either by typing the page number directly into the URL (e.g., ?page=5) or refreshing the page, the system should redirect them to the last available page and display a temporary yellow toast message informing that the page does not exist.
- If the user tries to access an item from a listing that has been deleted, they should be redirected back to the listing and see a temporary yellow toast message informing that the item is no longer available.

### Returning after navigating

The complete search query, which includes the filters, the current page, and the search terms, should be reflected in the URL. This allows the user to easily return to the customized view and easily share it. Don’t use local storage or cookies to store the query.
The complete search query, which includes the filters, the current page, and the search terms, should be reflected in the URL. This allows the user to easily return to the customized view and easily share it. Don’t use local storage or cookies to store the query.
8 changes: 7 additions & 1 deletion packages/docs/pages/components/table/best-practices.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,10 @@

### Scrolling horizontally

The column with the information that identifies the item, such as ID or Name, should be fixed so the user can understand the information even during horizontal scroll.
The column with the information that identifies the item, such as ID or Name, should be fixed so the user can understand the information even during horizontal scroll.

### Updating content

- The content on a page should only be updated after an explicit action taken by the user.
- In a listing, if the user tries to access a page that does not exist, either by typing the page number directly into the URL (e.g., ?page=5) or refreshing the page, the system should redirect them to the last available page and display a temporary yellow toast message informing that the page does not exist.
- If the user tries to access an item from a listing that has been deleted, they should be redirected back to the listing and see a temporary yellow toast message informing that the item is no longer available.

0 comments on commit 2fc054a

Please sign in to comment.