This fixes LT-22616: Word Cat contents change when bundle selected#1007
Open
jtmaxwell3 wants to merge 2 commits into
Open
This fixes LT-22616: Word Cat contents change when bundle selected#1007jtmaxwell3 wants to merge 2 commits into
jtmaxwell3 wants to merge 2 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1007 +/- ##
=======================================
Coverage 32.96% 32.96%
=======================================
Files 1202 1202
Lines 278291 278295 +4
Branches 37166 37167 +1
=======================================
+ Hits 91733 91743 +10
+ Misses 158688 158677 -11
- Partials 27870 27875 +5
🚀 New features to boost your workflow:
|
Contributor
|
If a user has manually chosen a word gloss and word category will this overwrite them when they choose a different msa? I'm not sure that is desired if that is the case. |
Collaborator
Author
|
@jasonleenaylor CopyLexEntryInfoToMonomorphemicWordGlossAndPos is poorly named because it only does the copy if the word gloss and/or category don't already exist. It should be something like GuessWordGlossAndPos. |
jtmaxwell3
marked this pull request as draft
July 15, 2026 16:56
jtmaxwell3
marked this pull request as ready for review
July 15, 2026 20:29
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.
This fixes https://jira.sil.org/browse/LT-22616. The root problem was that SandboxBase and InterlinVc were making different guesses about the word cat and gloss, which confused the user. The general principle is that when you first click on a word in the interlinear text, the sandbox should show whatever was showing in the interlinear text. The word cat and gloss should only change after the user makes a change to the sandbox.
I also added code to guess the word gloss and category whenever the morphemes change.
This change is
Devin's analysis:
The interlinear display (InterlinVc) and the editing sandbox (SandboxBase) had independent implementations for guessing word glosses and parts of speech from morph bundles. This caused inconsistencies—the display could show one guess while the sandbox applied a different one.
This PR:
Extracts the private guess methods from an inner class of InterlinVc into internal static methods at the InterlinVc class level, returning richer types (ILexSense, IPartOfSpeech) instead of just display strings.
Adds SandboxBase.GuessWordCatAndGloss which delegates to those same InterlinVc methods, ensuring consistent guesses.
Renames CopyLexEntryInfoToMonomorphemicWordGlossAndPos → CopyLexEntryInfoToWordGlossAndPosIfEmpty and adjusts CopySenseToWordGloss to accept a real HVO directly.
After morpheme updates in HandleSelectMorphComboItem, calls CopyLexEntryInfoToWordGlossAndPosIfEmpty to refresh guesses.