Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: mindfully order properties in the lhr #13418

Merged
merged 4 commits into from
Nov 24, 2021
Merged

Conversation

connorjclark
Copy link
Collaborator

Look at a flow result, I found myself scanning a bit to find out what url a result was for. That made me consider the ordering of the properties in an LHR.

I think it'd be beneficial to human readability of this json to tweak the ordering a bit.

I think this orders the properties in the most informational manner:

  • lighthouseVersion
  • requestedUrl, finalUrl
  • fetchTime
  • gatherMode *
  • runtimeError
  • runWarnings

* arguable could go somewhere else

Secondly, I moved i18n to be the last item. It being a giant object of strings it kinda makes one gloss over anything that follows. It's also the most meta, making references throughout the rest of the LHR, so delegating it to last place makes some sort of sense to me

@connorjclark connorjclark requested a review from a team as a code owner November 23, 2021 21:36
@connorjclark connorjclark requested review from adamraine and removed request for a team November 23, 2021 21:36
@google-cla google-cla bot added the cla: yes label Nov 23, 2021
requestedUrl: requestedUrl,
finalUrl: artifacts.URL.finalUrl,
runWarnings: lighthouseRunWarnings,
runtimeError: Runner.getArtifactRuntimeError(artifacts),
audits: auditResultsById,
Copy link
Member

Choose a reason for hiding this comment

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

this one's also kinda big, can we move to right before timing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

hmmm sure it's big, but it has all the most important info inside

@connorjclark connorjclark changed the title core: mindfully order properties in an lhr core: mindfully order properties in the lhr Nov 24, 2021
@connorjclark connorjclark merged commit b027158 into master Nov 24, 2021
@connorjclark connorjclark deleted the lhr-prop-reorder branch November 24, 2021 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants