Files
react-native-devtools-frontend/test
Alina Varkki 4166a73d68 [RPP] Only show possible Context Menu actions
Limit the Context Menu items showed to the ones that would change the entries if applied.
For example, if an entry has no descendants, we don't need to show "Collapse function" item since it would not do anything.

To achieve this, before the Context Menu is open, call FindPossibleContextMenuActions that checks which actions are possible, and only show those in the Context Menu.

In next CLs I will add some cache for storing descendants and repeating descendants that are calculated in findPossibleActions function since we are likely recalculating those again when the action is actually selected and applied. However, even without cache this change does not cause a noticeable delay in opening the Context Menu.

Bug: 1469887
Change-Id: Idda2420db768996f75e60a13a385da1f729ab85d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5163632
Reviewed-by: Andres Olivares <andoli@chromium.org>
Commit-Queue: Alina Varkki <alinavarkki@chromium.org>
2024-01-05 13:04:20 +00:00
..
2024-01-04 13:48:09 +00:00
2021-03-25 12:42:58 +00:00
2021-04-08 12:25:52 +00:00