Remove dead code from XmlDocView and related classes - #1044
Merged
Conversation
XmlDocView was the pre-XHTML Dictionary view; today only the Notebook Document tool (and its print path) instantiates it. Remove code that could only execute when it hosted a dictionary: - The CheckJump warning path. The live equivalent is XhtmlDocView's OnJumpToRecord. - Publication and configuration-view handling. The persistContext for XmlDocView is only ever Notebk, so SetInfoBarText reduces to its base behavior. - MainEntryFromSubEntryTargetAdjuster, only reachable from root-based dictionary layouts. The entire SubitemRecordClerk feature (not dictionary-related): no configuration XML has ever referenced the clerk in available history (2012 onward), so none of it could run. No configuration that instantiates XmlDocView has a <decoratorClass> node, so the XmlSeqView publication argument is now passed as null. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1044 +/- ##
==========================================
+ Coverage 33.05% 33.09% +0.04%
==========================================
Files 1202 1201 -1
Lines 278326 277923 -403
Branches 37190 37125 -65
==========================================
- Hits 91994 91981 -13
+ Misses 158478 158152 -326
+ Partials 27854 27790 -64
🚀 New features to boost your workflow:
|
thejambi
approved these changes
Aug 6, 2026
thejambi
left a comment
Contributor
There was a problem hiding this comment.
@thejambi reviewed 5 files and all commit messages, and made 1 comment.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on mark-sil).
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.
Summary
XmlDocView was the pre-XHTML Dictionary view; today only the Notebook Document tool (and its print path) instantiates it. This removes ~700 lines of code that could only execute when it hosted a dictionary:
XmlSeqView.OnJumpToRecord->XmlDocView.OnCheckJump). Its guard required thelexiconDictionarytool, which usesXhtmlDocView- whose ownOnJumpToRecordis the live equivalent of this logic.OnPropertyChanged(SelectedPublication / DictionaryPublicationLayout),GetPubDecorator, the TitleBar Layout Menu region, and the Dictionary title-bar helpers. ThepersistContextfor XmlDocView is only ever Notebk, soSetInfoBarTextreduces to its base behavior.MainEntryFromSubEntryTargetAdjuster, only reachable from root-based dictionary layouts, plus its assertion block inItemClickedTests.SubitemRecordClerkfeature (not dictionary-related): the class, theRecordClerkvirtual hooks andrelationToRelatedClerkbranches, and the block inXmlDocView.SelectAndScrollToCurrentRecord. No configuration XML has ever referenced the clerk or therelationToRelatedClerkattribute in available history (2012 onward, checked locally across all branches and against upstream), so none of it could run.No configuration that instantiates XmlDocView has a
<decoratorClass>node, so theXmlSeqViewpublication argument is now passed as null.Deliberately kept:
IPreferedTargetAdjuster/NullTargetAdjuster(live API used bySubitemClicked), the decorator guard inAdjustedClerkIndex, and the layout-property fallback inRunConfigureDialog.Validation
.\build.ps1- 0 warnings, 0 errors.\test.ps1xWorksTests: 1221 passed, 0 failed.\test.ps1XMLViewsTests: 114 passed, 0 failed🤖 Generated with Claude Code
This change is