Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions BlazorSliders/BlazorSliders.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Authors>Carl Franklin</Authors>
<Company></Company>
<PackageId></PackageId>
Expand All @@ -23,7 +23,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions BlazorSliders/VerticalSliderPanel.razor
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
top: 0px;
left: @LeftPanelWidthPx;
height: @HeightPx;">
@SliderContent
</div>

<div id="@RightPanelId" class="noselect @RightClassString"
Expand Down
3 changes: 3 additions & 0 deletions BlazorSliders/VerticalSliderPanel.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ public string RightPanelId
[Parameter]
public RenderFragment RightChildContent { get; set; }

[Parameter]
public RenderFragment SliderContent { get; set; }

[Parameter]
public string LeftStyleString { get; set; } = "";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Expand Down
6 changes: 3 additions & 3 deletions BlazorSlidersWasmTestApp/BlazorSlidersWasmTestApp.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
12 changes: 12 additions & 0 deletions BlazorSlidersWasmTestApp/Pages/CustomClasses.razor
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,24 @@
<div style="padding:10px;">
<h3>Left Content</h3>
This is a demo of custom class styling for the panels and slider.
<br /><br />
<strong>New Feature Test:</strong> The slider now supports custom content via the SliderContent parameter.
</div>
</LeftChildContent>
<SliderContent>
<div style="background: linear-gradient(45deg, #ff6b6b, #4ecdc4); color: white; text-align: center; padding: 4px; font-size: 12px; border-radius: 2px;">
⇔ CUSTOM SLIDER ⇔
</div>
</SliderContent>
<RightChildContent>
<div style="padding:10px;">
<h3>Right Content</h3>
<NavMenu />
<p style="margin-top: 20px;">
<strong>SliderContent Demo:</strong> The slider between these panels now displays custom content
(a colorful gradient bar with drag indicator), demonstrating the new SliderContent parameter
that was added to match the functionality available in HorizontalSliderPanel.
</p>
</div>
</RightChildContent>
</VerticalSliderPanel>
Expand Down
79 changes: 79 additions & 0 deletions PARAMETER_PARITY_ANALYSIS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# BlazorSliders Parameter Parity Analysis

## HorizontalSliderPanel vs VerticalSliderPanel Parameter Comparison

### Common Parameters (Present in Both Components)
| Parameter | HorizontalSliderPanel | VerticalSliderPanel | Notes |
|-----------|----------------------|-------------------|-------|
| SliderClassString | ✅ | ✅ | Custom CSS classes for slider |
| OverrideSliderStyle | ✅ | ✅ | Override default slider styling |
| InitialSliderPosition | ✅ | ✅ | Initial position of slider |
| SliderPositionChanged | ✅ | ✅ | Event callback for position changes |

### Panel Content Parameters
| Parameter | HorizontalSliderPanel | VerticalSliderPanel | Notes |
|-----------|----------------------|-------------------|-------|
| TopChildContent | ✅ | ❌ | Content for top panel |
| BottomChildContent | ✅ | ❌ | Content for bottom panel |
| LeftChildContent | ❌ | ✅ | Content for left panel |
| RightChildContent | ❌ | ✅ | Content for right panel |
| TopHeaderContent | ✅ | ❌ | Header content for top panel |
| BottomHeaderContent | ✅ | ❌ | Header content for bottom panel |
| LeftHeaderContent | ❌ | ❌ | **MISSING**: No header content for left panel |
| RightHeaderContent | ❌ | ❌ | **MISSING**: No header content for right panel |

### Panel Styling Parameters
| Parameter | HorizontalSliderPanel | VerticalSliderPanel | Notes |
|-----------|----------------------|-------------------|-------|
| TopStyleString | ✅ | ❌ | Custom styles for top panel |
| TopClassString | ✅ | ❌ | Custom CSS classes for top panel |
| BottomStyleString | ✅ | ❌ | Custom styles for bottom panel |
| BottomClassString | ✅ | ❌ | Custom CSS classes for bottom panel |
| LeftStyleString | ❌ | ✅ | Custom styles for left panel |
| LeftClassString | ❌ | ✅ | Custom CSS classes for left panel |
| RightStyleString | ❌ | ✅ | Custom styles for right panel |
| RightClassString | ❌ | ✅ | Custom CSS classes for right panel |

### Slider-Specific Parameters
| Parameter | HorizontalSliderPanel | VerticalSliderPanel | Notes |
|-----------|----------------------|-------------------|-------|
| SliderContent | ✅ | ✅ (**FIXED**) | Custom content inside slider |
| SliderHeight | ✅ | ❌ | Height of horizontal slider |
| SliderWidth | ❌ | ✅ | Width of vertical slider |

### Size and Unit Parameters
| Parameter | HorizontalSliderPanel | VerticalSliderPanel | Notes |
|-----------|----------------------|-------------------|-------|
| HeightUnit | ✅ | ❌ | Unit for height calculations |
| WidthUnit | ❌ | ✅ | Unit for width calculations |
| TopPanelHeight | ✅ | ❌ | Height of top panel |
| LeftPanelStartingWidth | ❌ | ✅ | Starting width of left panel |

### Minimum Size Parameters
| Parameter | HorizontalSliderPanel | VerticalSliderPanel | Notes |
|-----------|----------------------|-------------------|-------|
| MinimumTopPanelHeight | ✅ | ❌ | Minimum height for top panel |
| MinimumBottomPanelHeight | ✅ | ❌ | Minimum height for bottom panel |
| MinimumLeftPanelWidth | ❌ | ✅ | Minimum width for left panel |
| MinimumRightPanelWidth | ❌ | ✅ | Minimum width for right panel |

### Unique Parameters (No Counterpart)
| Parameter | Component | Notes |
|-----------|-----------|-------|
| SliderPosition | VerticalSliderPanel | **EXTRA**: Read/write property for current position |
| CurrentSliderPosition | Both | Read-only property (HorizontalSliderPanel returns topPanelHeight, VerticalSliderPanel returns leftPanelWidth) |

## Summary

### Issues Resolved
- ✅ **SliderContent**: Added to VerticalSliderPanel (was missing)

### Potential Missing Features (by design)
- **Header Content**: VerticalSliderPanel doesn't have LeftHeaderContent/RightHeaderContent parameters like HorizontalSliderPanel has TopHeaderContent/BottomHeaderContent. This appears to be intentional design choice as vertical layouts typically don't use headers.

### Architectural Differences
- **SliderPosition**: VerticalSliderPanel has an additional SliderPosition property with getter/setter that HorizontalSliderPanel lacks. This seems to be a newer feature.
- **Parameter naming**: Parameters are appropriately named for their orientation (Top/Bottom vs Left/Right, Height vs Width, etc.)

### Conclusion
The components have good parameter parity considering their different orientations. The main missing feature was **SliderContent** in VerticalSliderPanel, which has been resolved. Other differences appear to be intentional design choices based on the orientation and typical usage patterns of each component.
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "9.0.102",
"version": "8.0.118",
"allowPrerelease": true,
"rollForward": "latestFeature"
}
Expand Down