firefox-devtools / profiler

Firefox Profiler — Web app for Firefox performance analysis
https://profiler.firefox.com
Mozilla Public License 2.0
1.19k stars 387 forks source link

[Tab selector 6] Get the real names of the extensions #5132

Closed canova closed 5 days ago

canova commented 1 week ago

Previously it was not possible to see the real extension names and they were always written like "UUID" because of it. With this PR, we get the correct extension names from the profile.extensions array and display them properly.

It also had a bug previously. When we try to construct a URL object with moz-extension:// protocol, it was failing outside of Firefox, it was returning 'null' for the origin and hostname, which was crashing in the code since we were trying to use it for something else afterwards. This PR makes sure that it doesn't crash on non-Firefox browsers and always return the proper name for the extensions.

Deploy preview

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 71.42857% with 6 lines in your changes missing coverage. Please review.

Project coverage is 88.56%. Comparing base (6489759) to head (31851a6). Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/profile-logic/profile-data.js 63.63% 4 Missing :warning:
src/selectors/profile.js 80.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #5132 +/- ## ========================================== - Coverage 88.57% 88.56% -0.01% ========================================== Files 307 307 Lines 27820 27837 +17 Branches 7532 7538 +6 ========================================== + Hits 24642 24655 +13 - Misses 2961 2965 +4 Partials 217 217 ``` | [Flag](https://app.codecov.io/gh/firefox-devtools/profiler/pull/5132/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=firefox-devtools) | Coverage Δ | | |---|---|---| | [](https://app.codecov.io/gh/firefox-devtools/profiler/pull/5132/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=firefox-devtools) | `88.56% <71.42%> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=firefox-devtools#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

canova commented 5 days ago

Thanks for the review!

2 quick questions:

  1. it would be good to have an indicator in the list that they are addons (maybe reusing the addons icon?)

  2. also show the addons icon instead of the favicon

Good questions. We can do them as follow-ups.