Skip to content

[finding] ListView renders its load FAILURE through DataEmptyState while DataErrorState sits unused next to it #7143

Description

@os-warren

Found while measuring the empty-state surfaces for #7132, which fixed the symptom and deliberately left the structure alone.

packages/plugin-list/src/ListView.tsx renders its load-error panel with DataEmptyState — the component named for the empty case — passing it a destructive icon, error copy and a retry action:

{loadError && data.length === 0 ? (
  <DataEmptyState
    data-testid="list-error-state"
    data-error-kind={loadErrorKind}
    icon={loadErrorKind === 'network' ? <AlertTriangle .../> : <ShieldAlert .../>}

Meanwhile DataErrorState — same file as DataEmptyState, already role="alert", already carrying a title/message/retry-button shape — has no consumer on this surface.

What #7132 did and did not do

#7132 measured that both branches carried no role at all, so a 403 saying "You don't have access" and a young object saying "Nothing here yet" were the same node shape. It gave DataEmptyState a role="status" default and made this call site declare role="alert" so the new default could not announce an outage as a routine status.

That closes the accessibility collision. It does not close the structural one: the error panel is still an "empty state" by component identity, and the next person to reason about either component has to know that one of them is doing the other's job.

Why it was not folded into #7132

DataErrorState is not a drop-in replacement — it hardcodes its own icon and has no icon / iconWrapperClassName / showIcon props, so a swap is a visual change plus a props-surface question, not a rename. Existing pins select on data-testid="list-error-state" and on the panel's classes (ListView.loadErrorKind.test.tsx, ListView.elementDataSource.test.tsx). That is a real refactor with its own blast radius and its own visual review, which is exactly what #7132's dispatch ruled out as scope creep.

Suggested shape, not a decision

Either extend DataErrorState to accept the icon props this call site needs and migrate, or record in view-states.tsx that the layout is deliberately shared and the two components differ only by declared role. Both are defensible; the current state is defensible only because nobody has written down which one it is.

Refs: #7132 · #7063 · #7064.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatfinding

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions