LT-22725: Show abbreviation for user-defined natural classes - #1158
Conversation
In the phonological rule formula, a feature-based natural class was always drawn as its list of features, even when the user had built and named the class. Only classes abbreviated "C" or "V" showed their abbreviation, and only when they had a single feature. The rule view now draws a user-defined feature-based natural class as its abbreviation in brackets, whatever its number of features. An empty abbreviation displays as "***". Classes created automatically when features are inserted directly into a rule still display their features. A class counts as user-defined when it has a name that is not auto-generated. That check now takes the natural class as an argument, so the view can apply it to each class it draws rather than to the current selection. Line count and width use the same check, so the cell is sized to the abbreviation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Change-Id: Iebd499482136c21f722e1ed102920caa69a71e9f
Comment hygiene (advisory)No comment-style violations in the lines this branch adds since |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1158 +/- ##
==========================================
- Coverage 38.95% 38.94% -0.01%
==========================================
Files 1520 1520
Lines 352476 352528 +52
Branches 40636 40648 +12
==========================================
- Hits 137296 137282 -14
- Misses 185899 185952 +53
- Partials 29281 29294 +13
🚀 New features to boost your workflow:
|
Shorten comment lines to align with comment hygiene. Register the display dependencies on NC's name and abbreviation for displaying phonological & affix process rules. This ensures if names or abbreviations are updated, the display widths are recalculated so new names/abbreviations fit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Change-Id: I97759674dbc305d54a0f75a8d21cbca321e1ed58
|
One ignored note from Devin's review:
BestAnalysisAlternative already uses |
thejambi
left a comment
There was a problem hiding this comment.
- Jason plans to work on the tests for this.
@thejambi reviewed 5 files and all commit messages, and made 1 comment.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on aror92).
In the phonological rule formula, a feature-based natural class was always drawn as its list of features, even when the user had built and named the class. Only classes abbreviated "C" or "V" showed their abbreviation, and only when they had a single feature.
The rule view now draws a user-defined feature-based natural class as its abbreviation in brackets, whatever its number of features. An empty abbreviation displays as "***". Classes created automatically when features are inserted directly into a rule still display their features.
A class counts as user-defined when it has a name that is not auto-generated. That check now takes the natural class as an argument, so the view can apply it to each class it draws rather than to the current selection. Line count and width use the same check, so the cell is sized to the abbreviation.
This change is