set nuget package description in details panel

This commit is contained in:
Matt Parker
2025-11-11 22:47:18 +10:00
parent 714ac3c459
commit 1eaf14bc04
2 changed files with 8 additions and 3 deletions

View File

@@ -11,6 +11,7 @@ public partial class NugetPackageDetails : VBoxContainer
{
private TextureRect _packageIconTextureRect = null!;
private Label _packageNameLabel = null!;
private FoldableContainer _infoFoldableContainer = null!;
private OptionButton _versionOptionButton = null!;
private OptionButton _nugetSourceOptionButton = null!;
private VBoxContainer _projectsVBoxContainer = null!;
@@ -27,6 +28,7 @@ public partial class NugetPackageDetails : VBoxContainer
{
_packageIconTextureRect = GetNode<TextureRect>("%PackageIconTextureRect");
_packageNameLabel = GetNode<Label>("%PackageNameLabel");
_infoFoldableContainer = GetNode<FoldableContainer>("%InfoFoldableContainer");
_versionOptionButton = GetNode<OptionButton>("%VersionOptionButton");
_nugetSourceOptionButton = GetNode<OptionButton>("%NugetSourceOptionButton");
_projectsVBoxContainer = GetNode<VBoxContainer>("%ProjectsVBoxContainer");
@@ -112,10 +114,11 @@ public partial class NugetPackageDetails : VBoxContainer
private async void OnNugetSourceSelected(long sourceIndex)
{
var source = _package!.PackageFromSources[(int)sourceIndex];
var results = await _nugetClientService.GetAllVersionsOfPackageInSource(source.PackageSearchMetadata.Identity.Id, source.Source);
var packageFromSource = _package!.PackageFromSources[(int)sourceIndex];
var results = await _nugetClientService.GetAllVersionsOfPackageInSource(packageFromSource.PackageSearchMetadata.Identity.Id, packageFromSource.Source);
await this.InvokeAsync(() =>
{
_infoFoldableContainer.Title = packageFromSource.PackageSearchMetadata.Description;
_versionOptionButton.Clear();
foreach (var (index, metadata) in results.Index())
{

View File

@@ -57,10 +57,12 @@ item_count = 1
popup/item_0/text = "nuget"
popup/item_0/id = 0
[node name="FoldableContainer" type="FoldableContainer" parent="."]
[node name="InfoFoldableContainer" type="FoldableContainer" parent="."]
unique_name_in_owner = true
layout_mode = 2
folded = true
title = "Info - OpenTelemetry protocol exporter for OpenTelemetry .NET"
title_text_overrun_behavior = 3
[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 2