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

Dynamo Package Dependency View Extension #9787

Merged
merged 27 commits into from
Jun 18, 2019
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
1126ba5
Initial Commit
QilongTang Jun 10, 2019
4d9303a
Update csproj to use project config imports
QilongTang Jun 10, 2019
6428ad8
Add Data bind
QilongTang Jun 11, 2019
226dd31
Workspace Open with package info
QilongTang Jun 11, 2019
01ca109
adjust styling and make cells read only
QilongTang Jun 13, 2019
57a91f9
adjust styling
QilongTang Jun 13, 2019
1379d94
reduce package cell width
QilongTang Jun 13, 2019
4dbdcc5
Code clean Up
QilongTang Jun 13, 2019
22992d0
Add Property watch for Package Dependencies
QilongTang Jun 13, 2019
abcce1f
use name of
QilongTang Jun 14, 2019
7a270ad
Some UI tunning
QilongTang Jun 14, 2019
7357094
Merge branch 'master' into PackageDependencyViewExtension
QilongTang Jun 14, 2019
e8c3667
Styling changes
QilongTang Jun 14, 2019
d4c5a0b
Merge branch 'master' into PackageDependencyViewExtension
QilongTang Jun 14, 2019
5679bfe
Using View injection API
QilongTang Jun 14, 2019
dc748c7
grid styling
QilongTang Jun 14, 2019
27c05fc
Highlight packages not installed
QilongTang Jun 14, 2019
63c6bd9
Add Download Button and view injection Menu Item
QilongTang Jun 17, 2019
48346eb
Some comments missing
QilongTang Jun 17, 2019
4904b89
code clean up
QilongTang Jun 17, 2019
0bebfcc
Merge branch 'master' into PackageDependencyViewExtension
QilongTang Jun 17, 2019
23b06bb
Address Comments
QilongTang Jun 18, 2019
5d483b1
UI Adjustment
QilongTang Jun 18, 2019
6c4ede7
Update unsubscribe logic
QilongTang Jun 18, 2019
c4d57ef
More comments
QilongTang Jun 18, 2019
924dca9
Merge branch 'master' into PackageDependencyViewExtension
QilongTang Jun 18, 2019
befc36a
Fix Unit Tests
QilongTang Jun 18, 2019
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
304 changes: 304 additions & 0 deletions src/Dynamo.All.sln

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions src/DynamoCore/Extensions/ReadyParams.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ internal ReadyParams(DynamoModel dynamoM)
{
dynamoModel = dynamoM;
dynamoModel.PropertyChanged += OnDynamoModelPropertyChanged;
dynamoModel.WorkspaceCleared += OnCurrentWorkspaceModelCleared;
dynamoM.Logger.NotificationLogged += OnNotificationRecieved;
startupParams = new StartupParams(dynamoModel.AuthenticationManager.AuthProvider,
dynamoModel.PathManager, new ExtensionLibraryLoader(dynamoModel), dynamoModel.CustomNodeManager,
Expand Down Expand Up @@ -93,6 +94,16 @@ private void OnCurrentWorkspaceModelChanged(IWorkspaceModel ws)
CurrentWorkspaceChanged(ws);
}

/// <summary>
/// Occurs when current workspace is cleared
/// </summary>
public event Action<IWorkspaceModel> CurrentWorkspaceCleared;
private void OnCurrentWorkspaceModelCleared(IWorkspaceModel ws)
{
if (CurrentWorkspaceCleared != null)
CurrentWorkspaceCleared(ws);
}

private void OnDynamoModelPropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == "CurrentWorkspace")
Expand Down
4 changes: 0 additions & 4 deletions src/DynamoCore/Graph/Workspaces/PackageDependencyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace Dynamo.Graph.Workspaces
{
Expand Down
5 changes: 5 additions & 0 deletions src/DynamoCore/Graph/Workspaces/WorkspaceModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
// For workspace package dependency collection
[assembly: InternalsVisibleTo("DynamoPackages")]

// Internals are visible to the Package Manager extension
// For workspace package dependency collection
[assembly: InternalsVisibleTo("PackageDependencyViewExtension")]

namespace Dynamo.Graph.Workspaces
{
/// <summary>
Expand Down Expand Up @@ -649,6 +653,7 @@ internal List<PackageDependencyInfo> PackageDependencies
set
{
packageDependencies = value;
RaisePropertyChanged(nameof(PackageDependencies));
}
}

Expand Down
1 change: 1 addition & 0 deletions src/DynamoCoreWpf/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@
[assembly: InternalsVisibleTo("CommandLineTests")]
[assembly: InternalsVisibleTo("Watch3DNodeModelsWpf")]
[assembly: InternalsVisibleTo("DynamoPerformanceTests")]
[assembly: InternalsVisibleTo("PackageDependencyViewExtension")]
2 changes: 1 addition & 1 deletion src/DynamoManipulation/DynamoManipulation.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<Reference Include="PresentationFramework" />
<Reference Include="ProtoGeometry, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(DynamoExternPath)\ProtoGeometry\ProtoGeometry.dll</HintPath>
<HintPath>..\..\extern\ProtoGeometry\ProtoGeometry.dll</HintPath>
QilongTang marked this conversation as resolved.
Show resolved Hide resolved
<Private>False</Private>
</Reference>
<Reference Include="System" />
Expand Down
16 changes: 8 additions & 8 deletions src/DynamoManipulation/NodeManipulator.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Windows.Input;
using System.Windows.Media.Media3D;
using Autodesk.DesignScript.Geometry;
using Autodesk.DesignScript.Geometry;
using CoreNodeModels.Input;
using Dynamo.Extensions;
using Dynamo.Graph.Nodes;
Expand All @@ -15,6 +8,13 @@
using Dynamo.Wpf.ViewModels.Watch3D;
using ProtoCore.AST.AssociativeAST;
using ProtoCore.Mirror;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Windows.Input;
using System.Windows.Media.Media3D;
using Point = Autodesk.DesignScript.Geometry.Point;
using Vector = Autodesk.DesignScript.Geometry.Vector;

Expand Down
5 changes: 0 additions & 5 deletions src/LibraryViewExtension/Views/LibraryView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ui="clr-namespace:Dynamo.UI"
xmlns:controls="clr-namespace:Dynamo.Controls"
xmlns:uicontrols="clr-namespace:Dynamo.UI.Controls"
xmlns:vms="clr-namespace:Dynamo.Wpf.ViewModels"
xmlns:p="clr-namespace:Dynamo.Wpf.Properties"
xmlns:local="clr-namespace:Dynamo.LibraryUI.Views"
xmlns:cefSharp="clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf"
mc:Ignorable="d"
Expand Down
91 changes: 91 additions & 0 deletions src/PackageDependencyViewExtension/PackageDependencyView.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<UserControl x:Class="Dynamo.PackageDependency.PackageDependencyView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
VerticalAlignment="Top"
HorizontalAlignment="Left">
<Grid Background= "#353535" Height="800">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<DataGrid
Name="PackageDependencyTable"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Width="500"
Margin="5,5,0,0"
QilongTang marked this conversation as resolved.
Show resolved Hide resolved
ItemsSource="{Binding Columns}"
CanUserAddRows="False"
AutoGenerateColumns="False"
IsReadOnly="True"
ColumnWidth="*"
GridLinesVisibility ="None"
Background="#353535"
RowBackground="Transparent"
FontSize="14"
IsHitTestVisible="False"
Grid.Row="0">
<DataGrid.Columns>
<DataGridTemplateColumn>
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<ItemsControl ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Path=DataContext.Headers}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<TextBlock Width="{Binding Width}" Foreground="{Binding Color}" Text="{Binding Data}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
<ItemsControl ItemsSource="{Binding ColumnsData}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<TextBlock Margin="2" Width="{Binding Width}" Foreground="{Binding Color}" Text="{Binding Data}" Background="#353535" TextWrapping="Wrap"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>

<!--Download Button-->
QilongTang marked this conversation as resolved.
Show resolved Hide resolved
<!--<Grid x:Name="container"
Background="Transparent"
Grid.Row="1">
<Button
VerticalAlignment="Bottom"
HorizontalAlignment="Center"
Margin="10"
Background="#373737">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="10, 10, 10, 10"
Foreground="#bbbbbb"
FontSize="14px">
Download
</TextBlock>
</Button>
</Grid>-->
</Grid>
</UserControl>
Loading