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

Add an option to remember last opened Extensions in Dynamo #13812

Merged
merged 65 commits into from
Mar 14, 2023
Merged
Show file tree
Hide file tree
Changes from 60 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
8f3236e
merge
zeusongit Nov 2, 2022
f93a50e
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Nov 2, 2022
2272682
Merge branch 'master' of https://github.com/zeusongit/Dynamo
zeusongit Nov 3, 2022
a4e2896
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Nov 8, 2022
75bf8ff
Integrate ML Node-Autocompletion,
reddyashish Nov 9, 2022
58cdba4
Update NodeModel.cs
reddyashish Nov 9, 2022
64db862
Update NodeModel.cs
reddyashish Nov 9, 2022
033df58
some changes
reddyashish Nov 10, 2022
c432616
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Nov 10, 2022
27af5fc
Merge remote-tracking branch 'upstream'
reddyashish Nov 10, 2022
ed04d80
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Nov 10, 2022
50534c4
more changes
reddyashish Nov 11, 2022
ae77dc0
Update NodeAutoCompleteSearchControl.xaml
reddyashish Nov 11, 2022
72d1800
Fix edge cases and UI improvements.
reddyashish Nov 13, 2022
1df7fbc
update
reddyashish Nov 13, 2022
0d5e27b
Update NodeAutoCompleteSearchControl.xaml
reddyashish Nov 13, 2022
fda9caa
fix highlighting items.
reddyashish Nov 13, 2022
8a844d7
fix
reddyashish Nov 13, 2022
bcdce10
Port name for variable input nodes.
reddyashish Nov 14, 2022
5aea09b
Add base test.
reddyashish Nov 14, 2022
b0ed19e
addressing comments.
reddyashish Nov 14, 2022
61af5fe
Fix the edge cases for search results.
reddyashish Nov 15, 2022
57cc70d
Clean up code
reddyashish Nov 15, 2022
384baaf
Update NodeAutoCompleteSearchViewModel.cs
reddyashish Nov 15, 2022
6eb31e8
refactoring.
reddyashish Nov 15, 2022
b9a6851
updates
reddyashish Nov 16, 2022
6bd4e80
Use IDSDK token for authentication
reddyashish Nov 16, 2022
665dba9
updates
reddyashish Nov 16, 2022
26cf8ff
Merge branch 'master' of https://github.com/reddyashish/Dynamo
zeusongit Nov 17, 2022
304f141
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Nov 17, 2022
6e09556
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Nov 22, 2022
2ce5094
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Nov 23, 2022
dbc3f38
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Nov 23, 2022
cd968ff
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Nov 24, 2022
a026143
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Jan 9, 2023
4037eaf
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Jan 18, 2023
9a64536
remove
zeusongit Jan 19, 2023
494b4ea
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Jan 26, 2023
c9272a8
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Feb 3, 2023
47d52cd
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Feb 6, 2023
32770c9
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Feb 6, 2023
b13896c
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Feb 6, 2023
b63e07a
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Feb 6, 2023
06cd92a
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Feb 10, 2023
757bcb5
Merge branch 'master' of https://github.com/zeusongit/Dynamo
zeusongit Feb 10, 2023
268d146
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Feb 15, 2023
f74e319
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Feb 23, 2023
d9a04e0
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Feb 28, 2023
ac498f3
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Feb 28, 2023
90a670a
Merge branch 'master' of https://github.com/zeusongit/Dynamo
zeusongit Feb 28, 2023
1407cde
Merge branch 'master' of https://github.com/zeusongit/Dynamo
zeusongit Mar 2, 2023
b22407b
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Mar 2, 2023
9437da7
testing workflow
zeusongit Mar 8, 2023
5b2513b
Merge branch 'master' of https://github.com/DynamoDS/Dynamo into dyn-t
zeusongit Mar 8, 2023
645bc6b
Add reopen hook
zeusongit Mar 10, 2023
db232ba
Merge branch 'master' of https://github.com/DynamoDS/Dynamo into dyn-t
zeusongit Mar 10, 2023
007af9c
remove unused usings
zeusongit Mar 10, 2023
2aa6c0e
Update PackageDetailsViewExtension.cs
zeusongit Mar 10, 2023
d1b2f6b
Ensure correct state
zeusongit Mar 10, 2023
41ddffa
Update DynamoView.xaml.cs
zeusongit Mar 10, 2023
5099c9e
Add tests and review comments
zeusongit Mar 10, 2023
87b053c
comments
zeusongit Mar 10, 2023
4e1a480
test fix
zeusongit Mar 13, 2023
50fffb4
comment
zeusongit Mar 14, 2023
17dee62
Update PreferenceSettings.cs
zeusongit Mar 14, 2023
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
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Security.Permissions;
using System.Web.UI.WebControls;
using System.Threading;
using System.Windows;
using System.Windows.Threading;
using DesignScript.Builtin;
using Dynamo.Configuration;
using Dynamo.Core;
using Dynamo.DocumentationBrowser.Properties;
using Dynamo.Graph;
using Dynamo.Graph.Annotations;
using Dynamo.Graph.Workspaces;
using Dynamo.Logging;
using Dynamo.Selection;
using Dynamo.Models;
using DynamoProperties = Dynamo.Properties;
using Dynamo.PackageManager;
using Dynamo.Selection;
using Dynamo.ViewModels;
using Dynamo.Wpf.Extensions;
using Dynamo.Wpf.Interfaces;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Security.Permissions;
using System.Threading;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Threading;
using DynamoProperties = Dynamo.Properties;
zeusongit marked this conversation as resolved.
Show resolved Hide resolved
using MenuItem = System.Windows.Controls.MenuItem;

namespace Dynamo.DocumentationBrowser
Expand Down Expand Up @@ -179,8 +177,7 @@ public override void Loaded(ViewLoadedParams viewLoadedParams)
this.ViewModel.DynamoView = viewLoadedParams.DynamoWindow;
}


public void Shutdown()
public override void Shutdown()
zeusongit marked this conversation as resolved.
Show resolved Hide resolved
{
Dispose();
}
Expand Down
21 changes: 19 additions & 2 deletions src/DynamoCore/Configuration/PreferenceSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public class PreferenceSettings : NotificationObject, IPreferences, IRenderPreci
private double defaultScaleFactor;
private bool disableTrustWarnings = false;
private bool isNotificationCenterEnabled;
private bool isEnablePersistExtensionsEnabled;
private bool isStaticSplashScreenEnabled;
private bool isCreatedFromValidFile = true;
private bool isADPChecked = false;
Expand Down Expand Up @@ -575,6 +576,22 @@ public bool EnableNotificationCenter
}
}

/// <summary>
/// This defines if user wants to the Extensions settings to persist across sessions.
zeusongit marked this conversation as resolved.
Show resolved Hide resolved
/// </summary>
public bool EnablePersistExtensions
{
get
{
return isEnablePersistExtensionsEnabled;
}
set
{
isEnablePersistExtensionsEnabled = value;
RaisePropertyChanged(nameof(EnablePersistExtensions));
}
}


/// <summary>
/// This defines if the user wants to see the static splash screen again
Expand Down Expand Up @@ -655,7 +672,7 @@ public string SelectedPackagePathForInstall
/// <summary>
/// Settings that apply to view extensions.
/// </summary>
public List<ViewExtensionSettings> ViewExtensionSettings { get; set; }
public List<ViewExtensionSettings> ViewExtensionSettingsList { get; set; }
zeusongit marked this conversation as resolved.
Show resolved Hide resolved

private bool disableBuiltinPackages;
/// <summary>
Expand Down Expand Up @@ -808,7 +825,7 @@ public PreferenceSettings()
EnableNotificationCenter = true;
isStaticSplashScreenEnabled = true;
DefaultPythonEngine = string.Empty;
ViewExtensionSettings = new List<ViewExtensionSettings>();
ViewExtensionSettingsList = new List<ViewExtensionSettings>();
GroupStyleItemsList = new List<GroupStyleItem>();
ReadNotificationIds = new List<string>();
DynamoPlayerFolderGroups = new List<DynamoPlayerFolderGroup>();
Expand Down
8 changes: 6 additions & 2 deletions src/DynamoCore/Configuration/ViewExtensionSettings.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Dynamo.Configuration
namespace Dynamo.Configuration
{
/// <summary>
/// Settings that apply to a view extension specifically.
Expand All @@ -21,6 +21,10 @@ public class ViewExtensionSettings
/// Window settings for the extension control when displayed in FloatingWindow mode.
/// </summary>
public WindowSettings WindowSettings { get; set; }
/// <summary>
/// Specifies if the extension was Open in the last session before closing Dynamo, if the property to remember view extension status was enabled.<br/> <c>Default: False</c>
/// </summary>
public bool IsOpen { get; set; } = false;
zeusongit marked this conversation as resolved.
Show resolved Hide resolved
}

/// <summary>
Expand Down Expand Up @@ -83,4 +87,4 @@ public enum WindowStatus
/// </summary>
Maximized
}
}
}
17 changes: 10 additions & 7 deletions src/DynamoCoreWpf/Extensions/ViewExtensionBase.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Dynamo.Wpf.Extensions
{
/// <summary>
Expand Down Expand Up @@ -70,6 +64,15 @@ public virtual void Startup(ViewStartupParams viewStartupParams)

}

/// <summary>
/// Action to be invoked when Dynamo starts up, to re-open the view extension which was open in the last session, if the preference setting
/// to remember the last opened extensions was enabled.
/// </summary>
public virtual void ReOpen()
{

}

/// <summary>
/// Action to be invoked when the view extension is closed.
/// </summary>
Expand All @@ -78,4 +81,4 @@ public virtual void Closed()

}
}
}
}
18 changes: 18 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.Designer.cs

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

7 changes: 7 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.en-US.resx
Original file line number Diff line number Diff line change
Expand Up @@ -3494,6 +3494,13 @@ In certain complex graphs or host program scenarios, Automatic mode may cause in
<data name="DynamoViewSettingLibraryZoomScale" xml:space="preserve">
<value>Library</value>
</data>
<data name="PreferencesViewEnablePersistExtensions" xml:space="preserve">
<value>On launch, remember open extensions panels from last session</value>
</data>
<data name="PreferencesViewExtensions" xml:space="preserve">
<value>Extensions</value>
<comment>Preferences | Features | Extensions</comment>
</data>
<data name="PythonZoomScaleTooltipText" xml:space="preserve">
<value>Drag to adjust Python Editor zoom scale between 10% and 100%. You can also adjust this in Python Editor by pressing Shift and scrolling the mouse wheel.</value>
</data>
Expand Down
7 changes: 7 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -3481,6 +3481,13 @@ In certain complex graphs or host program scenarios, Automatic mode may cause in
<data name="DynamoViewSettingLibraryZoomScale" xml:space="preserve">
<value>Library</value>
</data>
<data name="PreferencesViewEnablePersistExtensions" xml:space="preserve">
<value>On launch, remember open extensions panels from last session</value>
</data>
<data name="PreferencesViewExtensions" xml:space="preserve">
<value>Extensions</value>
<comment>Preferences | Features | Extensions</comment>
</data>
<data name="PythonZoomScaleTooltipText" xml:space="preserve">
<value>Drag to adjust Python Editor zoom scale between 10% and 100%. You can also adjust this in Python Editor by pressing Shift and scrolling the mouse wheel.</value>
</data>
Expand Down
23 changes: 20 additions & 3 deletions src/DynamoCoreWpf/ViewModels/Menu/PreferencesViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ public string SelectedPythonEngine
}

/// <summary>
/// Controls the IsChecked property in the "Hide IronPython alerts" toogle button
/// Controls the IsChecked property in the "Hide IronPython alerts" toggle button
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice

/// </summary>
public bool HideIronPythonAlertsIsChecked
{
Expand All @@ -787,7 +787,7 @@ public bool HideIronPythonAlertsIsChecked
}

/// <summary>
/// Controls the IsChecked property in the "Show Whitespace in Python editor" toogle button
/// Controls the IsChecked property in the "Show Whitespace in Python editor" toggle button
/// </summary>
public bool ShowWhitespaceIsChecked
{
Expand All @@ -804,7 +804,7 @@ public bool ShowWhitespaceIsChecked
}

/// <summary>
/// Controls the IsChecked property in the "Notification Center" toogle button
/// Controls the IsChecked property in the "Notification Center" toggle button
/// </summary>
public bool NotificationCenterIsChecked
{
Expand All @@ -819,6 +819,23 @@ public bool NotificationCenterIsChecked
}
}

/// <summary>
/// Controls the IsChecked property in the "Extensions" toggle button, to enable persisted extensions, that will remember
/// extensions setting as per the last session.
/// </summary>
public bool PersistExtensionsIsChecked
{
get
{
return preferenceSettings.EnablePersistExtensions;
}
set
{
preferenceSettings.EnablePersistExtensions = value;
RaisePropertyChanged(nameof(PersistExtensionsIsChecked));
}
}

#region [ Node Autocomplete ]

/// <summary>
Expand Down
Loading