Skip to content

Commit

Permalink
Add "blockedDetails" section to troubleshooting information
Browse files Browse the repository at this point in the history
This will allow to find out what is specifically blocked on the
page reported as having issues, potentially saving time
when volunteers try to diagnose issues.
  • Loading branch information
gorhill committed Jan 7, 2022
1 parent e905837 commit affdde0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/js/popup-fenix.js
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,19 @@ const gotoReport = function() {
if ( popupData[prop] === expected ) { continue; }
popupPanel[name] = !expected;
}
if ( hostnameToSortableTokenMap.size !== 0 ) {
const blockedDetails = {};
const hostnames =
Array.from(hostnameToSortableTokenMap.keys()).sort(hostnameCompare);
for ( const hostname of hostnames ) {
const entry = popupData.hostnameDict[hostname];
if ( entry.counts.blocked.any === 0 ) { continue; }
blockedDetails[hostname] = entry.counts.blocked.any;
}
if ( Object.keys(blockedDetails).length !== 0 ) {
popupPanel.blockedDetails = blockedDetails;
}
}
messaging.send('popupPanel', {
what: 'launchReporter',
tabId: popupData.tabId,
Expand Down

0 comments on commit affdde0

Please sign in to comment.