question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enable tools menu in DevTools

See original GitHub issue

We currently disable the export menu in DevTools:

/*
      Some features in the export drop down menu don't work in the DevTools
      client. They could with some tweaks, but currently they don't. For example:
      Saving as HTML/JSON - does not bring up a file dialog, as one would expect in DevTools.
                            also, it saves the AuditsPanel HTML, which is funky.
    */
    .lh-devtools .lh-export__button {
      display: none;
    }

Need to:

  1. Override _saveFile in Audits panel, and use the DevTools save functionality instead. Difference being that the system file dialog prompt will open.
  2. getReportHtml currently causes the entire DevTools app’s HTML to be saved. Could change this._document.documentElement to _getScrollParent - but, it wouldn’t create a well-formed HTML file. I think we’d have to override getReportHtml in DevTools, and regenerate the report but with Lighthouse.ReportGenerator.generateReportHtml - that uses report-template.html, which the normal DevTools flow does not.

For 1, maybe we could just change the normal report to open with a file system dialog?

With this, do we want to scratch this Chromium change - and remove the “save” action from the Audits panel?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
brendankennycommented, Jun 6, 2019

I don’t believe it’s possible to open the “Save As” dialog from normal js. The best we can do is what it’s currently doing, using an <a href="bloburl" download="report.html"> to trigger the download.

Or do you mean “change the normal report to open with a file system dialog” like change it when in devtools (though a devtools-ui-features.js or whatever)? If so, I apologize for drawing this all out 😃

1reaction
connorjclarkcommented, Jun 6, 2019

not sure what this means…normal report like in report-ui-features.js?

yeah, the default behavior of the regular report experience

Read more comments on GitHub >

github_iconTop Results From Across the Web

Run commands in the Command Menu - Chrome Developers
# Open the Command Menu · Press Control + Shift + P (Windows / Linux) or Command + Shift + P (Mac). ·...
Read more >
How to Open the Developer Tools in a Browser
From the drop-down menu that appears, move your mouse cursor over More tools, and select Developer tools from the expanded menu.
Read more >
Use the developer tools in the Develop menu in Safari on Mac
If you don't see the Develop menu in the menu bar, choose Safari > Settings, click Advanced, then select “Show Develop menu in...
Read more >
The Beginner's Guide to Chrome Developer Tools
Open the Chrome menu and go to “More Tools” > “Developer Tools.” chrome menu screenshot. Finally, you can right-click (Windows) or Ctrl-click (Mac)...
Read more >
no developer tools menu in chrome - Google Groups
Enable USB debugging (within the Android settings, not specifically the browser), plug your device to your computer, start desktop Chrome and go ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found