vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Highlight timeline filter button when excluding contributors

Open gjsjohnmurray opened this issue 2 years ago • 7 comments

This PR closes #145769 and supersedes my previous attempt #193281.

gjsjohnmurray avatar Nov 23 '23 22:11 gjsjohnmurray

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?

gjsjohnmurray avatar Nov 23 '23 22:11 gjsjohnmurray

@jrieken does this PR address the feedback you gave on the previous one? And is the mechanism acceptable?

gjsjohnmurray avatar Nov 23 '23 22:11 gjsjohnmurray

@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 avatar Dec 15 '23 17:12 jrieken

@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.

gjsjohnmurray avatar Jan 12 '24 03:01 gjsjohnmurray

@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.

gjsjohnmurray avatar Sep 02 '24 19:09 gjsjohnmurray

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.

gjsjohnmurray avatar Nov 13 '24 04:11 gjsjohnmurray

@jrieken any hope for this PR? I'm willing to put effort into it if there is.

gjsjohnmurray avatar Apr 07 '25 11:04 gjsjohnmurray