Skip to content

LT-22576: Don't allow set phon feats on user-defined NCs - #1051

Merged
aror92 merged 4 commits into
mainfrom
LT-22576
Aug 7, 2026
Merged

LT-22576: Don't allow set phon feats on user-defined NCs#1051
aror92 merged 4 commits into
mainfrom
LT-22576

Conversation

@aror92

@aror92 aror92 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Add method to RuleFormulaControl to check if NC is user-defined.

Update OnDisplayContextSetFeatures in RuleFormulaSlice to display the set phonological features option only if the NC uses features and is not user-defined.

Note: currently there is no way to distinguish user-defined NCs from auto-generated NCs other than the class's name. When we make model changes, we plan to add a flag to track whether a NC is auto-generated, and then the check here can be modified.


This change is Reviewable

Add method to RuleFormulaControl to check if NC is user defined.

Update OnDisplayContextSetFeatures in RuleFormulaSlice to display
the set phonological features option only if the NC uses features
and is not user-defined.

Change-Id: Ifc34b73348ef37b49f064f8840d6ad6502dabfb9
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

NUnit Tests

    1 files  ±0      1 suites  ±0   11m 52s ⏱️ + 1m 2s
5 761 tests ±0  5 680 ✅ ±0  81 💤 ±0  0 ❌ ±0 
5 770 runs  ±0  5 689 ✅ ±0  81 💤 ±0  0 ❌ ±0 

Results for commit 1d6a7c8. ± Comparison against base commit 8dd2468.

♻️ This comment has been updated with latest results.

@codecov-commenter

codecov-commenter commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 36.44%. Comparing base (8dd2468) to head (1d6a7c8).

Files with missing lines Patch % Lines
Src/LexText/Morphology/RuleFormulaControl.cs 0.00% 7 Missing and 4 partials ⚠️
Src/LexText/Morphology/RuleFormulaSlice.cs 0.00% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1051   +/-   ##
=======================================
  Coverage   36.43%   36.44%           
=======================================
  Files        1354     1354           
  Lines      295676   295692   +16     
  Branches    40223    40228    +5     
=======================================
+ Hits       107742   107753   +11     
+ Misses     158661   158660    -1     
- Partials    29273    29279    +6     
Files with missing lines Coverage Δ
Src/LexText/Morphology/RuleFormulaSlice.cs 0.00% <0.00%> (ø)
Src/LexText/Morphology/RuleFormulaControl.cs 0.00% <0.00%> (ø)

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- Handle case when NC has no name in default WS
- Add check for if NC is FeatureBased

Change-Id: Ie673bf1e936a3aee499e871fe73b27f4d57c2de8
@aror92

aror92 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

I've had Devin review and have addressed all comments except the following:

Sibling slice still enables a features-related command without the new check
RegRuleFormulaSlice.OnDisplayContextSetVariables (RegRuleFormulaSlice.cs:71) still gates purely on IsFeatsNCContextCurrent. That command sets feature variables rather than feature values, so it may intentionally remain enabled for user-defined classes, but it edits the same shared PhNCFeatures object; worth confirming whether LT-22576 also applies there.

The request in LT-22576 was specifically about the "Set Phonological Features" option, not about set variables. I don't know whether users would want set variables gated similarly as well. I wouldn't make this additional change unless users request it, or unless a human reviewer thinks it is needed.

@aror92
aror92 marked this pull request as ready for review August 7, 2026 18:04
Change-Id: I92fd4373ed02bcdd66895acb149e01c5cd60190a
@aror92

aror92 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

Unit tests to be added in a separate PR. Danny is kick-starting that for me using Claude (since I don't have a subscription yet), to get all the test set-up out of the way.

@thejambi thejambi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@thejambi reviewed 2 files and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on aror92).

Change-Id: I136b89652ff24e69310ba9189b8dea6594a68af6

@thejambi thejambi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thejambi reviewed 1 file and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on aror92).

@imnasnainaec imnasnainaec mentioned this pull request Aug 7, 2026
5 tasks
@aror92
aror92 merged commit 64bba89 into main Aug 7, 2026
7 checks passed
@aror92
aror92 deleted the LT-22576 branch August 7, 2026 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants