Decision layer for a Home row whose load failed: what the row shows, and when it goes back to loading. HomeRows applies these; they live in source/ so a Rooibos suite can reach them without a callFunc seam on the component (same move as source/home/latestRows.bs).
The rule, for every Home section: a failed load says nothing about what the section holds, so it never removes or empties a row (decision home-row-failure-tile). A row that already shows items keeps them. A row still waiting on its first load stops spinning and shows a "couldn't load" tile, so a failure does not read as loading forever; pressing OK on it retries (HomeRows.itemSelected). A section with no row on screen stays off it.
Members
(static, constant) PLACEHOLDER_FAILED
The row shows the failed placeholder (the "couldn't load" tile).
- Default Value
- failed
(static, constant) PLACEHOLDER_LOADING
The row shows the loading placeholder (a spinner).
- Default Value
- loading
Methods
(static) afterFailure(state) → {string}
The placeholder a row switches to when its section's load fails, or "" to leave the row as it is. Only a row still loading changes: items stay, and a failed tile already says so.
| Name | Type | Description |
|---|---|---|
state | string | the row's placeholderState |
PLACEHOLDER_FAILED or ""
- Type:
- string
(static) afterRetry(state) → {string}
The placeholder a row switches to when its section's load starts again, or "" to leave the row as it is. A failed tile goes back to the spinner, so a retry shows it is under way; a row with items keeps them until the new answer replaces them.
| Name | Type | Description |
|---|---|---|
state | string | the row's placeholderState |
PLACEHOLDER_LOADING or ""
- Type:
- string
(static) isAnswered(status) → {boolean}
Whether a section's result may act on its row: only an answered load says what the section holds. Anything else ("failed", or a task that set no status) must not.
| Name | Type | Description |
|---|---|---|
status | dynamic | the load's status field ("ok" / "failed" / "") |
true only for "ok"
- Type:
- boolean
(static) needsFavoritesStandIn(rowStates, hasStandIn) → {boolean}
Whether a failed Favorites items load (/Items, every row but People) needs the one "Favorites" stand-in row. On a first load each of those types has a spinning skeleton row, and a failed tile on every one would stack up to fifteen identical messages; they are replaced by one row that says the same thing once. A stand-in already there (a retry that failed again) goes back to its failed tile. After an answered load no row of those types is loading (each was filled or removed), so a later failure changes nothing and the rows keep their items.
| Name | Type | Description |
|---|---|---|
rowStates | object | placeholderState of each on-screen row the items load fills |
hasStandIn | boolean | whether the stand-in row is on screen |
true when the stand-in should show the failed tile
- Type:
- boolean
(static) needsLatestMediaStandIn(sectionPlan, hasLibraryRow) → {boolean}
Whether a failed FIRST libraries load needs a stand-in row where the latest-media rows would go. Those rows come from the libraries answer, so a failed one leaves none; with a My Media row on screen its failed tile already says the libraries did not load, and a second tile for the same request would only repeat it. Without one, the stand-in is the only place the failure shows.
| Name | Type | Description |
|---|---|---|
sectionPlan | dynamic | HomeRows' plan, [{ type }] in layout order |
hasLibraryRow | boolean | whether the My Media row is on screen |
true when the layout shows latest media and has no My Media row
- Type:
- boolean
(static) noteResult(list, sectionId, status) → {void}
RTA builds only: record a section's latest load result on list's rtaSectionResults ({
| Name | Type | Description |
|---|---|---|
list | object | the row list node (HomeRows or FavoritesRows) |
sectionId | string | the section the load was for |
status | dynamic | the load's status |
- Type:
- void
(static) placeholderState(row) → {string}
Which placeholder row shows, or "" when it shows items or is absent.
A placeholder is only ever a row's sole child: createSkeletonRow and insertLatestMediaSkeletons give a new row exactly one, and populateRowFromData replaces all of a row's children when items land.
| Name | Type | Description |
|---|---|---|
row | dynamic | a HomeRow node, or invalid |
PLACEHOLDER_LOADING, PLACEHOLDER_FAILED, or ""
- Type:
- string