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

Remove old installed packages view #11791

Merged
merged 53 commits into from
Jul 1, 2021
Merged
Show file tree
Hide file tree
Changes from 52 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
acbced2
update
pinzart Jun 14, 2021
0c815ab
update
pinzart Jun 15, 2021
af18f92
update
pinzart Jun 15, 2021
ae718fd
update
pinzart Jun 16, 2021
6533e9d
Update InstalledPackagesControl.xaml
pinzart Jun 16, 2021
ec92f8e
Merge branch 'master' of https://github.com/DynamoDS/Dynamo into new_…
sm6srw Jun 17, 2021
15355f2
Update icons and icon sizes.
sm6srw Jun 17, 2021
ade8b98
More tweaking..
sm6srw Jun 18, 2021
a644026
More tweaking.
sm6srw Jun 21, 2021
8cb0be3
More tweaking
sm6srw Jun 22, 2021
9463f2f
Merge Master
sm6srw Jun 22, 2021
573c57b
MergeFixes
sm6srw Jun 22, 2021
2a3561d
Some more tweaks
sm6srw Jun 22, 2021
1ee5d8e
Merge branch 'master' into new_installed_packages_view
pinzart Jun 23, 2021
f366fe0
Merge branch 'master' of https://github.com/DynamoDS/Dynamo into new_…
sm6srw Jun 23, 2021
a316e56
Merge branch 'new_installed_packages_view' of https://github.com/Dyna…
sm6srw Jun 23, 2021
3ff640b
Add contest menu style
sm6srw Jun 23, 2021
5e2d4af
update colors
pinzart Jun 23, 2021
a9e061d
More context menu tweaking.
sm6srw Jun 23, 2021
5543f90
Merge branch 'new_installed_packages_view' of https://github.com/Dyna…
sm6srw Jun 23, 2021
65cf7b8
One small tweak.
sm6srw Jun 23, 2021
e4837f6
add mark for uninstall label
pinzart Jun 23, 2021
dc235bd
Merge branch 'new_installed_packages_view' of https://github.com/Dyna…
pinzart Jun 23, 2021
1d4d0fe
simplify control
pinzart Jun 23, 2021
a54185d
Update DynamoModern.xaml
pinzart Jun 23, 2021
d8ac9af
Change ListBox to ItemsControl
sm6srw Jun 23, 2021
0b9aecb
More tweaks
sm6srw Jun 23, 2021
d049994
Merge branch 'new_installed_packages_view' of https://github.com/Dyna…
sm6srw Jun 23, 2021
84facc2
More tweaks
sm6srw Jun 23, 2021
6836825
Restore Scollbar
sm6srw Jun 24, 2021
9bbcef4
Remove unused icon
sm6srw Jun 24, 2021
bc7be1c
align content with header and remove border
pinzart Jun 24, 2021
ae0e918
update
pinzart Jun 24, 2021
97d4d8c
update menu icon
pinzart Jun 24, 2021
6816d54
Merge branch 'master' into new_installed_packages_view
pinzart90 Jun 24, 2021
a760648
Remove old Installed packages view.
sm6srw Jun 24, 2021
e89f005
Merge branch 'new_installed_packages_view' of https://github.com/Dyna…
sm6srw Jun 24, 2021
999ad7c
Update InstalledPackagesControl.xaml.cs
pinzart Jun 25, 2021
7bac437
Fix Colors
sm6srw Jun 25, 2021
ce56c43
Move style
sm6srw Jun 25, 2021
8721488
Use FlatIconButtonStyle
sm6srw Jun 25, 2021
b5926b7
Update comment and use nameof()
sm6srw Jun 25, 2021
7c14a1d
Merge upstream/new_installed_packages_view
sm6srw Jun 25, 2021
29a1bc3
Fix merge error.
sm6srw Jun 25, 2021
c694e11
Update comment.
sm6srw Jun 28, 2021
59a21ff
Merge branch 'new_installed_packages_view' of https://github.com/Dyna…
sm6srw Jun 28, 2021
90e5e9b
Merge master
sm6srw Jun 28, 2021
a8bd94d
Fix tests
sm6srw Jun 28, 2021
069fe43
Keep ManagePackage tracking
sm6srw Jun 28, 2021
d07496e
Fix project file
sm6srw Jun 29, 2021
8b3673a
Fix command
sm6srw Jun 29, 2021
d2fe27f
Update track implementation
sm6srw Jun 29, 2021
86aa562
More command tweaks
sm6srw Jun 30, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions src/DynamoCoreWpf/Controls/InstalledPackagesControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ private void MoreButton_OnClick(object sender, RoutedEventArgs e)
button.ContextMenu.DataContext = button.DataContext;
button.ContextMenu.IsOpen = true;
}

private void Expander_Expanded(object sender, RoutedEventArgs e)
{
Expander exp = (Expander)sender;
if (exp.DataContext is PackageViewModel pm)
{
pm.ToggleTypesVisibleInManagerCommand.Execute();
}
}
}
}

10 changes: 0 additions & 10 deletions src/DynamoCoreWpf/DynamoCoreWpf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -362,9 +362,6 @@
<Compile Include="Views\Preview\InfoBubbleView.xaml.cs">
<DependentUpon>InfoBubbleView.xaml</DependentUpon>
</Compile>
<Compile Include="Views\PackageManager\InstalledPackagesView.xaml.cs">
<DependentUpon>InstalledPackagesView.xaml</DependentUpon>
</Compile>
<Compile Include="Views\Search\LibraryView.xaml.cs">
<DependentUpon>LibraryView.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -506,7 +503,6 @@
<None Include="App.config">
<SubType>Designer</SubType>
</None>
<None Include="packages.config" />
<None Include="UI\Fonts\OpenSans-Bold.ttf">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand Down Expand Up @@ -1168,12 +1164,6 @@
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<Page Include="Views\PackageManager\InstalledPackagesView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<Page Include="Views\Search\LibraryView.xaml">
<Generator>MSBuild:Compile</Generator>
Expand Down
27 changes: 0 additions & 27 deletions src/DynamoCoreWpf/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions src/DynamoCoreWpf/Properties/Resources.en-US.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1160,12 +1160,6 @@ Failed to publish file(s):
<data name="InstalledPackageViewContextMenuRemoveDeprecationTooltip" xml:space="preserve">
<value>Remove package deprecation. Only allowed if you're a current maintainer of the package.</value>
</data>
<data name="InstalledPackageViewContextMenuShowContent" xml:space="preserve">
<value>Show Contents</value>
</data>
<data name="InstalledPackageViewContextMenuShowContentTooltip" xml:space="preserve">
<value>See the types loaded by this package</value>
</data>
<data name="InstalledPackageViewContextMenuShowRootDir" xml:space="preserve">
<value>Show Root Directory</value>
</data>
Expand Down Expand Up @@ -1527,9 +1521,6 @@ Next assemblies were loaded several times:
<value>A problem occurred when trying to install the package. Dynamo is unable to obtain read/write access to
{0}</value>
</data>
<data name="PackageManagerWebSiteButton" xml:space="preserve">
<value>Package Manager Website</value>
</data>
<data name="PackageNameCannotContainTheseCharacters" xml:space="preserve">
<value>The name of the package cannot contain /,\, or *.</value>
<comment>ErrorString</comment>
Expand Down
9 changes: 0 additions & 9 deletions src/DynamoCoreWpf/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1153,12 +1153,6 @@ You will get a chance to save your work.</value>
<data name="InstalledPackageViewContextMenuRemoveDeprecationTooltip" xml:space="preserve">
<value>Remove package deprecation. Only allowed if you're a current maintainer of the package.</value>
</data>
<data name="InstalledPackageViewContextMenuShowContent" xml:space="preserve">
<value>Show Contents</value>
</data>
<data name="InstalledPackageViewContextMenuShowContentTooltip" xml:space="preserve">
<value>See the types loaded by this package</value>
</data>
<data name="InstalledPackageViewContextMenuShowRootDir" xml:space="preserve">
<value>Show Root Directory</value>
</data>
Expand Down Expand Up @@ -1237,9 +1231,6 @@ You will get a chance to save your work.</value>
<data name="PackageDownloadStateStarting" xml:space="preserve">
<value>Starting</value>
</data>
<data name="PackageManagerWebSiteButton" xml:space="preserve">
<value>Package Manager Website</value>
</data>
<data name="PackageSearchStateNoResult" xml:space="preserve">
<value>Search returned no results!</value>
</data>
Expand Down
13 changes: 2 additions & 11 deletions src/DynamoCoreWpf/ViewModels/PackageManager/PackageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public bool HasAssemblies
get { return Model.LoadedAssemblies.Any(); }
}

[Obsolete("Do not use. This command will be removed. It does nothing.")]
public DelegateCommand ToggleTypesVisibleInManagerCommand { get; set; }
sm6srw marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is obsoleted here...

public DelegateCommand GetLatestVersionCommand { get; set; }
public DelegateCommand PublishNewPackageVersionCommand { get; set; }
Expand All @@ -62,7 +63,7 @@ public PackageViewModel(DynamoViewModel dynamoViewModel, Package model)
this.packageManagerClient = pmExtension.PackageManagerClient;
Model = model;

ToggleTypesVisibleInManagerCommand = new DelegateCommand(ToggleTypesVisibleInManager, CanToggleTypesVisibleInManager);
ToggleTypesVisibleInManagerCommand = new DelegateCommand(() => { }, () => true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe also obsolete it so it's clear to users not to expect it to do anything?

GetLatestVersionCommand = new DelegateCommand(GetLatestVersion, CanGetLatestVersion);
PublishNewPackageVersionCommand = new DelegateCommand(() => ExecuteWithTou(PublishNewPackageVersion), CanPublishNewPackageVersion);
PublishNewPackageCommand = new DelegateCommand(() => ExecuteWithTou(PublishNewPackage), CanPublishNewPackage);
Expand Down Expand Up @@ -266,15 +267,5 @@ private bool CanGetLatestVersion()
{
return false;
}

private void ToggleTypesVisibleInManager()
{
Model.TypesVisibleInManager = !Model.TypesVisibleInManager;
}

private bool CanToggleTypesVisibleInManager()
{
return true;
}
}
}
4 changes: 0 additions & 4 deletions src/DynamoCoreWpf/Views/Core/DynamoView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -603,10 +603,6 @@
Header="{x:Static p:Resources.DynamoViewPackageMenuSearchPackage}"
Command="{Binding Path=DataContext.ShowPackageManagerSearchCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type controls:DynamoView}}}"
Name="showPMSearch" />
<MenuItem Focusable="False"
Header="{x:Static p:Resources.DynamoViewPackageMenuManagePackage}"
Command="{Binding Path=DataContext.ShowInstalledPackagesCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type controls:DynamoView}}}"
Name="showPMInstalled" />
<MenuItem Focusable="False"
Header="{x:Static p:Resources.DynamoViewPackageMenuPublishPackage}"
Command="{Binding Path=DataContext.PublishNewPackageCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type controls:DynamoView}}}"
Expand Down
25 changes: 0 additions & 25 deletions src/DynamoCoreWpf/Views/Core/DynamoView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,6 @@ private void DynamoView_Loaded(object sender, EventArgs e)
#region Package manager

dynamoViewModel.RequestPackagePublishDialog += DynamoViewModelRequestRequestPackageManagerPublish;
dynamoViewModel.RequestManagePackagesDialog += DynamoViewModelRequestShowInstalledPackages;
dynamoViewModel.RequestPackageManagerSearchDialog += DynamoViewModelRequestShowPackageManagerSearch;

#endregion
Expand Down Expand Up @@ -1153,29 +1152,6 @@ private void DynamoViewModelRequestShowPackageManagerSearch(object s, EventArgs
_pkgSearchVM.RefreshAndSearchAsync();
}

private InstalledPackagesView _installedPkgsView;

private void DynamoViewModelRequestShowInstalledPackages(object s, EventArgs e)
{
var cmd = Analytics.TrackCommandEvent("ManagePackage");
if (_installedPkgsView == null)
{
var pmExtension = dynamoViewModel.Model.GetPackageManagerExtension();
_installedPkgsView = new InstalledPackagesView(new InstalledPackagesViewModel(dynamoViewModel,
pmExtension.PackageLoader))
{
Owner = this,
WindowStartupLocation = WindowStartupLocation.CenterOwner
};

_installedPkgsView.Closed += (sender, args) => { _installedPkgsView = null; cmd.Dispose(); };
_installedPkgsView.Show();

if (_installedPkgsView.IsLoaded && IsLoaded) _installedPkgsView.Owner = this;
}
_installedPkgsView.Focus();
}

private void ClipBoard_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
dynamoViewModel.CopyCommand.RaiseCanExecuteChanged();
Expand Down Expand Up @@ -1531,7 +1507,6 @@ private void WindowClosed(object sender, EventArgs e)

//PACKAGE MANAGER
dynamoViewModel.RequestPackagePublishDialog -= DynamoViewModelRequestRequestPackageManagerPublish;
dynamoViewModel.RequestManagePackagesDialog -= DynamoViewModelRequestShowInstalledPackages;
dynamoViewModel.RequestPackageManagerSearchDialog -= DynamoViewModelRequestShowPackageManagerSearch;

//FUNCTION NAME PROMPT
Expand Down
15 changes: 9 additions & 6 deletions src/DynamoCoreWpf/Views/Menu/PreferencesView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
mc:Ignorable="d"
Height="474"
Width="650"
ResizeMode="NoResize">
ResizeMode="NoResize"
Closed="PreferencesView_OnClosed">
sm6srw marked this conversation as resolved.
Show resolved Hide resolved

<!--Using the Styles from the SharedResourcesDictionary located in DynamoCoreWpf/UI/Themes/DynamoModern.xaml-->
<Window.Resources>
Expand Down Expand Up @@ -744,11 +745,13 @@
</Expander>

<!--This Grid row contains the Installed Packages section-->
<Expander x:Name="InstalledPackagesExpander"
Style="{StaticResource MenuExpanderStyle}"
IsExpanded="{Binding PreferencesTabs[Features].ExpanderActive, Converter={StaticResource ExpandersBindingConverter}, ConverterParameter=InstalledPackagesExpander}"
Grid.Row="1"
Header="{x:Static p:Resources.InstalledPackageViewTitle}">
<Expander x:Name="InstalledPackagesExpander"
Expanded="InstalledPackagesExpander_OnExpanded"
Collapsed="InstalledPackagesExpander_OnCollapsed"
Style="{StaticResource MenuExpanderStyle}"
IsExpanded="{Binding PreferencesTabs[Features].ExpanderActive, Converter={StaticResource ExpandersBindingConverter}, ConverterParameter=InstalledPackagesExpander}"
Grid.Row="1"
Header="{x:Static p:Resources.InstalledPackageViewTitle}">
<StackPanel
Orientation="Vertical" Margin="0,6,0,0">
<wpfControls:InstalledPackagesControl Height="Auto"/>
Expand Down
15 changes: 15 additions & 0 deletions src/DynamoCoreWpf/Views/Menu/PreferencesView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,5 +250,20 @@ private void ReloadCPython_Click(object sender, RoutedEventArgs e)
dynViewModel.Model.OnRequestPythonReset("CPython3");
}

private IDisposable cmd;
private void InstalledPackagesExpander_OnExpanded(object sender, RoutedEventArgs e)
{
cmd = Analytics.TrackCommandEvent("ManagePackage");
}

private void InstalledPackagesExpander_OnCollapsed(object sender, RoutedEventArgs e)
{
cmd?.Dispose();
}

private void PreferencesView_OnClosed(object sender, EventArgs e)
{
cmd?.Dispose();
}
}
}
Loading