Skip to content

Add json prettyprinting detail view to the log details page.#1375

Merged
DaveShuckerow merged 5 commits intoflutter:masterfrom
DaveShuckerow:logging-details
Nov 22, 2019
Merged

Add json prettyprinting detail view to the log details page.#1375
DaveShuckerow merged 5 commits intoflutter:masterfrom
DaveShuckerow:logging-details

Conversation

@DaveShuckerow
Copy link
Copy Markdown
Contributor

Also adds in a crossfade animation between log details views.

image

I'm going to punt on the error inspector for a few weeks to prepare for demos.

super.initState();
crossFade = AnimationController(
vsync: this,
duration: const Duration(milliseconds: 200),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should soon do an audit of all durations used and add some top level duration constants used throughout the app.

Future<String> detailsComputer;
Future<String> Function() detailsComputer;

static const JsonEncoder prettyPrinter = JsonEncoder.withIndent(' ');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why indent 4? use indent 2 and a fixed sized font instead. There is some similar code in the json display in the timeline.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have any monospaced fonts bundled yet. I've left a TODO.

Expanded(
child: LogsTable(
data: controller.data,
child: Split(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we not think expandable table children are practical? showing a separate details view in the existing logging page was more for expediency than by design. I'd hope we can do better in Flutter and actually show the details inline.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is doable, just out of scope for this PR, as discussed offline.

@jacob314
Copy link
Copy Markdown
Contributor

lgtm

@DaveShuckerow DaveShuckerow merged commit b04f05a into flutter:master Nov 22, 2019
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.

2 participants