profiler
profiler copied to clipboard
Add an option to hide tracks by type
This is part of the overall work with: #2764
Example usage:
- Right click a memory track
- Choose "Hide all memory tracks"
- All memory track should be closed.
Mockup:

The render function for the context menu will need to detect what TYPE of track was clicked, then add this option to hide all of the tracks by that type:
https://github.com/firefox-devtools/profiler/blob/c4f68f423c7035a094952311addd0af5bec209e7/src/components/timeline/TrackContextMenu.js#L489-L532
Only valid types should have this options. Here are all the track types as of the time of filing this issue:
export type GlobalTrack =
| {| +type: 'process', +pid: Pid, +mainThreadIndex: ThreadIndex | null |}
| {| +type: 'screenshots', +id: string, +threadIndex: ThreadIndex |}
| {| +type: 'visual-progress' |}
| {| +type: 'perceptual-visual-progress' |}
| {| +type: 'contentful-visual-progress' |};
export type LocalTrack =
| {| +type: 'thread', +threadIndex: ThreadIndex |}
| {| +type: 'network', +threadIndex: ThreadIndex |}
| {| +type: 'memory', +counterIndex: CounterIndex |}
| {| +type: 'ipc', +threadIndex: ThreadIndex |}
| {| +type: 'event-delay', +threadIndex: ThreadIndex |};
From this list I would think the following should be able to be hidden:
- screenshots
- network
- memory
- ipc
- event-delay
A new hideAllTracksByType
action will need to be created. I'm guessing a good starting point would be to check out the isolateProcess
and similar actions for ideas on how to get started. The action will need to add all of those track types to the hidden local tracks and hidden global tracks. Care should be taken to see everywhere the HIDE_LOCAL_TRACK
and HIDE_GLOBAL_TRACK
actions are being listened to in the reducers, as the HIDE_ALL_TRACKS_BY_TYPE
action may need to be added there as well.
Also, check out the hiddenGlobalTracks
, and hiddenLocalTracksByPid
.
A test will also need to be added that shows that this feature works, it will be similar to the "isolate" tests:
https://github.com/firefox-devtools/profiler/blob/c4f68f423c7035a094952311addd0af5bec209e7/src/test/components/TrackContextMenu.test.js#L109-L139
Hello, I got approved as outreachy applicant can I work on these issues?
Hi @codershona! Sure, assigning the issue to you. Please let us know if you need anything!
I'm clearing the assignee here for inactivity. If you still want to look at it, please leave a message!
Hey, may i work on this ?
hey @dhanesh12twice , I already assigned you to another issue, let's focus on that first. Thanks!
Hey @julienw, I would like to work on this one! :)
hey @rbrishabh, yes sure :-) It's not super easy but this should be interesting!
hey @rbrishabh , how is it going?
hi @julienw! Had a busy week with work! Getting to this during the weekend. Sorry for the delay!
Thanks for the update! No worries, just checking if you were still looking at this :-)