Skip to content

LinkListFeature

Seungjin Lee edited this page Jan 8, 2026 · 1 revision

Basic

  • ArticleFilterFeature
  • CategoryChipFeature
  • LinkListFeature
flowchart TD
    %% =========================
    %% View
    %% =========================
    subgraph View
        V1["onAppear"]
        V2["refresh"]
        V3["backButtonTapped"]
        V4["searchButtonTapped"]
        V5["bottomSheetButtonTapped"]
        V6["Child: categoryChipList.categoryTapped"]
        V7["Child: articleList.longPressed"]
    end

    %% =========================
    %% Reducer
    %% =========================
    subgraph "Reducer (LinkListFeature)"
        R[/"LinkList Reducer"/]

        subgraph "Internal Actions"
            IA1["_fetchLinksResponse(result)"]
            IA2["_fetchCategoriesResponse(items)"]
        end

        subgraph "Delegate Actions"
            DA1["categorySelected(category)"]
            DA2["linkLongPressed(link)"]
        end
    end

    %% =========================
    %% State
    %% =========================
    subgraph State
        S1["allLinks"]
        S2["articleList.link"]
        S3["selectedCategory"]
        S4["categoryChipList.selectedCategory"]
        S5["selectBottomSheet"]
        S6["editSheet"]
        S7["alert"]
    end

    %% =========================
    %% Dependencies / Effects
    %% =========================
    subgraph "Dependencies & Side Effects"
        D1["SwiftDataClient.fetchLinks()"]
        D2["SwiftDataClient.fetchCategories()"]
        D3["LinkNavigator.pop()"]
        D4["LinkNavigator.push(.search)"]
    end

    %% =========================
    %% View -> Reducer
    %% =========================
    V1 --> R
    V2 --> R
    V3 --> R
    V4 --> R
    V5 --> R
    V6 --> R
    V7 --> R

    %% =========================
    %% Reducer Logic (View Actions)
    %% =========================
    R -- onAppear / refresh --> D1
    D1 -. Result .-> IA1
    IA1 --> R

    R -- bottomSheetButtonTapped --> D2
    D2 -. Result .-> IA2
    IA2 --> R

    R -- backButtonTapped --> D3
    R -- searchButtonTapped --> D4

    %% =========================
    %% Internal Action -> State
    %% =========================
    R --> S1
    R --> S2
    R --> S5

    %% =========================
    %% Delegate Flow (Child -> Parent)
    %% =========================
    V6 -. delegate .-> DA1
    DA1 --> R
    R --> S3
    R --> S4
    R --> S2

    V7 -. delegate .-> DA2
    DA2 --> R
    R --> S6

    %% =========================
    %% Error / Alert
    %% =========================
    R --> S7

    %% =========================
    %% Styles (Soft Architecture Palette)
    %% =========================
    classDef action fill:#EAF2FB,stroke:#4A90E2,stroke-width:1px,color:#1F3A5F
    classDef reducer fill:#F4F6F8,stroke:#6B7C93,stroke-width:2px,color:#2E3A46
    classDef state fill:#EDF7F1,stroke:#4CAF7D,stroke-width:1px,color:#1E4D3A
    classDef effect fill:#FFF6E5,stroke:#F5A623,stroke-width:1px,color:#7A4A00
    classDef delegate fill:#F3E8FD,stroke:#9B51E0,stroke-width:1.5px,color:#4A1D6D

    class V1,V2,V3,V4,V5,V6,V7 action
    class R reducer
    class IA1,IA2 reducer
    class DA1,DA2 delegate
    class S1,S2,S3,S4,S5,S6,S7 state
    class D1,D2,D3,D4 effect
Loading

Edit

Clone this wiki locally