Token Morphosyntactic Analysis UI#104
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis PR introduces a morphology display toggle that allows users to view and edit morpheme breakdowns and per-morpheme glosses alongside token-level glosses. It extends Redux state with morpheme write/delete/gloss operations, creates reusable morpheme editing components, threads the toggle through view layers to control rendering, and updates focus routing to skip morpheme gloss inputs when the phrase box is clicked. ChangesMorphology Feature Implementation
Sequence DiagramsequenceDiagram
participant User
participant ViewOptionsDropdown
participant InterlinearizerLoader
participant ContinuousView
participant TokenChip
participant MorphemeBreakdownPopover
participant AnalysisStore
participant Redux
User->>ViewOptionsDropdown: Toggle "Show Morphology"
ViewOptionsDropdown->>InterlinearizerLoader: onShowMorphologyChange(true)
InterlinearizerLoader->>InterlinearizerLoader: useOptimisticBooleanSetting saves
InterlinearizerLoader->>ContinuousView: viewOptions with showMorphology=true
ContinuousView->>TokenChip: render with showMorphology=true
Note over TokenChip: Morphology UI enabled
User->>TokenChip: Click morpheme trigger button
TokenChip->>MorphemeBreakdownPopover: Open popover with initialValue
User->>MorphemeBreakdownPopover: Type morpheme forms (space-separated)
User->>MorphemeBreakdownPopover: Click Done
MorphemeBreakdownPopover->>TokenChip: onSave(forms)
TokenChip->>TokenChip: handleMorphemeSave splits on whitespace
TokenChip->>Redux: useMorphemeBreakdownDispatch writeMorphemes
Redux->>AnalysisStore: Analysis state updated with morpheme array
AnalysisStore->>TokenChip: useMorphemes returns new morpheme array
TokenChip->>TokenChip: Render per-morpheme gloss inputs
User->>TokenChip: Edit morpheme gloss (blur)
TokenChip->>Redux: useMorphemeGlossDispatch writeMorphemeGloss
Redux->>AnalysisStore: Morpheme.gloss updated for analysisLanguage
AnalysisStore->>TokenChip: onSave called with updated TextAnalysis
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsStopped waiting for pipeline failures after 30000ms. One of your pipelines takes longer than our 30000ms fetch window to run, so review may not consider pipeline-failure results for inline comments if any failures occurred after the fetch window. Increase the timeout if you want to wait longer or run a Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
f183d58 to
f340b00
Compare
7b41bc7 to
de371c1
Compare
alex-rawlings-yyc
left a comment
There was a problem hiding this comment.
@alex-rawlings-yyc resolved 1 discussion.
Reviewable status: 0 of 28 files reviewed, all discussions resolved (waiting on alex-rawlings-yyc).
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
alex-rawlings-yyc
left a comment
There was a problem hiding this comment.
@alex-rawlings-yyc resolved 1 discussion.
Reviewable status: 0 of 30 files reviewed, all discussions resolved (waiting on alex-rawlings-yyc).
…nt morpheme ID regeneration on unedited done/enter
…ice, other minor improvements
b41ae2e to
e9cd471
Compare
imnasnainaec
left a comment
There was a problem hiding this comment.
Clarifying intent...
This pr gives the user the ability to type whatever they want in the morpheme-splitter pop-up text field. Do we want to leave it that open-ended or just (e.g.) let them click between characters to split/unsplit the surface form? (Perhaps that not sufficient for situations with, e.g., composed characters or circumfixes, but handling for those may be better left as power/settings-unlocked.)
@imnasnainaec reviewed 4 files and all commit messages, and made 1 comment.
Reviewable status: 4 of 32 files reviewed, all discussions resolved (waiting on alex-rawlings-yyc).
|
My intent for this PR was to get the bare minimum UI needed for morpheme-splitting. If we decide that we want to extend the scope of this PR to add that sort of control that's fine with me, but for now I'm fine with a keeping things simple. |
* Address token-analysis review comments - MorphemeEditor: normalize internal whitespace in isUnedited to avoid no-op saves on spacing-only changes - TokenChip: document the deliberate onOpenChange omission on the controlled Popover Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Add JSDoc to normalize helper in MorphemeEditor Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This change is
Summary by CodeRabbit
Release Notes
New Features
Documentation
Tests
Chores