# Favorite articles

## Favorite articles

An article favorite records that an article is favorited. You can favorite an article
from an article preview, then open a profile's favorites route to view articles that
profile has favorited.

| If you need to… | Go to |
| --- | --- |
| Find an article in the home lists | [Find articles](doc:find-articles) |
| Favorite or unfavorite an article | [Favorite or unfavorite an article](#favorite-or-unfavorite-an-article) |
| View a profile's favorited articles | [View a profile's favorited articles](#view-a-profiles-favorited-articles) |
| Read or manage the article itself | [Read and manage an article](doc:read-and-manage-an-article) |
| Open the author's profile | [View a profile](doc:view-a-profile) |

## Before you start

An article preview supplies the article's favorite state, favorite count, and route
identifier. A profile favorites route uses a profile username and the profile's
basic information.

**Prerequisites**

- Know which article preview you want to work with.
- Have the profile username when you want to open that profile's favorites.

## Find an article to favorite

The home page lists articles from the feed, global list, or a tag. Each article
preview contains the article's author, date, title, description, and tags, and links
to the article and its author's profile.

**Prerequisites**

- Know whether you want to work from the feed, global list, or a tag list.

**Steps**

1. Open the home page at `/`.
2. Review the article previews until you find the one whose title or description
   identifies the article you want to favorite.

**Result:** The article preview is ready for the favorite-count button in the next
step.

## Favorite or unfavorite an article

The heart icon beside an article's favorite count changes whether that article is
favorited. An article that is already favorited follows the opposite action from an
article that is not.

**Prerequisites**

- Have the article preview available.

**Steps**

1. Select the heart icon beside the article's favorite count.

   | Article state | Action sent |
   | --- | --- |
   | The article is not favorited | The favorite action is sent. |
   | The article is favorited | The unfavorite action is sent. |

**Result:** The selected favorite or unfavorite request is sent for the article.

## View a profile's favorited articles

A profile's favorites list contains articles populated from that author's favorited
articles. The profile offers **My Articles** and **Favorited Articles** tabs.

**Prerequisites**

- Know the profile username.

**Steps**

1. Open the profile's favorites page for the profile username.
2. Select **Favorited Articles**.

**Result:** The profile favorites route requests articles favorited by the profile
username and displays the article-list area.

## Handle empty and loading lists

The article-list area has a loading state, an empty state, and an article-preview
state. The favorite action also follows the article's current favorite state.

**Prerequisites**

- Have a home article list or profile favorites page open.

**Steps**

1. Check whether the article-list area has loaded.
2. Read the message or article previews that match the list state.

   | List state | What to read or do |
   | --- | --- |
   | Loading | Read `Loading...`. |
   | Empty | Read `No articles are here... yet.`. |
   | Articles available | Use each preview's favorite state to choose the action in [Favorite or unfavorite an article](#favorite-or-unfavorite-an-article). |

**Result:** You can distinguish a loading list, an empty list, and a list containing
article previews before selecting a favorite action.

For application-wide messages, see [General error messages](doc:general-error-messages).

## What to do next

After you inspect or change an article's favorite state, the related guidance is:

| Related task | Guidance |
| --- | --- |
| Read or manage the article | [Read and manage an article](doc:read-and-manage-an-article) |
| Open the author's profile | [View a profile](doc:view-a-profile) |
| Return to the profile's authored-article list | **My Articles** |
| Return to the profile's favorites list | **Favorited Articles** |
| Follow the wider article workflow | [Articles overview](doc:articles-overview) |
