Skip to content

Force keybindings header to behave differently from rows#41789

Closed
usernamehw wants to merge 5 commits intomicrosoft:masterfrom
usernamehw:keybindings_editor_header_click_hover
Closed

Force keybindings header to behave differently from rows#41789
usernamehw wants to merge 5 commits intomicrosoft:masterfrom
usernamehw:keybindings_editor_header_click_hover

Conversation

@usernamehw
Copy link
Contributor

@usernamehw usernamehw commented Jan 18, 2018

Fixes #41558

Header was reacting to L/M/R mouse clicks and touch events. Now it doesn't.

The only questionable thing is focus border around .monaco-list:focused when you click on header after input.

@sandy081
Copy link
Member

@usernamehw Thanks for the fix. But instead of doing some CSS hacks I would suggest to render the header separately by removing it out from the list. This will be helpful if we want to implement sorting by clicking the header

@sandy081 sandy081 added the keybindings-editor Keybinding editor issues label Jan 19, 2018
@sandy081 sandy081 added this to the January 2018 milestone Jan 19, 2018
@usernamehw
Copy link
Contributor Author

Adding a header is not a problem, removing one...

I got an error from RowCache
https://github.com/Microsoft/vscode/blob/1b77525993ccdd82a40b7a4e3ba874c5a2eb7a5a/src/vs/base/browser/ui/list/rowCache.ts#L40

"Cannot read property 'renderTemplate' of undefined"

Does RowCache auto clears on vscode update? Is there a way to clear it once? Any other way?

@sandy081
Copy link
Member

@usernamehw I meant to implement the header separately without making it part of List widget.

@usernamehw
Copy link
Contributor Author

@sandy081, That's exactly what I did. When you delete the header - the entire list no longer renders. Deletion from here:
https://github.com/Microsoft/vscode/blob/21cf602a6e1761edbce55474c20357fd482159ff/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts#L335

Removing new KeybindingHeaderRenderer(), from the line above results in RowCache error - list not rendered at all.

I will push a commit then, it's just before header deletion from the list; New header is added, old header not possible to remove for me. This is not a finished version, stopped right after error encountered.

@sandy081
Copy link
Member

@usernamehw You have to remove the code that populate header elements in the list. Ref: https://github.com/microsoft/vscode/blob/master/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts#L388

@alexdima alexdima modified the milestones: January 2018, February 2018 Feb 2, 2018
@sandy081 sandy081 self-requested a review February 14, 2018 10:49
@bpasero bpasero modified the milestones: February 2018, March 2018 Mar 8, 2018
@usernamehw
Copy link
Contributor Author

Should I close this?

@sandy081
Copy link
Member

sandy081 commented Mar 19, 2018

@usernamehw Not yet merged. May I know if your changes are ready to review?

@usernamehw
Copy link
Contributor Author

Hope so. The last commit was ~2 month ago. I don't even know if this code is working now.

@bpasero bpasero modified the milestones: March 2018, April 2018 Apr 6, 2018
@usernamehw usernamehw closed this May 3, 2018
@usernamehw usernamehw deleted the keybindings_editor_header_click_hover branch December 6, 2018 21:14
@github-actions github-actions bot locked and limited conversation to collaborators Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

keybindings-editor Keybinding editor issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keybindings editor header problems

4 participants