Skip to content

Commit

Permalink
Untyped dictionary serializer and experimental viewer based on it
Browse files Browse the repository at this point in the history
  • Loading branch information
aloneguid authored Jan 5, 2024
1 parent fbd4a53 commit 50ccd64
Show file tree
Hide file tree
Showing 79 changed files with 1,654 additions and 122 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: 'Build'
env:
VERSION: 4.18.1
ASM_VERSION: 4.0.0
DOC_INSTANCE: wrs/pq
DOC_ARTIFACT: webHelp-all.zip
DOC_DOCKER_VERSION: 232.10275

# Gives the workflow permissions to clone the repo and create a page deployment
permissions:
Expand Down Expand Up @@ -82,19 +84,21 @@ jobs:
name: bin
path: artifacts/*

writerside-build:
wrs-build:
runs-on: ubuntu-latest
name: 'Build Docs'
env:
PRODUCT: Writerside/pq
name: 'Build Writerside Docs'
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Build Writerside docs using Docker
uses: JetBrains/writerside-github-action@v3
- name: Build Writerside docs
uses: JetBrains/writerside-github-action@v4
with:
instance: ${{ env.DOC_INSTANCE }}
artifact: ${{ env.DOC_INSTANCE }}
docker-version: ${{ env.DOC_DOCKER_VERSION }}
- name: Upload documentation
uses: actions/upload-artifact@v3
with:
name: docs
path: artifacts/*.zip
retention-days: 7
retention-days: 7
18 changes: 18 additions & 0 deletions src/Parquet.Floor.Desktop/Parquet.Floor.Desktop.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<ApplicationManifest>app.manifest</ApplicationManifest>
<AssemblyName>floor</AssemblyName>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Avalonia.Desktop" Version="11.0.6" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Parquet.Floor\Parquet.Floor.csproj" />
</ItemGroup>
</Project>
9 changes: 9 additions & 0 deletions src/Parquet.Floor.Desktop/Parquet.Floor.Desktop.csproj.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebuggerFlavor>ProjectDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup>
<ActiveDebugProfile>customer</ActiveDebugProfile>
</PropertyGroup>
</Project>
23 changes: 23 additions & 0 deletions src/Parquet.Floor.Desktop/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;
using Avalonia;

namespace Parquet.Floor.Desktop;

class Program {
// Initialization code. Don't use any Avalonia, third-party APIs or any
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
// yet and stuff might break.
[STAThread]
public static void Main(string[] args) => BuildAvaloniaApp()
.StartWithClassicDesktopLifetime(args);

// Avalonia configuration, don't remove; also used by visual designer.
public static AppBuilder BuildAvaloniaApp() {

return AppBuilder.Configure<App>()
.UsePlatformDetect()
.WithInterFont()
.LogToTrace();
}

}
16 changes: 16 additions & 0 deletions src/Parquet.Floor.Desktop/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"profiles": {
"WSL": {
"commandName": "WSL2",
"distributionName": ""
},
"all_var": {
"commandName": "Project",
"commandLineArgs": "C:\\dev\\parquet-dotnet\\src\\Parquet.Test\\data\\all_var1.parquet"
},
"customer": {
"commandName": "Project",
"commandLineArgs": "C:\\dev\\parquet-dotnet\\src\\Parquet.Test\\data\\customer.impala.parquet"
}
}
}
18 changes: 18 additions & 0 deletions src/Parquet.Floor.Desktop/app.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<!-- This manifest is used on Windows only.
Don't remove it as it might cause problems with window transparency and embeded controls.
For more details visit https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests -->
<assemblyIdentity version="1.0.0.0" name="AvaloniaTest.Desktop"/>

<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of the Windows versions that this application has been tested on
and is designed to work with. Uncomment the appropriate elements
and Windows will automatically select the most compatible environment. -->

<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
</application>
</compatibility>
</assembly>
14 changes: 14 additions & 0 deletions src/Parquet.Floor/App.axaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="Parquet.Floor.App"
RequestedThemeVariant="Default">
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->

<Application.Styles>
<FluentTheme DensityStyle="Compact" />
<StyleInclude Source="/Styles.axaml"/>
<StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Fluent.xaml"/>
<StyleInclude
Source="avares://Avalonia.Controls.TreeDataGrid/Themes/Fluent.axaml"/>
</Application.Styles>
</Application>
33 changes: 33 additions & 0 deletions src/Parquet.Floor/App.axaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Data.Core.Plugins;
using Avalonia.Markup.Xaml;

using Parquet.Floor.ViewModels;
using Parquet.Floor.Views;

namespace Parquet.Floor;

public partial class App : Application {
public override void Initialize() {
AvaloniaXamlLoader.Load(this);
}

public override void OnFrameworkInitializationCompleted() {
// Line below is needed to remove Avalonia data validation.
// Without this line you will get duplicate validations from both Avalonia and CT
BindingPlugins.DataValidators.RemoveAt(0);

if(ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) {
desktop.MainWindow = new MainWindow {
DataContext = new MainViewModel()
};
} else if(ApplicationLifetime is ISingleViewApplicationLifetime singleViewPlatform) {
singleViewPlatform.MainView = new MainView {
DataContext = new MainViewModel()
};
}

base.OnFrameworkInitializationCompleted();
}
}
Binary file added src/Parquet.Floor/Assets/icon.ico
Binary file not shown.
Binary file added src/Parquet.Floor/Assets/icons/bat_dead.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Parquet.Floor/Assets/icons/map.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Parquet.Floor/Assets/icons/open.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Parquet.Floor/Assets/icons/trophy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions src/Parquet.Floor/Parquet.Floor.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
</PropertyGroup>


<ItemGroup>
<AvaloniaResource Include="Assets\**" />
</ItemGroup>


<ItemGroup>
<None Remove="Assets\icon.ico" />
<None Remove="Assets\icons\bat_dead.png" />
<None Remove="Assets\icons\map.png" />
<None Remove="Assets\icons\trophy.png" />
</ItemGroup>


<ItemGroup>
<Compile Include="..\NetBox.cs" Link="NetBox.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.6" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.0.6" />
<PackageReference Include="Avalonia.Controls.TreeDataGrid" Version="11.0.2" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.6" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.0.6" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />

<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.6" />

</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Parquet\Parquet.csproj" />
</ItemGroup>

<ItemGroup>
<Compile Update="Views\DataView.axaml.cs">
<DependentUpon>DataView.axaml</DependentUpon>
</Compile>
</ItemGroup>
</Project>
139 changes: 139 additions & 0 deletions src/Parquet.Floor/Styles.axaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
<Styles xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System">
<Design.PreviewWith>

<StackPanel>

<StackPanel Classes="toolbar">
<Button>
<Image Source="/Assets/icons/open.png"/>
</Button>
<Button>
<Image Source="/Assets/icons/map.png"/>
</Button>
</StackPanel>


<TextBlock Classes="data-cell">
hello!
</TextBlock>

<TextBlock Classes="data-cell data-cell-null">
null
</TextBlock>

<TextBlock Classes="data-cell data-cell-key">
key
</TextBlock>


<Expander Header="fatty">

</Expander>

<Grid Classes="error">
<StackPanel>
<Image Source="/Assets/icons/bat_dead.png"/>
<TextBlock Text="design time error message" />
</StackPanel>
</Grid>

<TextBlock Classes="hyperlink" Text="more..."/>

<StackPanel Orientation="Horizontal" Classes="status-bar">
<TextBlock Text="12121" Classes="data"/>
<TextBlock Text="|" Classes="sep"/>
<TextBlock Text="7" Classes="data"/>
</StackPanel>

</StackPanel>

</Design.PreviewWith>

<!-- status bar -->

<Style Selector="StackPanel.status-bar">
<Setter Property="Margin" Value="3"/>
</Style>

<Style Selector="StackPanel.status-bar TextBlock.data">
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="FontSize" Value="15"/>
</Style>

<Style Selector="StackPanel.status-bar TextBlock.sep">
<Setter Property="FontSize" Value="10"/>
<Setter Property="Opacity" Value="0.8"/>
<Setter Property="Padding" Value="9,4,9,0"/>
</Style>


<!-- general -->

<Style Selector="FlyoutPresenter.wider">
<Setter Property="MaxWidth" Value="850"/>
</Style>

<Style Selector="TextBlock.hyperlink">
<Setter Property="Foreground" Value="Blue"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="FontStyle" Value="Italic"/>
</Style>

<!-- Toolbar -->

<Style Selector="StackPanel.toolbar">
<Setter Property="Orientation" Value="Horizontal"/>
<Setter Property="Margin" Value="0,0,0,0"/>
</Style>

<Style Selector="StackPanel.toolbar Button">
<Setter Property="Padding" Value="6"/>
<Setter Property="Margin" Value="0,0,5,0"/>
<Setter Property="Background" Value="Transparent"/>
</Style>

<Style Selector="StackPanel.toolbar Button Image">
<Setter Property="Width" Value="26"/>
</Style>

<!-- DataGrid -->

<Style Selector="TextBlock.data-cell">
<Setter Property="FontSize" Value="12"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Padding" Value="2"/>
</Style>

<Style Selector="TextBlock.data-cell-null">
<Setter Property="Foreground" Value="Gray"/>
</Style>

<Style Selector="TextBlock.data-cell-key">
<Setter Property="Foreground" Value="Green"/>
<Setter Property="FontWeight" Value="Bold"/>
</Style>

<!-- error message -->

<Style Selector="Grid.error">
<Setter Property="Background" Value="Black"/>
</Style>

<Style Selector="Grid.error Image">
<Setter Property="Width" Value="40"/>
</Style>

<Style Selector="Grid.error TextBlock.error">
<Setter Property="Foreground" Value="Red"/>
<Setter Property="FontWeight" Value="Bold"/>
</Style>

<!-- Thinner expander -->

<!-- todo -->



</Styles>
Loading

0 comments on commit 50ccd64

Please sign in to comment.