Highlight timeline filter button when excluding contributors
This PR closes #145769 and supersedes my previous attempt #193281.
In https://github.com/microsoft/vscode/pull/193281#issuecomment-1727877721 @hbons suggested that perhaps the button should be made always visible. AFAIK that can't be done per-button, nor can I dynamically switch the toolbar between sticky (showActions: ViewPaneShowActions.WhenExpanded) and not (showActions: ViewPaneShowActions.Default) as the filter button highlight comes and goes.
Would it be acceptable to set showActions: ViewPaneShowActions.WhenExpanded for this view pane?
@jrieken does this PR address the feedback you gave on the previous one? And is the mechanism acceptable?
@jrieken does this PR address the feedback you gave on the previous one?
Only partially. I like that this happens in SubmenuEntryAnctioViewItem but I think this should be controlled via IDropdownMenuActionViewItemOptions, e.g a new property like highlightChildrenToggleState, and not via the highlighFunction. This option then needs to be set via timeline-specific IActionViewItemProvider (usually another option to the action bar but I am not the timeline expert)
@jrieken I'm having difficulty understanding and implementing your requested changes. The action button I'm trying to highlight (or not) based on the checked/unchecked state of its submenu items isn't coming from the actionViewItemProvider of an ActionBar. Rather, it comes from here (which is also where I added the highlightFunction property of my current solution):
https://github.com/microsoft/vscode/blob/bc1a64e3f8d3c887f85fd33daa50bb84608410b2/src/vs/workbench/contrib/timeline/browser/timeline.contribution.ts#L96-L103
MenuId.TimelineTitle is the titleMenuId that the TimelinePane view gets created with:
https://github.com/microsoft/vscode/blob/bc1a64e3f8d3c887f85fd33daa50bb84608410b2/src/vs/workbench/contrib/timeline/browser/timelinePane.ts#L275
I didn't find any ViewPane subclasses that create their title menu/action bar in a way that would let a custom IActionViewItemProvider be used to supply the new highlightChildrenToggleState option you propose.
@jrieken I have updated this branch with the ESM changes and would appreciate it if you can find time to look at my Jan 12 response to your previous feedback. I'm not yet ready to give up on this one.
I'd really love to land this fish. I only visit the Timeline view occasionally, so I rarely remember if I had filtered it the last time I was there. The visual indicator this PR adds would help.
@jrieken any hope for this PR? I'm willing to put effort into it if there is.