feat(log-viewer): give the inspector's empty state per-source copy - #891
Open
lukecotter wants to merge 1 commit into
Open
feat(log-viewer): give the inspector's empty state per-source copy#891lukecotter wants to merge 1 commit into
lukecotter wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.tsnow owns anEMPTY_TEXTmap keyed byDetailSourceand exportsemptyTextFor(source), whichLogInspectorrenders 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
buildDetailSectionsstill 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
selectionisnull, 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; newemptyTextFordescribe 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/SOSLViewnever emitselection: nullon 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.