Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Details Pane in Solution PM UI Project list calculates negative column widths #13939

Open
donnie-msft opened this issue Nov 19, 2024 · 0 comments
Labels
Functionality:VisualStudioUI Package Manager UI et al Priority:2 Issues for the current backlog. Product:VS.Client TechDebt Technical debt Type:Bug

Comments

@donnie-msft
Copy link
Contributor

The ListView for the projects table in Solution PMUI calculates column widths in order to make adjustments to each column. The ListView_SizeChanged performs several calculations, and this can result in a negative value.

Recently, a regression (#13928) was introduced in this area as Transitive Vulnerabilities were added as a column to this table. When the Details Pane is small, this logic would set a negative width on the column.
To mitigate this, a fix was made (in NuGet/NuGet.Client#6146) to check for and only set a positive value for width.

Example of a negative calculation from the debugger:
image

This logic seems overly complicated. Ideally:

  • Try to use WPF built-in settings to manage the column widths
  • If customization is needed, try refactoring the ListView_SizeChanged event to minimize the calculations it performs. Perhaps bailing out of the loop as soon as the width variable turns negative would optimize it slightly.
  • Re-evaluate the hard-coded values (project count > 7 and header.ActualWidth < 86 to ensure they're still correct and useful.
@donnie-msft donnie-msft added Product:VS.Client Priority:2 Issues for the current backlog. Type:Bug Functionality:VisualStudioUI Package Manager UI et al TechDebt Technical debt labels Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Functionality:VisualStudioUI Package Manager UI et al Priority:2 Issues for the current backlog. Product:VS.Client TechDebt Technical debt Type:Bug
Projects
None yet
Development

No branches or pull requests

1 participant