fix: adjust indentation for collapsed rows in chat models widget#316357
fix: adjust indentation for collapsed rows in chat models widget#316357AndyXie0718 wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes inconsistent indentation for vendor/group header rows in the Chat Models widget when expanding/collapsing, addressing visual glitches caused by recycled table row templates retaining prior DOM state.
Changes:
- Toggle the
.status-iconelement’sdisplayfor vendor and group rows based onentry.collapsedto control indentation consistently.
Comments suppressed due to low confidence (1)
src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.ts:415
- Same as vendor rows: because table cells are recycled,
statusIconmay still have Codicon classes from a prior status entry. Before settingdisplayfor group rows, reset the icon element back to its base class/state so expanded groups don’t render a stale status glyph.
override renderGroupElement(entry: ILanguageModelGroupEntry, index: number, templateData: IModelNameColumnTemplateData): void {
templateData.statusIcon.style.display = entry.collapsed ? 'none' : '';
templateData.nameLabel.set(entry.label, undefined);
|
Do you have a photo of what the problem is? |
|
@lramos15 These problems could be reproduced on win11 23H2 12th Gen Intel(R) Core(TM) i5-12500H and win10 intel i5-1035g4 |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
df50237 to
2069732
Compare
|
@lramos15 Here is how I figured out what's happened: |
|
I'm not even sure we need top level status icons. It doesn't make much sense to me |
|
Perhaps you are right about removing top-level status icons, so in the latest commit I've hidden them with |
|
Can you offer some advice on this @sandy081? |
|
I pushed a new commit to fix the new issue. Table template instances are reused across row types in |
|
@justschen sorry to bother you but I believe this issue still exists in the newest 1.122 version |









Summary
Fix inconsistent indentation of vendor/group headers in Chat Models widget when expanding/collapsing.
Previously, collapsed groups sometimes caused wrong rows to shift, due to leftover
status-icondisplay states from table row recycling. Now, expanded groups show a small indent (via visible status-icon placeholder) while collapsed groups have no extra indent (status-icon hidden), consistent with the intended visual hierarchy.Changes
ModelNameColumnRenderer, explicitly control.status-icondisplay based onentry.collapsed:collapsed === false→display: ''(restore default, icon occupies space → indent)collapsed === true→display: 'none'(icon hidden → no indent)Affected files
src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.ts