Conversation
The Avalonia detail view will offer the Help command natively once the shared object menu leaves the hidden DataTree adapter. Its topic id must match the one the WinForms slice generates, so the generator moves out of Slice into a rule both views call. FdoUi gains a DetailRules folder, namespace SIL.FieldWorks.Common.DetailRules, for rules both detail views share. Nothing there may depend on WinForms, Avalonia, or a slice or control type, so the rules keep working once WinForms is removed. Two tests enforce that boundary, one over every signature in the namespace and one over the folder's using directives. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1151 +/- ##
==========================================
+ Coverage 38.89% 38.94% +0.04%
==========================================
Files 1518 1519 +1
Lines 352262 352382 +120
Branches 40597 40615 +18
==========================================
+ Hits 137005 137219 +214
+ Misses 185976 185891 -85
+ Partials 29281 29272 -9
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The first shared engine for retiring the hidden DataTree command adapter: the rule that turns a detail field into a help topic id, moved out of
Sliceinto a folder both detail views call. It prepares the Help command to be answered natively by the Avalonia detail view in the follow-on PR that gives mnuDataTree-Object its authority. Nothing user-visible changes in this PR.The shared rule. FdoUi gains a
DetailRulesfolder, namespaceSIL.FieldWorks.Common.DetailRules, for rules both views share. Nothing there may depend on WinForms, Avalonia, or a slice or control type, so the rules keep working once WinForms is removed. Two tests enforce the boundary: one over every signature in the namespace, one over the folder'susingdirectives.FieldHelpTopics.Resolvetakes the layout's authored id, a prefix, aHelpTopicSubject(field, raw label, class, owner class, sort key, the Targets entry-or-sense flag, area, tool) and a topic-exists predicate. An authored id returns before the subject is described.Slicedescribes its subject from its configuration node, object and property table and passes its existing validity check as the predicate, so the WinForms result is unchanged, including when a slice has no mediator.The Avalonia side. The layout's
helpTopicIDridesViewNodethrough the importer, the JSON round trip and the override applier's clones. The composer stamps every row with it plus aDetailHelpTopicSourcebuilt from the node being walked; lexical-relation rows set their own, as Targets rows.RecordEditView.ResolveHelpTopicadds the area, tool and help provider and returns the id. No menu consumes it yet.Tests. FdoUiTests cover the fallback chain level by level against a provider that knows chosen topics. xWorksTests compare, for every composed row that has a WinForms slice twin in the hidden tree, the id the slice generates with the one the host resolves, with a provider that knows nothing and one that knows every tool-scoped topic; a lexical relation in the fixture covers the Targets rule.
Known, not in this PR. In the Avalonia view today, Help on Publish Sense In and on Reversal Entries opens the Sense topic, because the hidden adapter cannot match those rows to a slice and falls back to the sense's summary slice. The native Help in the follow-on PR answers from the row and removes that dependence.
🤖 Generated with Claude Code
This change is