Skip to content

feat(log-viewer): give the inspector's empty state per-source copy - #891

Open
lukecotter wants to merge 1 commit into
certinia:mainfrom
lukecotter:feat-inspector-empty-states
Open

feat(log-viewer): give the inspector's empty state per-source copy#891
lukecotter wants to merge 1 commit into
certinia:mainfrom
lukecotter:feat-inspector-empty-states

Conversation

@lukecotter

Copy link
Copy Markdown
Collaborator

Closes #25.

The Inspector rendered one hardcoded emptyText="Select a row to inspect it." regardless of which tab was active, so a user on the timeline was told to select a "row".

detailSections.ts now owns an EMPTY_TEXT map keyed by DetailSource and exports emptyTextFor(source), which LogInspector renders for the active source. Copy names what to click per tab (frame on the timeline / frame in the call tree / row in the analysis grid / SOQL, DML or SOSL row). An undefined source falls back to the old generic string.

One mechanism, not two — the null-selection branch of buildDetailSections still returns [] unchanged; only the placeholder text is source-aware.

Precedence rule

This is the module that decides what "nothing selected" means, so the rule is documented here for #26 to inherit rather than re-decide: an explicit row/frame selection always wins. A range or other ambient scope only applies when selection is null, and must be layered into that branch — never made to override an explicit selection.

Tests

  • detailSections.test.ts — the null-selection test loops all four sources; new emptyTextFor describe block covers each source plus the fallback.
  • LogInspector.test.ts — steps through all four tabs and asserts the rendered placeholder changes.

Not in scope

DMLView/SOQLView/SOSLView never emit selection: null on deselect, so the database tab can't currently reach its own empty state by deselecting. That's an emission gap in three separate views rather than part of this seam — filed separately.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ability to export 'Analysis' to CSV

1 participant