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

changes #160

Merged
merged 56 commits into from
May 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
be31d92
create PR
Luthetus Apr 28, 2024
dac68ed
Add personal paths for Linux
Luthetus Apr 28, 2024
9eb697c
Working on linux
Luthetus Apr 28, 2024
ac5324a
Debugging Linux-Ubuntu (2024-04-28)
Luthetus Apr 28, 2024
96db306
Delete dead code
Luthetus Apr 28, 2024
06e4e7c
Paste from clipboard on Linux-Ubuntu
Luthetus Apr 28, 2024
c221624
TODO: Unhandled exception
Luthetus Apr 28, 2024
84832d7
Fix: local storage
Luthetus Apr 28, 2024
d4a8d2f
Add check if not windows
Luthetus Apr 28, 2024
3a74a3a
ran a test saw output. extremely tired so abruptly committing this be…
huntercfreeman Apr 29, 2024
6d44538
Fix: luth_te_readonly-text-editor height
huntercfreeman Apr 29, 2024
4fd7241
TextEditorRenderBatchValidated
huntercfreeman Apr 29, 2024
2ce8ea8
"The cascading parameter could change out from under a child component"
huntercfreeman Apr 29, 2024
a2d6d2b
Clear test result when re-running it.
huntercfreeman Apr 29, 2024
473d53b
Better insert over selection, off by 1 still?
huntercfreeman Apr 29, 2024
2e28ecd
Format: TextEditorModelModifierTests.Delete.cs
huntercfreeman Apr 29, 2024
2cd2ab8
NotFixed: Too many characters get deleted if one selects /r/n character
huntercfreeman Apr 29, 2024
3299438
Rename: DocumentLength to CharCount
huntercfreeman May 1, 2024
f9b966e
"SetIsDirtyTrue();" needs to be at the end of methods (not the start)
huntercfreeman May 1, 2024
a36e960
Fix: delete selection which contains multi-byte characters
huntercfreeman May 1, 2024
5ae8cab
Format: TextEditorModelModifierTests.Insert.cs
huntercfreeman May 1, 2024
c1bebd3
Tests: PanelsStateReducerTests
huntercfreeman May 1, 2024
6859e18
Rename: PanelsState to PanelState
huntercfreeman May 1, 2024
1f43274
Tests: OptionsApiTests
huntercfreeman May 1, 2024
0568f54
Tests: TextEditorOptionsStateReducerTests
huntercfreeman May 1, 2024
caa472e
Tests: TextEditorModelApiTests
huntercfreeman May 1, 2024
aa1468d
TreeView constructor test progress
huntercfreeman May 1, 2024
55f3532
Add: GitDisplay.razor
huntercfreeman May 2, 2024
5913416
Add: TerminalCommand.ParseFunc
huntercfreeman May 2, 2024
530fe74
GitCli parser progress
huntercfreeman May 2, 2024
82e1570
Update GitCliOutputParser.cs
huntercfreeman May 2, 2024
052ee9b
Parse untracked git files
huntercfreeman May 2, 2024
a178956
TreeView from git cli
huntercfreeman May 2, 2024
a5c93e7
Add: SelectedGitFileList
huntercfreeman May 2, 2024
a492b6b
Git progress
huntercfreeman May 2, 2024
e2ea825
Git add
huntercfreeman May 2, 2024
2f9fa8e
Add: MoveCursorToEnd() to Terminal.cs
huntercfreeman May 2, 2024
3be4806
Fix: double working directory writeouts
huntercfreeman May 2, 2024
6f4fe5d
Fix windows backslash in git cli
huntercfreeman May 2, 2024
949572e
Add: HACK_PersonalSettings()
huntercfreeman May 3, 2024
ae07f99
Use "git status -u" so directories are expanded into their files
huntercfreeman May 3, 2024
99de8cb
Parse CLI in a blocking manner
huntercfreeman May 3, 2024
3b8683e
Add: OnOutput.cs
huntercfreeman May 3, 2024
104f72c
Fix: OnOutputBatch.cs syntax highlighting
huntercfreeman May 3, 2024
e8c8b77
Git commit
huntercfreeman May 3, 2024
41c4189
Add: GetOriginOnClick()
huntercfreeman May 3, 2024
ef7d77c
Add: ParseOriginLine(string output)
huntercfreeman May 3, 2024
6d36349
Fix: text editor scrolling with mouse wheel
huntercfreeman May 3, 2024
3f1ff51
Change: _throttleShouldRevealCursor to 333ms
huntercfreeman May 4, 2024
f5ebfcb
Add: GitRepo.cs
huntercfreeman May 4, 2024
d3ae1c8
Should look at the .git folder instead of parsing terminal
huntercfreeman May 5, 2024
89b7c0a
Updating C# projects
huntercfreeman May 5, 2024
0b05f98
Refactor: remove unnecessary usings in solution
huntercfreeman May 5, 2024
cca4b53
Fix build errors
huntercfreeman May 5, 2024
075aee8
Update versions
huntercfreeman May 5, 2024
4bb99b0
No time to update the nuget packages today
huntercfreeman May 5, 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
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"dotnet-test-explorer.testProjectPath": "/home/hunter/Repos/Luthetus.Ide_Fork/Source/Tests/Ide/Luthetus.Ide.Tests.csproj"
}
7 changes: 0 additions & 7 deletions Luthetus.Ide.sln
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Luthetus.CompilerServices.L
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Luthetus.CompilerServices.Lang.Razor", "Source\Lib\CompilerServices\Razor\Luthetus.CompilerServices.Lang.Razor.csproj", "{943CF0EB-80DF-4D2F-BF23-0EF6A5B2DA49}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Luthetus.CompilerServices.Lang.Terminal", "Source\Lib\CompilerServices\Terminal\Luthetus.CompilerServices.Lang.Terminal.csproj", "{76F4AB6D-5249-4D0A-AAF8-D656E792AA34}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Luthetus.CompilerServices.Lang.TypeScript", "Source\Lib\CompilerServices\TypeScript\Luthetus.CompilerServices.Lang.TypeScript.csproj", "{FA133D31-0DCC-4737-A76F-8AF6D8755EDE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Luthetus.CompilerServices.Lang.Xml", "Source\Lib\CompilerServices\Xml\Luthetus.CompilerServices.Lang.Xml.csproj", "{83C1B854-C3AD-4C1E-B2BC-799642039C3D}"
Expand Down Expand Up @@ -145,10 +143,6 @@ Global
{943CF0EB-80DF-4D2F-BF23-0EF6A5B2DA49}.Debug|Any CPU.Build.0 = Debug|Any CPU
{943CF0EB-80DF-4D2F-BF23-0EF6A5B2DA49}.Release|Any CPU.ActiveCfg = Release|Any CPU
{943CF0EB-80DF-4D2F-BF23-0EF6A5B2DA49}.Release|Any CPU.Build.0 = Release|Any CPU
{76F4AB6D-5249-4D0A-AAF8-D656E792AA34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{76F4AB6D-5249-4D0A-AAF8-D656E792AA34}.Debug|Any CPU.Build.0 = Debug|Any CPU
{76F4AB6D-5249-4D0A-AAF8-D656E792AA34}.Release|Any CPU.ActiveCfg = Release|Any CPU
{76F4AB6D-5249-4D0A-AAF8-D656E792AA34}.Release|Any CPU.Build.0 = Release|Any CPU
{FA133D31-0DCC-4737-A76F-8AF6D8755EDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FA133D31-0DCC-4737-A76F-8AF6D8755EDE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FA133D31-0DCC-4737-A76F-8AF6D8755EDE}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -257,7 +251,6 @@ Global
{F297E0E8-3582-41BE-AB48-14D89413B7E0} = {195D2EF7-3938-4BF8-B483-170AD8FF5B84}
{7348E3F2-3749-4D5F-AEA5-21C7D19FCC49} = {195D2EF7-3938-4BF8-B483-170AD8FF5B84}
{943CF0EB-80DF-4D2F-BF23-0EF6A5B2DA49} = {195D2EF7-3938-4BF8-B483-170AD8FF5B84}
{76F4AB6D-5249-4D0A-AAF8-D656E792AA34} = {195D2EF7-3938-4BF8-B483-170AD8FF5B84}
{FA133D31-0DCC-4737-A76F-8AF6D8755EDE} = {195D2EF7-3938-4BF8-B483-170AD8FF5B84}
{83C1B854-C3AD-4C1E-B2BC-799642039C3D} = {195D2EF7-3938-4BF8-B483-170AD8FF5B84}
{4BC736B4-4A2D-43C7-AD2D-7B24F5E35518} = {ACC32A2F-DF9C-4B91-80AE-F0585CDD59EC}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using Fluxor;
using Microsoft.JSInterop;
using System.Collections.Immutable;
using Luthetus.Common.RazorLib.JavaScriptObjects.Models;
using Luthetus.Common.RazorLib.Contexts.States;
using Luthetus.Common.RazorLib.Contexts.Models;
using Luthetus.Common.RazorLib.Keys.Models;
Expand Down
8 changes: 8 additions & 0 deletions Source/Lib/Common/FileSystems/Models/AncestorDirectory.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
namespace Luthetus.Common.RazorLib.FileSystems.Models;

/// <summary>
/// This class exists alongside the <see cref="IAbsolutePath"/> type.
/// This is intentional, as if one treats an ancestor directory as an <see cref="IAbsolutePath"/>,
/// then far more "metadata" gets created.<br/><br/>
///
/// This class allows for tracking of ancestor directories efficiently,
/// and if there is one of interest, then choose to create an <see cref="IAbsolutePath"/> from it.
/// </summary>
public class AncestorDirectory
{
public AncestorDirectory(
Expand Down
17 changes: 17 additions & 0 deletions Source/Lib/Common/FileSystems/Models/IAbsolutePath.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,21 @@ public interface IAbsolutePath : IPath
{
public IFileSystemDrive? RootDrive { get; }
public bool IsRootDirectory { get; }

/// <summary>
/// One might prefer <see cref="IEnvironmentProvider.AbsolutePathFactory(string, bool)"/> instead
/// of this method.<br/><br/>
///
/// This version adds an extra function invocation for no reason. To use
/// <see cref="IEnvironmentProvider.AbsolutePathFactory(string, bool)"/> may be a negligible
/// optimization however.<br/><br/>
///
/// Keep this method here, it provides more clear documentation on how to create an instance
/// of <see cref="IAbsolutePath"/>. Having to invoke a method on the <see cref="IEnvironmentProvider"/>
/// is a bit hard to find.
/// </summary>
public static IAbsolutePath Factory(string path, bool isDirectory, IEnvironmentProvider environmentProvider)
{
return environmentProvider.AbsolutePathFactory(path, isDirectory);
}
}
17 changes: 17 additions & 0 deletions Source/Lib/Common/FileSystems/Models/IRelativePath.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,21 @@ public interface IRelativePath : IPath
/// Given "../../../Homework/math.txt". The count is 3.
/// </summary>
public int UpDirDirectiveCount { get; }

/// <summary>
/// One might prefer <see cref="IEnvironmentProvider.RelativePathFactory(string, bool)"/> instead
/// of this method.<br/><br/>
///
/// This version adds an extra function invocation for no reason. To use
/// <see cref="IEnvironmentProvider.RelativePathFactory(string, bool)"/> may be a negligible
/// optimization however.<br/><br/>
///
/// Keep this method here, it provides more clear documentation on how to create an instance
/// of <see cref="IRelativePath"/>. Having to invoke a method on the <see cref="IEnvironmentProvider"/>
/// is a bit hard to find.
/// </summary>
public static IRelativePath Factory(string path, bool isDirectory, IEnvironmentProvider environmentProvider)
{
return environmentProvider.RelativePathFactory(path, isDirectory);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ public ValueTask LocalStorageSetItem(string key, object? value)
value);
}

public ValueTask<object?> LocalStorageGetItem(string key)
public ValueTask<string?> LocalStorageGetItem(string key)
{
return _jsRuntime.InvokeAsync<object?>(
return _jsRuntime.InvokeAsync<string?>(
"luthetusCommon.localStorageGetItem",
key);
}
Expand Down
22 changes: 13 additions & 9 deletions Source/Lib/Common/Luthetus.Common.RazorLib.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
Expand All @@ -7,7 +7,7 @@
<Product>Luthetus Common</Product>
<Description>A repository containing Blazor Components I've made which I commonly use in other projects.</Description>
<PackageId>Luthetus.Common</PackageId>
<Version>1.5.0</Version>
<Version>2.0.0</Version>
<Authors>Hunter Freeman</Authors>
<Company />
<PackageTags>DotNet CSharp Blazor RazorComponents</PackageTags>
Expand All @@ -17,13 +17,17 @@
<SupportedPlatform Include="browser" />
</ItemGroup>

<ItemGroup>
<PackageReference Condition="'$(TargetFramework)' == 'net7.0'" Include="Microsoft.AspNetCore.Components.Web" Version="7.0.0" />
<PackageReference Condition="'$(TargetFramework)' == 'net6.0'" Include="Microsoft.AspNetCore.Components.Web" Version="6.0.0" />
<PackageReference Condition="'$(TargetFramework)' == 'net5.0'" Include="Microsoft.AspNetCore.Components.Web" Version="5.0.0" />
<PackageReference Condition="'$(TargetFramework)' != 'net7.0' AND '$(TargetFramework)' != 'net6.0' AND '$(TargetFramework)' != 'net5.0'" Include="Microsoft.AspNetCore.Components.Web" Version="3.1.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.0" Condition="'$(TargetFramework)' == 'net8.0'" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.0" Condition="'$(TargetFramework)' == 'net7.0'" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.0" Condition="'$(TargetFramework)' == 'net6.0'" />

<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" Condition="'$(TargetFramework)' == 'net8.0'" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" Condition="'$(TargetFramework)' == 'net7.0'" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" Condition="'$(TargetFramework)' == 'net6.0'" />

<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\External\Fluxor_fork\Source\Lib\Fluxor.Blazor.Web\Fluxor.Blazor.Web.csproj" />
Expand Down
6 changes: 3 additions & 3 deletions Source/Lib/Common/Panels/Displays/PanelGroupDisplay.razor
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
@inherits Fluxor.Blazor.Web.Components.FluxorComponent

@{
var panelsState = PanelsStateWrap.Value;
var panelState = PanelStateWrap.Value;

var panelGroup = panelsState.PanelGroupList.FirstOrDefault(x => x.Key == PanelGroupKey);
var panelGroup = panelState.PanelGroupList.FirstOrDefault(x => x.Key == PanelGroupKey);

IPanelTab? activePanelTab = null;

Expand Down Expand Up @@ -48,7 +48,7 @@
}
</div>

@if (PanelsStateWrap.Value.DragEventArgs is not null)
@if (PanelStateWrap.Value.DragEventArgs is not null)
{
<div class="luth_ide_panel-tab-dropzone luth_ide_panel-tab-dropzone-top"
@onmouseup:stopPropagation="true"
Expand Down
30 changes: 15 additions & 15 deletions Source/Lib/Common/Panels/Displays/PanelGroupDisplay.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Luthetus.Common.RazorLib.Panels.Displays;
public partial class PanelGroupDisplay : FluxorComponent
{
[Inject]
private IState<PanelsState> PanelsStateWrap { get; set; } = null!;
private IState<PanelState> PanelStateWrap { get; set; } = null!;
[Inject]
private IDispatcher Dispatcher { get; set; } = null!;
[Inject]
Expand Down Expand Up @@ -84,9 +84,9 @@ private string GetPanelPositionCssClass()

private async Task PassAlongSizeIfHiddenAsync()
{
var panelsState = PanelsStateWrap.Value;
var panelState = PanelStateWrap.Value;

var panelGroup = panelsState.PanelGroupList.FirstOrDefault(x => x.Key == PanelGroupKey);
var panelGroup = panelState.PanelGroupList.FirstOrDefault(x => x.Key == PanelGroupKey);

if (panelGroup is not null)
{
Expand Down Expand Up @@ -141,27 +141,27 @@ private string GetElementDimensionsStyleString(PanelGroup? panelGroup, IPanelTab

private Task TopDropzoneOnMouseUp(MouseEventArgs mouseEventArgs)
{
var panelsState = PanelsStateWrap.Value;
var panelState = PanelStateWrap.Value;

var panelGroup = panelsState.PanelGroupList.FirstOrDefault(x => x.Key == PanelGroupKey);
var panelGroup = panelState.PanelGroupList.FirstOrDefault(x => x.Key == PanelGroupKey);

if (panelGroup is null)
return Task.CompletedTask;

var panelDragEventArgs = panelsState.DragEventArgs;
var panelDragEventArgs = panelState.DragEventArgs;

if (panelDragEventArgs is not null)
{
Dispatcher.Dispatch(new PanelsState.DisposePanelTabAction(
Dispatcher.Dispatch(new PanelState.DisposePanelTabAction(
panelDragEventArgs.Value.PanelGroup.Key,
panelDragEventArgs.Value.PanelTab.Key));

Dispatcher.Dispatch(new PanelsState.RegisterPanelTabAction(
Dispatcher.Dispatch(new PanelState.RegisterPanelTabAction(
panelGroup.Key,
panelDragEventArgs.Value.PanelTab,
true));

Dispatcher.Dispatch(new PanelsState.SetDragEventArgsAction(null));
Dispatcher.Dispatch(new PanelState.SetDragEventArgsAction(null));

Dispatcher.Dispatch(new DragState.WithAction(inState => inState with
{
Expand All @@ -175,27 +175,27 @@ private Task TopDropzoneOnMouseUp(MouseEventArgs mouseEventArgs)

private Task BottomDropzoneOnMouseUp(MouseEventArgs mouseEventArgs)
{
var panelsState = PanelsStateWrap.Value;
var panelState = PanelStateWrap.Value;

var panelGroup = panelsState.PanelGroupList.FirstOrDefault(x => x.Key == PanelGroupKey);
var panelGroup = panelState.PanelGroupList.FirstOrDefault(x => x.Key == PanelGroupKey);

if (panelGroup is null)
return Task.CompletedTask;

var panelDragEventArgs = panelsState.DragEventArgs;
var panelDragEventArgs = panelState.DragEventArgs;

if (panelDragEventArgs is not null)
{
Dispatcher.Dispatch(new PanelsState.DisposePanelTabAction(
Dispatcher.Dispatch(new PanelState.DisposePanelTabAction(
panelDragEventArgs.Value.PanelGroup.Key,
panelDragEventArgs.Value.PanelTab.Key));

Dispatcher.Dispatch(new PanelsState.RegisterPanelTabAction(
Dispatcher.Dispatch(new PanelState.RegisterPanelTabAction(
panelGroup.Key,
panelDragEventArgs.Value.PanelTab,
false));

Dispatcher.Dispatch(new PanelsState.SetDragEventArgsAction(null));
Dispatcher.Dispatch(new PanelState.SetDragEventArgsAction(null));

Dispatcher.Dispatch(new DragState.WithAction(inState => inState with
{
Expand Down
6 changes: 3 additions & 3 deletions Source/Lib/Common/Panels/Models/Panel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public Task OnDragEndAsync(MouseEventArgs mouseEventArgs, IDropzone? dropzone)
{
if (panelGroup is not null)
{
Dispatcher.Dispatch(new PanelsState.DisposePanelTabAction(
Dispatcher.Dispatch(new PanelState.DisposePanelTabAction(
panelGroup.Key,
Key));
}
Expand All @@ -223,7 +223,7 @@ public Task OnDragEndAsync(MouseEventArgs mouseEventArgs, IDropzone? dropzone)
{
if (panelGroup is not null)
{
Dispatcher.Dispatch(new PanelsState.DisposePanelTabAction(
Dispatcher.Dispatch(new PanelState.DisposePanelTabAction(
panelGroup.Key,
Key));
}
Expand All @@ -242,7 +242,7 @@ public Task OnDragEndAsync(MouseEventArgs mouseEventArgs, IDropzone? dropzone)
? true
: false;

Dispatcher.Dispatch(new PanelsState.RegisterPanelTabAction(
Dispatcher.Dispatch(new PanelState.RegisterPanelTabAction(
panelGroupDropzone.PanelGroupKey,
this,
insertAtIndexZero));
Expand Down
12 changes: 6 additions & 6 deletions Source/Lib/Common/Panels/Models/PanelFacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ public static class PanelFacts
public static readonly Key<PanelGroup> RightPanelGroupKey = Key<PanelGroup>.NewKey();
public static readonly Key<PanelGroup> BottomPanelGroupKey = Key<PanelGroup>.NewKey();

public static PanelGroup GetTopLeftPanelGroup(PanelsState panelsState)
public static PanelGroup GetTopLeftPanelGroup(PanelState panelState)
{
return panelsState.PanelGroupList.First(x => x.Key == LeftPanelGroupKey);
return panelState.PanelGroupList.First(x => x.Key == LeftPanelGroupKey);
}

public static PanelGroup GetTopRightPanelGroup(PanelsState panelsState)
public static PanelGroup GetTopRightPanelGroup(PanelState panelState)
{
return panelsState.PanelGroupList.First(x => x.Key == RightPanelGroupKey);
return panelState.PanelGroupList.First(x => x.Key == RightPanelGroupKey);
}

public static PanelGroup GetBottomPanelGroup(PanelsState panelsState)
public static PanelGroup GetBottomPanelGroup(PanelState panelState)
{
return panelsState.PanelGroupList.First(x => x.Key == BottomPanelGroupKey);
return panelState.PanelGroupList.First(x => x.Key == BottomPanelGroupKey);
}
}
6 changes: 3 additions & 3 deletions Source/Lib/Common/Panels/Models/PanelGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ public Task OnClickAsync(ITab tab, MouseEventArgs mouseEventArgs)
return Task.CompletedTask;

if (GetIsActive(tab))
Dispatcher.Dispatch(new PanelsState.SetActivePanelTabAction(Key, Key<Panel>.Empty));
Dispatcher.Dispatch(new PanelState.SetActivePanelTabAction(Key, Key<Panel>.Empty));
else
Dispatcher.Dispatch(new PanelsState.SetActivePanelTabAction(Key, panelTab.Key));
Dispatcher.Dispatch(new PanelState.SetActivePanelTabAction(Key, panelTab.Key));

return Task.CompletedTask;
}
Expand All @@ -52,7 +52,7 @@ public Task CloseAsync(ITab tab)
if (tab is not IPanelTab panelTab)
return Task.CompletedTask;

Dispatcher.Dispatch(new PanelsState.DisposePanelTabAction(Key, panelTab.Key));
Dispatcher.Dispatch(new PanelState.DisposePanelTabAction(Key, panelTab.Key));
return Task.CompletedTask;
}

Expand Down
2 changes: 1 addition & 1 deletion Source/Lib/Common/Panels/States/PanelsState.Actions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Luthetus.Common.RazorLib.Panels.States;

public partial record PanelsState
public partial record PanelState
{
public record RegisterPanelAction(Panel Panel);
public record DisposePanelAction(Key<Panel> PanelKey);
Expand Down
4 changes: 2 additions & 2 deletions Source/Lib/Common/Panels/States/PanelsState.Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ namespace Luthetus.Common.RazorLib.Panels.States;
/// TODO: SphagettiCode - The resizing and hiding/showing is a bit scuffed. (2023-09-19)
/// </summary>
[FeatureState]
public partial record PanelsState(
public partial record PanelState(
ImmutableArray<PanelGroup> PanelGroupList,
ImmutableArray<Panel> PanelList)
{
public PanelsState() : this(ImmutableArray<PanelGroup>.Empty, ImmutableArray<Panel>.Empty)
public PanelState() : this(ImmutableArray<PanelGroup>.Empty, ImmutableArray<Panel>.Empty)
{
var topLeftGroup = ConstructTopLeftGroup();
var topRightGroup = ConstructTopRightGroup();
Expand Down
Loading
Loading