Summary: | Web Inspector: Console: treat long strings as non-simple so they aren't truncated | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Devin Rousso <hi> | ||||
Component: | Web Inspector | Assignee: | Devin Rousso <hi> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | hi, inspector-bugzilla-changes, joepeck, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Local Build | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Devin Rousso
2020-04-14 12:31:01 PDT
Created attachment 396450 [details]
Patch
Comment on attachment 396450 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=396450&action=review So how does this look when you log a long string? > Source/WebInspectorUI/UserInterface/Views/FormattedValue.js:30 > +WI.FormattedValue.isSimpleString = function(string) Nice! Could be tested. Comment on attachment 396450 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=396450&action=review > So how does this look when you log a long string? It looks the same as it does right now in that the truncated string is shown inline, but there's now a disclosure arrow that expands the list of non-simple arguments in the same way that `console.log(true, [globalThis]);` would, putting the full string on it's own line/item. >> Source/WebInspectorUI/UserInterface/Views/FormattedValue.js:30 >> +WI.FormattedValue.isSimpleString = function(string) > > Nice! Could be tested. I think this is simple enough that it doesn't need a test. If we change the maximum length in the future, having to remember to update a test as well seems like an extra unnecessary step. Plus, nothing else in this file is tested since it's really all view code. Committed r260091: <https://trac.webkit.org/changeset/260091> All reviewed patches have been landed. Closing bug and clearing flags on attachment 396450 [details]. |