This repository has been archived by the owner on Apr 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 316
fix: LEAP-724: Fix Textarea required + skipDuplicates #1705
Merged
Conversation
This file contains 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
This method is used to validate text when it's added by user, not to validate the entire value of Textarea result, it has different signature. We could adjust it to validate duplicated texts on submit, but that's improvement and we need just a fix right now.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1705 +/- ##
===========================================
- Coverage 68.79% 21.93% -46.86%
===========================================
Files 443 441 -2
Lines 28793 28757 -36
Branches 7655 7527 -128
===========================================
- Hits 19808 6308 -13500
- Misses 7742 22449 +14707
+ Partials 1243 0 -1243 ☔ View full report in Codecov by Sentry. |
ocr + textarea.skip-duplicates
yyassi-heartex
approved these changes
Feb 22, 2024
Gondragos
approved these changes
Feb 22, 2024
MasherJames
pushed a commit
to HelloPareto/label-studio-frontend
that referenced
this pull request
Feb 29, 2024
* Adjust test to fail with required + skipDuplicates * Fix test to really see the problem * Run only this test for now * Rename validateValue in Textarea to fix validation This method is used to validate text when it's added by user, not to validate the entire value of Textarea result, it has different signature. We could adjust it to validate duplicated texts on submit, but that's improvement and we need just a fix right now. * Return all tests * Unrelated doc for displayMode param + fix FF comment * Fix linting and line endings in some tests ocr + textarea.skip-duplicates * Fix Textarea editing * One more missed thing
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
New validation system (#1649) started to invoke
validateValue()
from control tags, but Textarea had a different meaning for this method, validating only text just entered by user, so the format was different from the whole Textarea result and LSF was crashing. Also semantics is also different, so the method was simply renamed to not clash with new validation.PR fulfills these requirements
Describe the reason for change
LSF crashes on submit with
Textarea
tag with bothrequired
andskipDuplicates
set to true.What feature flags were used to cover this change?
skipDuplicates
work only withfflag_feat_front_lsdv_4659_skipduplicates_060323_short
ONWhat alternative approaches were there?
To validate duplicated texts on submit as well, but that can block some existing annotations and should be done separately as a feature.
This change affects (describe how if yes)
Does this PR introduce a breaking change?
What level of testing was included in the change?