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

Rewrite editor navigation model #1870

Open
wants to merge 32 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
3c2a304
Avoid serializing default property values
glopesdev Jun 26, 2024
a98348a
Add explorer tree view control and path navigation
glopesdev Jul 1, 2024
337a825
Add explorer support for highlighting node paths
glopesdev Jul 1, 2024
6e816da
Add theme renderer support to custom tree views
glopesdev Jul 2, 2024
c7eb455
Use state image list for flexible icon rendering
glopesdev Jul 2, 2024
18eb816
Allow resolution to determine if path is read-only
glopesdev Jul 2, 2024
3eda277
Rewrite editor navigation model
glopesdev Jul 2, 2024
db8ebff
Add navigation commands to undo stack
glopesdev Jul 2, 2024
e705635
Ensure explorer and status reset on workflow clear
glopesdev Jul 2, 2024
4a417e4
Add workflow editable status to explorer view
glopesdev Jul 14, 2024
63568fb
Hide ready state from explorer view
glopesdev Jul 14, 2024
441a510
Ensure explorer view refreshes on build error
glopesdev Aug 3, 2024
f09ba1d
Ensure explorer view initializes on load
glopesdev Aug 3, 2024
fdc9b43
Prescale state image list size to system DPI
glopesdev Aug 3, 2024
cf66ea0
Save explorer splitter distance to editor settings
glopesdev Aug 3, 2024
2e5d18b
Size description boxes relative to each other
glopesdev Aug 3, 2024
9d7bc66
Fix description box sizes in netcore
glopesdev Aug 3, 2024
9042dc7
Avoid clipping breadcrumbs control
glopesdev Aug 3, 2024
ef17815
Auto-compress path breadcrumbs to fit control size
glopesdev Aug 4, 2024
99a5a4e
Avoid renaming tab page on single tab mode
glopesdev Aug 4, 2024
1f97636
Size description box depending on editor settings
glopesdev Aug 4, 2024
a5f7449
Compress layout XML representation
glopesdev Aug 5, 2024
96f9119
Ensure project name is set before navigation reset
glopesdev Sep 3, 2024
24dbff3
Clear workflow error highlight
glopesdev Sep 3, 2024
00f6c8c
Prevent clipping of breadcrumbs button
glopesdev Sep 7, 2024
acac41b
Remove unnecessary unwrap call
glopesdev Sep 17, 2024
c8e4d3c
Clarify condition purpose
glopesdev Sep 17, 2024
73f6407
Fix navigation to disabled group nodes
glopesdev Sep 17, 2024
c8658a6
Avoid relaunching closed visualizer
glopesdev Sep 17, 2024
245b3be
Allow navigating to selected node by keyboard
glopesdev Sep 17, 2024
7700ac2
Refactor explorer tree view as a user control
glopesdev Sep 17, 2024
6ac8553
Add single click navigation and context menu
glopesdev Sep 17, 2024
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
1 change: 1 addition & 0 deletions Bonsai.Editor.Tests/MockGraphView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public MockGraphView(ExpressionBuilderGraph workflow = null)
Workflow = workflow ?? new ExpressionBuilderGraph();
CommandExecutor = new CommandExecutor();
var serviceContainer = new ServiceContainer();
serviceContainer.AddService(typeof(WorkflowBuilder), new WorkflowBuilder(Workflow));
serviceContainer.AddService(typeof(CommandExecutor), CommandExecutor);
ServiceProvider = serviceContainer;
}
Expand Down
1 change: 0 additions & 1 deletion Bonsai.Editor.Tests/WorkflowEditorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ static string ToString(IEnumerable<T> sequence)
var editor = new WorkflowEditor(graphView.ServiceProvider, graphView);
editor.UpdateLayout.Subscribe(graphView.UpdateGraphLayout);
editor.UpdateSelection.Subscribe(graphView.UpdateSelection);
editor.Workflow = graphView.Workflow;

var nodeSequence = editor.GetGraphValues().ToArray();
return (editor, assertIsReversible: () =>
Expand Down
127 changes: 101 additions & 26 deletions Bonsai.Editor/EditorForm.Designer.cs

Large diffs are not rendered by default.

324 changes: 159 additions & 165 deletions Bonsai.Editor/EditorForm.cs

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions Bonsai.Editor/EditorSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ sealed class EditorSettings
internal EditorSettings(string path)
{
AnnotationPanelSize = 400;
ExplorerSplitterDistance = 300;
settingsPath = path;
}

Expand All @@ -37,6 +38,8 @@ public static EditorSettings Instance

public int AnnotationPanelSize { get; set; }

public int ExplorerSplitterDistance { get; set; }

public RecentlyUsedFileCollection RecentlyUsedFiles
{
get { return recentlyUsedFiles; }
Expand Down Expand Up @@ -74,6 +77,11 @@ static EditorSettings Load()
int.TryParse(reader.ReadElementContentAsString(), out int annotationPanelSize);
settings.AnnotationPanelSize = annotationPanelSize;
}
else if (reader.Name == nameof(ExplorerSplitterDistance))
{
int.TryParse(reader.ReadElementContentAsString(), out int explorerSplitterDistance);
settings.ExplorerSplitterDistance = explorerSplitterDistance;
}
else if (reader.Name == nameof(DesktopBounds))
{
reader.ReadToFollowing(nameof(Rectangle.X));
Expand Down Expand Up @@ -120,6 +128,7 @@ public void Save()
writer.WriteElementString(nameof(WindowState), WindowState.ToString());
writer.WriteElementString(nameof(EditorTheme), EditorTheme.ToString());
writer.WriteElementString(nameof(AnnotationPanelSize), AnnotationPanelSize.ToString(CultureInfo.InvariantCulture));
writer.WriteElementString(nameof(ExplorerSplitterDistance), ExplorerSplitterDistance.ToString(CultureInfo.InvariantCulture));

writer.WriteStartElement(nameof(DesktopBounds));
writer.WriteElementString(nameof(Rectangle.X), DesktopBounds.X.ToString(CultureInfo.InvariantCulture));
Expand Down
92 changes: 92 additions & 0 deletions Bonsai.Editor/ExplorerTreeView.Designer.cs

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

Loading