Skip to content

Commit

Permalink
dynamically assign compatiblity string
Browse files Browse the repository at this point in the history
- user facing compatibility info string now dynamically assigned based on package compatibility
  • Loading branch information
dnenov committed Nov 11, 2024
1 parent 5278181 commit 3d0fb16
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 6 deletions.
28 changes: 23 additions & 5 deletions src/DynamoCoreWpf/Properties/Resources.Designer.cs

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

6 changes: 6 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.en-US.resx
Original file line number Diff line number Diff line change
Expand Up @@ -4056,6 +4056,12 @@ To make this file into a new template, save it to a different folder, then move
</data>
<data name="PackageDetailsCompatibilityWithSetup" xml:space="preserve">
<value>Compatible with your current setup</value>
</data>
<data name="PackageDetailsIncompatibilityWithSetup" xml:space="preserve">
<value>Incompatible with your current setup</value>
</data>
<data name="PackageDetailsXCompatibilityWithSetup" xml:space="preserve">
<value>Unknown compatibility with your current setup</value>
</data>
<data name="PackageDetailsSize" xml:space="preserve">
<value>Size</value>
Expand Down
6 changes: 6 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -4043,6 +4043,12 @@ To make this file into a new template, save it to a different folder, then move
</data>
<data name="PackageDetailsCompatibilityWithSetup" xml:space="preserve">
<value>Compatible with your current setup</value>
</data>
<data name="PackageDetailsIncompatibilityWithSetup" xml:space="preserve">
<value>Incompatible with your current setup</value>
</data>
<data name="PackageDetailsXCompatibilityWithSetup" xml:space="preserve">
<value>Unknown compatibility with your current setup</value>
</data>
<data name="PackageDetailsSize" xml:space="preserve">
<value>Size</value>
Expand Down
2 changes: 2 additions & 0 deletions src/DynamoCoreWpf/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5017,6 +5017,7 @@ static Dynamo.Wpf.Properties.Resources.PackageDetailsDescription.get -> string
static Dynamo.Wpf.Properties.Resources.PackageDetailsGroup.get -> string
static Dynamo.Wpf.Properties.Resources.PackageDetailsHost.get -> string
static Dynamo.Wpf.Properties.Resources.PackageDetailsIncompatibileVersionTooltip.get -> string
static Dynamo.Wpf.Properties.Resources.PackageDetailsIncompatibilityWithSetup.get -> string
static Dynamo.Wpf.Properties.Resources.PackageDetailsKeywords.get -> string
static Dynamo.Wpf.Properties.Resources.PackageDetailsLicense.get -> string
static Dynamo.Wpf.Properties.Resources.PackageDetailsLinks.get -> string
Expand All @@ -5027,6 +5028,7 @@ static Dynamo.Wpf.Properties.Resources.PackageDetailsSize.get -> string
static Dynamo.Wpf.Properties.Resources.PackageDetailsUnknownCompatibilityVersionTooltip.get -> string
static Dynamo.Wpf.Properties.Resources.PackageDetailsVersions.get -> string
static Dynamo.Wpf.Properties.Resources.PackageDetailsVersionsAndPackageRequirements.get -> string
static Dynamo.Wpf.Properties.Resources.PackageDetailsXCompatibilityWithSetup.get -> string
static Dynamo.Wpf.Properties.Resources.PackageDownloadConfirmMessageBoxTitle.get -> string
static Dynamo.Wpf.Properties.Resources.PackageDownloadErrorMessageBoxTitle.get -> string
static Dynamo.Wpf.Properties.Resources.PackageDownloadMessageBoxTitle.get -> string
Expand Down
19 changes: 18 additions & 1 deletion src/PackageDetailsViewExtension/PackageDetailsView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,24 @@
</Grid>
<StackPanel Margin="0,10" Visibility="{Binding VersionInformation, Converter={StaticResource InverseEmptyListToVisibilityConverter}}">
<TextBlock Margin="0,5" Text="{x:Static p:Resources.PackageDetailsCompatibility}" />
<TextBlock Margin="0,5" Text="{x:Static p:Resources.PackageDetailsCompatibilityWithSetup}" />
<TextBlock Margin="0,5">
<TextBlock.Style>
<Style BasedOn="{StaticResource {x:Type TextBlock}}" TargetType="TextBlock">
<Setter Property="Text" Value="{x:Static p:Resources.PackageDetailsXCompatibilityWithSetup}" />
<Style.Triggers>
<!-- Trigger for IsCompatible == true -->
<DataTrigger Binding="{Binding IsCompatible}" Value="True">
<Setter Property="Text" Value="{x:Static p:Resources.PackageDetailsCompatibilityWithSetup}" />
</DataTrigger>

<!-- Trigger for IsCompatible == false -->
<DataTrigger Binding="{Binding IsCompatible}" Value="False">
<Setter Property="Text" Value="{x:Static p:Resources.PackageDetailsIncompatibilityWithSetup}" />
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<DataGrid x:Name="VersionCompatibilityDataGrid"
Margin="0,0,20,20"
AlternatingRowBackground="{StaticResource PMDataAltBackgroundColorBrush}"
Expand Down

0 comments on commit 3d0fb16

Please sign in to comment.