Skip to content

Commit cf3191a

Browse files
thejambiZachary Burnhamclaude
authored
LT-22802: Show Exception "Features" in the Avalonia detail view (#1210)
Grammar > Exception "Features" (ProdRestrictEdit) was not on the list of tools that open in the Avalonia detail view, so with New UI on it fell back to the WinForms DataTree. The tool filter list that #1146 taught the composer to apply never reached a live tool. Add the tool to LexiconFeatureCatalog. Its rows (Name, Abbreviation, Description and Subitems) already compose, and basicPlusFilter.xml withholds Status, Discussion, Confidence, Researchers and Restrictions, so the view matches the WinForms one. Co-Authored-By: Zachary Burnham <zachary_burnham@sil.org> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent a31e54a commit cf3191a

5 files changed

Lines changed: 14 additions & 0 deletions

File tree

‎Src/Common/FwAvalonia/FwAvaloniaStrings.cs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,9 @@ public static string StructuredTextParagraphName(string fieldLabel, int paragrap
299299
public static string FeaturePosEditName => Text("FwAvalonia.Feature.PosEditName");
300300
public static string FeaturePosEditDescription => Text("FwAvalonia.Feature.PosEditDescription");
301301

302+
public static string FeatureProdRestrictEditName => Text("FwAvalonia.Feature.ProdRestrictEditName");
303+
public static string FeatureProdRestrictEditDescription => Text("FwAvalonia.Feature.ProdRestrictEditDescription");
304+
302305
/// <summary>The empty-choice label a list chooser leads with when the field allows no value.
303306
/// English must match the legacy launchers' <c>ksNullLabel</c> so both frameworks show the same word.</summary>
304307
public static string ChooserEmptyItemLabel => Text("FwAvalonia.Chooser.EmptyItemLabel");

‎Src/Common/FwAvalonia/FwAvaloniaStrings.resx‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,12 @@
235235
<data name="FwAvalonia.Feature.PosEditDescription" xml:space="preserve">
236236
<value>The Part of Speech editor.</value>
237237
</data>
238+
<data name="FwAvalonia.Feature.ProdRestrictEditName" xml:space="preserve">
239+
<value>Grammar / Exception "Features"</value>
240+
</data>
241+
<data name="FwAvalonia.Feature.ProdRestrictEditDescription" xml:space="preserve">
242+
<value>The Exception "Features" editor.</value>
243+
</data>
238244
<data name="FwAvalonia.Chooser.EmptyItemLabel" xml:space="preserve">
239245
<value>&lt;Empty&gt;</value>
240246
</data>

‎Src/Common/FwAvalonia/FwAvaloniaTests/UIFrameworkResolverTests.cs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ public void InertFollowUpToolsFallBackToLegacy_UIFramework()
124124
[TestCase("lexiconEdit")]
125125
[TestCase("notebookEdit")]
126126
[TestCase("posEdit")]
127+
[TestCase("ProdRestrictEdit")]
127128
public void BaseDetailEditorTools_StayActive(string tool)
128129
{
129130
Assert.That(UIFrameworkResolver.SupportsAvaloniaForTool(tool), Is.True,

‎Src/Common/FwAvalonia/LexiconFeatureCatalog.cs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ public static class LexiconFeatureCatalog
5151
FwAvaloniaStrings.FeatureGroupOtherRecordTypes),
5252
new LexiconFeatureDescriptor("posEdit",
5353
FwAvaloniaStrings.FeaturePosEditName, FwAvaloniaStrings.FeaturePosEditDescription,
54+
FwAvaloniaStrings.FeatureGroupOtherRecordTypes),
55+
new LexiconFeatureDescriptor("ProdRestrictEdit",
56+
FwAvaloniaStrings.FeatureProdRestrictEditName, FwAvaloniaStrings.FeatureProdRestrictEditDescription,
5457
FwAvaloniaStrings.FeatureGroupOtherRecordTypes)
5558
};
5659

‎Src/xWorks/xWorksTests/Avalonia/Hosting/RecordEditViewSwitchTests.cs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ public void NonMigratedRecordEditTools_FallBackToLegacy_WhenUIModeIsNew(string t
172172
// adds the corresponding TestCase row here.
173173
[TestCase("notebookEdit")]
174174
[TestCase("posEdit")]
175+
[TestCase("ProdRestrictEdit")]
175176
public void RegisteredRecordEditTools_ResolveToAvalonia_WhenUIModeIsNew(string toolValue)
176177
{
177178
m_propertyTable.SetProperty("UIMode", "New", true);

0 commit comments

Comments
 (0)