-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add value range to setting schema file #208
Conversation
@@ -59,19 +86,32 @@ | |||
</description> | |||
</key> | |||
<key name="max-chi-symbol-len" type="i"> | |||
<range min="11" max="33"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test failed because in the test we set max-chi-symbol-len
to 8.
This value actually can be between 0 and 39. Can you update here and src/IBusChewingProperties.c
to accept the wider range?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no problem!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it's intended that we give smaller value range for user from GUI setting widget? :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess so. It works at smaller length but might become inconvenient. Phrases longer than 3x used to trigger O(n^2) pathological case so I guess that's why the default were 11 and 33.
This change can allow users to do config through GSetting interface directly, while prevent users from broken settings by themselves.
Increase the value range according the actual behavior by libchewing.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #208 +/- ##
=======================================
Coverage 60.13% 60.13%
=======================================
Files 24 24
Lines 2757 2757
=======================================
Hits 1658 1658
Misses 1099 1099 ☔ View full report in Codecov by Sentry. |
Adding choices / value range to all string / integer type settings.
This change can allow users to do config through GSetting interface
directly, while prevent users from broken settings by themselves.
Example usage: