Skip to content

Move PackageManager UI to DynamoPackagesWPF view extension#16866

Draft
Copilot wants to merge 10 commits intomasterfrom
copilot/move-dynamopackagemanager-ui
Draft

Move PackageManager UI to DynamoPackagesWPF view extension#16866
Copilot wants to merge 10 commits intomasterfrom
copilot/move-dynamopackagemanager-ui

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 2, 2026

DynamoPackageManager UI was incorrectly housed in DynamoCoreWpf instead of its corresponding view extension project, violating the OOTB view extension pattern.

Changes

File Migration

  • Moved 50+ files from DynamoCoreWpf to DynamoPackagesWPF:
    • ViewModels: PackageManagerViewModel, PackageViewModel, InstalledPackagesViewModel, etc.
    • Views: PackageManagerView, PublishPackageView, PackageManagerSearchView, etc.
    • Controls: 11 UI controls (SearchBoxControl, FilterTagControl, etc.)
    • Pages: 4 publish wizard pages
    • Resources: Localized documentation, PackageManagerWizard npm bundle

Architecture

Before:

// DynamoView.xaml.cs directly managed PackageManager UI
private PackageManagerView packageManagerWindow;

private void DynamoViewModelRequestShowPackageManager(object s, EventArgs e)
{
    packageManagerWindow = new PackageManagerView(this, _pkgVM);
    packageManagerWindow.Show();
}

After:

// PackageManagerViewExtension.cs handles UI lifecycle
public void Loaded(ViewLoadedParams p)
{
    dynamoViewModel.RequestPackageManagerDialog += OnRequestPackageManagerDialog;
}

private void OnRequestPackageManagerDialog(object sender, EventArgs e)
{
    packageManagerWindow = new PackageManagerView(viewLoadedParams.DynamoWindow, pkgVM);
    packageManagerWindow.Show();
}

Key Decisions

  • EventArgs classes (PackageManagerSizeEventArgs, OpenPackageManagerEventArgs) moved to DynamoViewModelEvents.cs - they're part of the event contract, not UI implementation
  • PublishPackageViewModel kept in DynamoCoreWpf - used as event parameter, moving it would create circular dependency DynamoCoreWpf → DynamoPackagesWPF → DynamoCoreWpf

Project Files

  • Fixed 95 malformed XML elements in DynamoCoreWpf.csproj (orphaned tags, misplaced closing elements)
  • Updated DynamoPackagesWPF.csproj with all migrated files and npm build targets

Result

PackageManager UI now follows the same pattern as other OOTB view extensions (DocumentationBrowser, GraphNodeManager, etc.) with proper separation between core framework and extension UI.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 8 commits February 2, 2026 23:43
…oject file

Co-authored-by: QilongTang <3942418+QilongTang@users.noreply.github.com>
…y target

Co-authored-by: QilongTang <3942418+QilongTang@users.noreply.github.com>
Co-authored-by: QilongTang <3942418+QilongTang@users.noreply.github.com>
Co-authored-by: QilongTang <3942418+QilongTang@users.noreply.github.com>
Co-authored-by: QilongTang <3942418+QilongTang@users.noreply.github.com>
Co-authored-by: QilongTang <3942418+QilongTang@users.noreply.github.com>
Co-authored-by: QilongTang <3942418+QilongTang@users.noreply.github.com>
…dependency

Co-authored-by: QilongTang <3942418+QilongTang@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor DynamoPackageManager UI to proper view extension Move PackageManager UI to DynamoPackagesWPF view extension Feb 3, 2026
/// </summary>
public class OpenPackageManagerEventArgs : EventArgs
{
private string tab;
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Feb 6, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
5 Security Hotspots
4.4% Duplication on New Code (required ≤ 3%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@QilongTang
Copy link
Copy Markdown
Contributor

@copilot Rebase

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 9, 2026

@copilot Rebase

I've successfully rebased the branch onto the latest master (commit fee9456). The rebase resolved conflicts where master had modified some PackageManager files that were being moved/deleted in this PR.

However, I'm unable to force-push the rebased commits due to permission restrictions. The git push returns a 403 error. Could you help push the rebased branch, or should I take a different approach?

The local branch has been rebased and is ready - it just needs to be force-pushed to update the remote.

@QilongTang
Copy link
Copy Markdown
Contributor

@copilot Address merge conflicts

Resolved conflicts:
- DynamoView.xaml.cs: Kept deletion of PackageManager methods (moved to view extension)
- PackageManagerTabControl.cs: Moved to correct location in DynamoPackagesWPF
- Added PackageManagerTabControl.cs to DynamoPackagesWPF.csproj

Co-authored-by: QilongTang <3942418+QilongTang@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 9, 2026

@copilot Address merge conflicts

Merge conflicts resolved in commit b05081f.

Conflicts resolved:

  1. DynamoView.xaml.cs: Removed PackageManager methods that were re-added in master (now handled by view extension)
  2. PackageManagerTabControl.cs: New file from master moved to DynamoPackagesWPF/Views/PackageManager/Controls/ and added to DynamoPackagesWPF.csproj

The branch now includes all 103 commits from master while preserving the PackageManager UI migration.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 9, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
4.2% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants