Repository navigation
JSON Formatter: instant Fold all, Find in fold view, error offset - #26
Merged
Merged
Conversation
…or card Fold all no longer builds the whole syntax tree (~1 s on a megabyte). It folds the ranges from a new core foldRanges, a linear bracket-and-string scan with the same bounds as lang-json's folds: ~13 ms for 2 MB in Node, ~0.15 s end to end for 1.4 MB of output in the browser. The fold view gets CodeMirror's search panel (@codemirror/search 6.7.2, pinned, already in the lockfile via codemirror), opened by a Find button or Ctrl/Cmd+F in the output, because the browser's own find sees only rendered lines. It is literal only: the regexp option is hidden and an update listener turns regex mode back off, since a user pattern must never run on the main thread. Styled with the design tokens; matches use the accent. It lives in the lazy FoldableOutput chunk (~17.5 kB gzip, from ~11); the Diff route and first-load JS are unchanged. IssueCard takes an optional offset, so the JSON card shows line, column and offset again.
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.
Added
foldRangesin@fadeltd/devtools-core/jsonChanged
Fixed