Skip to content

Commit

Permalink
Upstream merge (#26)
Browse files Browse the repository at this point in the history
* Release mouse capture on connector cancel due to KeyUp event

* Update CHANGELOG.md

* Bump version for release

* Port to Avalonia

* Fix warnings

* Update README.md

Add link to Avalonia port

* Fix: Zooming into nested editors should not zoom the parent editors

* Fix: Cancelling a pending connection via a hot key will no longer throw an exception

* Fix: Exceptions in UnscaleTransformConverter and UnscaleDoubleConverter

* Fix: Cannot use marquee selection and pan at the same time

* Fix: fixed selection clear on items collection reset

* Fix: Cannot use marquee selection inside comment nodes

* 5.2.0.1 release

* Reorder DataTemplates in calculator demo for easier Avalonia merges

* Fix: The selection rectangle stops updating when the cursor is outside the window

* Added BaseConnection.Orientation to allow vertical connections

* Updated changelog

* Fix: Mimic WPF's mouse capture behavior

* fix small spelling error in recently added dependency property

* split source/target orientation

* better control point if different orientations

* slight clarification in changelog

* Updated changelong

* Added directional arrows

* Fixed spelling issue

* Caluclate bezier connection tangent

* Added vertical nodes in playground app

* Minor adjustments

* Merge fix

* Update Avalonia to 11.1.0-beta2

* Allow changing editor gestures at runtime (miroiu#104)

Separated selection gestures for ItemContainer and GroupingNode from the NodifyEditor
Added new gesture types: AnyGesture, AllGestures, and NodifyGesture
Fixed a bug where the item container would incorrectly transition to the dragging state on mouse over

* Added Orientation to NodeInput and NodeOutput (miroiu#105)

* Added Orientation dependency property to NodeInput and NodeOutput

* Added the ability to animate directional arrows on connections (miroiu#106)

* Added DirectionalArrowsOffset dependency property to BaseConnection
Added StartAnimation and StopAnimation methods to BaseConnection

* Added Toggle connections animation button in playground app

* Prepare for release

* Allow changing editor gestures at runtime (miroiu#104)

Separated selection gestures for ItemContainer and GroupingNode from the NodifyEditor
Added new gesture types: AnyGesture, AllGestures, and NodifyGesture
Fixed a bug where the item container would incorrectly transition to the dragging state on mouse over

* Added Orientation to NodeInput and NodeOutput (miroiu#105)

* Added Orientation dependency property to NodeInput and NodeOutput

* Added the ability to animate directional arrows on connections (miroiu#106)

* Added DirectionalArrowsOffset dependency property to BaseConnection
Added StartAnimation and StopAnimation methods to BaseConnection

* Added Toggle connections animation button in playground app

* Prepare for release

* Post-merge fixes

* Update readme

* Fixed knot node binding errors in playground app

* fix bug can not access editor command (#17)

* fix bug can not access editor command

---------

Co-authored-by: Bartosz Korczynski <[email protected]>

* Fix: Can't resize grouping nodes

* Fix: Sticky Connections

* Fix: Don't open context menu when panning

* Add new built-in connection type: StepConnection (miroiu#109)

* Fix BaseConnection SplitEvent and DisconnectEvent not being raised if the corresponding command is null

* Fixed DecoratorContainer scaling with zoom when not referencing a theme in App.xaml

* Fixed wrong connector position for knot nodes when using step connection (miroiu#112)

* Sync documentation to wiki

* Update sync-docs.yml

* add chinese wiki docs (miroiu#114)

* Merge conflicts fix

* [Example] Add shapes drawing example application (miroiu#115)

* Add new example application

* Disable editing controls when the canvas is locked

* Draw shapes by click and drag

* Add ResizablePanel to resize shapes

* Update README.md

Add canvas app example

* NodifyObservableCollection: Avoid copying the list of items if there are no subscribers to removed or cleared events

* Bump version for release

* Update FAQ.md

* Improved Node customizability

* Added DataContext to ItemsSelectStartedCommand, ItemsSelectCompletedCommand, ItemsDragStartedCommand and ItemsDragCompletedCommand

* Fix containers at (0, 0) being selected when double clicking on the canvas

* Update changelog

* Update Connections-Overview.md

* Resolve merge conflicts

* Upgrade to Avalonia 11.1

* Fix CI

* Add a Minimap control to Nodify (miroiu#124)

* Added a Minimap control to Nodify

* Add  MaxViewportOffset and Zoom event

* Add ResizeToViewport

* Add playground settings

* Add IsReadOnly to minimap to allow disabling controls

* Add documentation

* Bump version for release

* Increase minimap colors contrast

* Resolve WPF merge conflicts

* Build fix

* Added a link to a live, browser demo

* Update the getting started section  miroiu#125

* Update README.md

Fix image link for Shapes app

* Add CuttingLine control to Nodify (miroiu#127)

* Added CuttingLine control to Nodify

* Bump version for release

* Update api reference

* Update README.md (#19)

Spent far too long going in circles with this one... 😄

* Add OutlineBrush and OutlineThickness to BaseConnection (miroiu#133)

Fixes miroiu#131

* Add IsAnimatingDirectionaArrows and DirectionalArrowsAnimationDuration dependency properties to BaseConnection (miroiu#135)

* Add the ability to select connections (miroiu#139)

* Add multi-select and support for custom connections

* Added CanSelectMultipleItems to NodifyEditor

* Added settings search box to playground app

* Fix Calculator context manu and converter issues.

* Update Avalonia version to 11.1.4

* Fix Calculator context menu

* Add support for ScrollViewer (miroiu#142)

* Implement IScrollInfo

* Bump version for release

* Merge commit 'efa15e00e859d4f756e87e8743994693844d759e' into avalonia_port

* Add support for ScrollViewer

---------

Co-authored-by: Emanuel Miroiu <[email protected]>
Co-authored-by: Hendrik Polczynski <[email protected]>
Co-authored-by: phamviethuy <[email protected]>
Co-authored-by: enheng? <[email protected]>
Co-authored-by: ArronDavies <[email protected]>
Co-authored-by: Mario Pintaric <[email protected]>
  • Loading branch information
7 people authored Oct 24, 2024
1 parent 5d9e410 commit b4d7db0
Show file tree
Hide file tree
Showing 308 changed files with 32,515 additions and 3,706 deletions.
17 changes: 0 additions & 17 deletions .github/ISSUE_TEMPLATE/add_example_app.md

This file was deleted.

3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,8 @@ A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.

**Does it happen in WPF version?**
If possible, please try to reproduce the bug in the [WPF version](https://github.com/miroiu/nodify). If it also happen in WPF's, it has to be fixed in the upstream and then it can be merged to this Avalonia port.

**Additional context**
Add any other context about the problem here.
17 changes: 0 additions & 17 deletions .github/ISSUE_TEMPLATE/documentation.md

This file was deleted.

27 changes: 0 additions & 27 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

26 changes: 17 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
name: Build

on: [push, pull_request]
on:
push:
paths-ignore:
- "docs/**"
pull_request:
paths-ignore:
- "docs/**"

jobs:
build:
runs-on: windows-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/[email protected]
with:
dotnet-version: '8.0.x'
- name: Build
run: dotnet build --configuration Release
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/[email protected]
with:
dotnet-version: "8.0.x"
- name: Build
run: |
dotnet workload restore
dotnet build --configuration Release
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: windows-latest
runs-on: ubuntu-latest

strategy:
fail-fast: false
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/create-release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
create-release:
runs-on: windows-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Save tag version
Expand All @@ -18,7 +18,9 @@ jobs:
with:
dotnet-version: '8.0.x'
- name: Install dependencies
run: dotnet restore
run: |
dotnet workload restore
dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Create release branch
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
publish:
runs-on: windows-latest
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
Expand All @@ -17,7 +17,9 @@ jobs:
with:
dotnet-version: '8.0.x'
- name: Install dependencies
run: dotnet restore
run: |
dotnet workload restore
dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Publish the package
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/sync-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Documentation

on:
push:
branches:
- master
paths:
- "docs/**"
workflow_dispatch:

jobs:
job-sync-docs-to-wiki:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Sync docs to wiki
uses: newrelic/wiki-sync-action@main
with:
source: docs
destination: wiki
token: ${{ secrets.DOCS_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -348,3 +348,4 @@ MigrationBackup/

# Ionide (cross platform F# VS Code tools) working folder
.ionide/
.idea
75 changes: 73 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,86 @@
#### **In development**

> - Breaking Changes:
> - Features:
> - Bugfixes:
#### **Version 6.5.0**

> - Features:
> - Added SelectedConnection, SelectedConnections, CanSelectMultipleConnections and CanSelectMultipleItems dependency properties to NodifyEditor
> - Added IsSelected and IsSelectable attached dependency properties to BaseConnection
> - Added PrioritizeBaseConnectionForSelection static field to BaseConnection
> - Added EditorGestures.Connection.Selection
> - Added support for ScrollViewer in NodifyEditor (implements IScrollInfo)
> - Added NodifyEditor.ScrollIncrement dependency property
#### **Version 6.4.0**

> - Features:
> - Added OutlineBrush and OutlineThickness dependency properties to BaseConnection to support increasing the selection area without increasing the stroke thickness
> - Added IsAnimatingDirectionalArrows and DirectionalArrowsAnimationDuration dependency properties to BaseConnection to support controlling the animation from XAML
#### **Version 6.3.0**

> - Features:
> - Added a CuttingLine control that removes intersecting connections
> - Added CuttingLineStyle, CuttingStartedCommand, CuttingCompletedCommand, IsCutting, EnableCuttingLinePreview and CuttingConnectionTypes to NodifyEditor
> - Added EditorGestures.Editor.Cutting and EditorGestures.Editor.CancelAction
> - Bugfixes:
> - Fixed connection styles not inheriting from the BaseConnection style
#### **Version 6.2.0**

> - Features:
> - Added a Minimap control and EditorGestures.Minimap
> - Added ContentContainerStyle, HeaderContainerStyle and FooterContainerStyle dependency properties to Node
> - Added BringIntoView that takes a Rect parameter to NodifyEditor
> - Added the NodifyEditor's DataContext as the parameter of the ItemsSelectStartedCommand, ItemsSelectCompletedCommand, ItemsDragStartedCommand and ItemsDragCompletedCommand commands
> - Bugfixes:
> - Fixed hover effect and padding of NodeInput and NodeOutput for vertical orientation
> - Fixed ItemContainers being selected sometimes when double clicking the canvas
#### **Version 6.1.0**

> - Features:
> - Added new built-in connection type: StepConnection
> - Bugfixes:
> - Fixed CircuitConnection directional arrows not interpolating correctly
> - Fixed BaseConnection SplitEvent and DisconnectEvent not being raised if the corresponding command is null
> - Fixed DecoratorContainer scaling with zoom when not referencing a theme in App.xaml
> - Fixed style not applying to the default Connection template outside App.xaml
#### **Version 6.0.0**

> - Breaking Changes:
> - Added a parameter for the orientation to DrawArrowGeometry, DrawDefaultArrowhead, DrawRectangleArrowhead and DrawEllipseArrowhead in BaseConnection
> - Added source and target parameters to GetTextPosition in BaseConnection
> - EditorGestures is now a singleton instead of a static class (can be inherited to create custom mappings)
> - Selection gestures for ItemContainer and GroupingNode are now separated from the NodifyEditor selection gestures
> - Renamed EditorGestures.Editor.Zoom to ZoomModifierKey
> - Features:
> - Added SourceOrientation and TargetOrientation to BaseConnection to support vertical connectors (vertical/mixed connection orientation)
> - Added DirectionalArrowsCount to BaseConnection to allow drawing multipe arrows on a connection flowing in the connection direction
> - Added DrawDirectionalArrowsGeometry and DrawDirectionalArrowheadGeometry to BaseConnection to allow customizing the directional arrows
> - Improved EditorGestures to allow changing input gestures at runtime
> - Added new gesture types: AnyGesture, AllGestures, and InputGestureRef
> - Added Orientation dependency property to NodeInput and NodeOutput
> - Added DirectionalArrowsOffset dependency property to BaseConnection
> - Added StartAnimation and StopAnimation methods to BaseConnection
> - Bugfixes:
> - Fixed BaseConnection.Text not always displaying in the center of the connection
> - Fixed a bug where the item container would incorrectly transition to the dragging state on mouse over
#### **Version 5.2.0**

> - Features:
> - Added Text to BaseConnection, allowing displaying of text on connections
> - Added Foreground, FontSize, FontWeight, FontStyle, FontStretch and FontFamily to BaseConnection, allowing styling the displaying text
> - Bugfixes:
> - Fixed MouseCapture not being released when EnableStickyConnections is enabled and the PendingConnection is canceled by a key gesture
#### **Version 5.1.0**

> - Breaking Changes:
> - Features:
> - Added ItemContainer.SelectedBorderThickness dependency property
> - Added NodifyEditor.GetLocationInsideEditor
Expand Down Expand Up @@ -48,7 +120,6 @@
> - Added BaseConnection.ArrowShape dependency property to allow configurable arrowhead shape
> - Added NodifyEditor.EnableDraggingContainersOptimizations to allow receiving ItemContainer.Location updates in realtime
> - Added ConnectionOffsetMode.Static to allow offsetting the source and target points of the connection on the X and the Y axis without revolving around the source or target points
> - Bugfixes:
#### **Version 4.1.0**

Expand Down
20 changes: 14 additions & 6 deletions Examples/Nodify.Calculator/App.xaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
<Application x:Class="Nodify.Calculator.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
x:Class="Nodify.Calculator.App"
RequestedThemeVariant="Dark">
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->

<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Nodify;component/Themes/Dark.xaml" />
<ResourceDictionary Source="pack://application:,,,/Nodify.Shared;component/Themes/Icons.xaml" />
<ResourceDictionary Source="pack://application:,,,/Nodify.Shared;component/Themes/Dark.xaml" />
<ResourceInclude Source="avares://Nodify.Shared/Themes/Icons.xaml" />
<ResourceInclude Source="avares://Nodify.Shared/Themes/Generic.xaml" />
<ResourceInclude Source="avares://Nodify.Shared/Themes/Dark.xaml" />
<ResourceInclude Source="avares://Nodify/Themes/Generic.xaml" />
<ResourceInclude Source="avares://Nodify/Themes/Dark.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>

<Application.Styles>
<FluentTheme DensityStyle="Compact"/>
</Application.Styles>
</Application>
14 changes: 14 additions & 0 deletions Examples/Nodify.Calculator/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,19 @@ namespace Nodify.Calculator
/// </summary>
public partial class App : Application
{
public override void Initialize()
{
AvaloniaXamlLoader.Load(this);
}

public override void OnFrameworkInitializationCompleted()
{
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
{
desktop.MainWindow = new MainWindow();
}

base.OnFrameworkInitializationCompleted();
}
}
}
2 changes: 1 addition & 1 deletion Examples/Nodify.Calculator/CalculatorViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ private void GroupSelectedOperations()
Operations.Add(new OperationGroupViewModel
{
Title = "Operations",
Location = bounding.Location,
Location = bounding.Position,
GroupSize = new Size(bounding.Width, bounding.Height)
});
}
Expand Down
Loading

0 comments on commit b4d7db0

Please sign in to comment.