Skip to content

Commit

Permalink
fix: LEAP-1029: Unify an approach of processing requests for suggesti…
Browse files Browse the repository at this point in the history
…ons (#5772)

Use `cleanId` to unifying an approach of processing requests for
suggestions.

We already have fix like that for ml-backend requests 

https://github.com/HumanSignal/label-studio/blob/develop/web/apps/labelstudio/src/pages/DataManager/DataManager.jsx#L132

So we just need to mirror it in tests here.

### PR fulfills these requirements
- [x] Commit message(s) and PR title follows the format
`[fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made`
ex. `fix: DEV-XXXX: Removed inconsistent code usage causing intermittent
errors`
- [ ] Tests for the changes have been added/updated (for bug
fixes/features)
- [ ] Docs have been added/updated (for bug fixes/features)
- [x] Best efforts were made to ensure docs/code are concise and
coherent (checked for spelling/grammatical errors, commented out code,
debug logs etc.)
- [x] Self-reviewed and ran all changes on a local instance (for bug
fixes/features)



#### Change has impacts in these area(s)
_(check all that apply)_
- [ ] Product design
- [ ] Backend (Database)
- [ ] Backend (API)
- [ ] Frontend

### Does this PR introduce a breaking change?
_(check only one)_
- [ ] Yes, and covered entirely by feature flag(s)
- [ ] Yes, and covered partially by feature flag(s)
- [x] No
- [ ] Not sure (briefly explain the situation below)



### What level of testing was included in the change?
_(check all that apply)_
- [ ] e2e
- [ ] integration
- [ ] unit

### Which logical domain(s) does this change affect?
`Codeceptjs tests`

---------

Co-authored-by: robot-ci-heartex <[email protected]>
Co-authored-by: Gondragos <[email protected]>
  • Loading branch information
3 people authored Apr 24, 2024
1 parent 7951ac3 commit 0619295
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions web/dist/apps/labelstudio/version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{

Check notice on line 1 in web/dist/apps/labelstudio/version.json

View workflow job for this annotation

GitHub Actions / merge

Merge Conflict automatically resolved web/dist/apps/labelstudio/version.json

Check notice on line 1 in web/dist/apps/labelstudio/version.json

View workflow job for this annotation

GitHub Actions / merge

Merge Conflict automatically resolved web/dist/apps/labelstudio/version.json
"message": "Merge branch 'develop' into 'fb-leap-947/wrong-task-suggestions'",
"commit": "c045329afafb47a3f94c68aa7610ef5d18603cb8",
"date": "2024-04-22T23:35:48.000Z",
"branch": "fb-leap-947/wrong-task-suggestions"
"message": "Merge branch 'develop' into 'fb-leap-1029'",
"commit": "637c44e92b0b8a984491df28b995be64156e7b0f",
"date": "2024-04-24T12:36:14.000Z",
"branch": "fb-leap-1029"
}
8 changes: 4 additions & 4 deletions web/dist/libs/datamanager/version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{

Check notice on line 1 in web/dist/libs/datamanager/version.json

View workflow job for this annotation

GitHub Actions / merge

Merge Conflict automatically resolved web/dist/libs/datamanager/version.json

Check notice on line 1 in web/dist/libs/datamanager/version.json

View workflow job for this annotation

GitHub Actions / merge

Merge Conflict automatically resolved web/dist/libs/datamanager/version.json
"message": "Merge branch 'develop' into 'fb-leap-947/wrong-task-suggestions'",
"commit": "c045329afafb47a3f94c68aa7610ef5d18603cb8",
"date": "2024-04-22T23:35:48.000Z",
"branch": "fb-leap-947/wrong-task-suggestions"
"message": "Merge branch 'develop' into 'fb-leap-1029'",
"commit": "637c44e92b0b8a984491df28b995be64156e7b0f",
"date": "2024-04-24T12:36:14.000Z",
"branch": "fb-leap-1029"
}
8 changes: 4 additions & 4 deletions web/dist/libs/editor/version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{

Check notice on line 1 in web/dist/libs/editor/version.json

View workflow job for this annotation

GitHub Actions / merge

Merge Conflict automatically resolved web/dist/libs/editor/version.json

Check notice on line 1 in web/dist/libs/editor/version.json

View workflow job for this annotation

GitHub Actions / merge

Merge Conflict automatically resolved web/dist/libs/editor/version.json
"message": "Merge branch 'develop' into 'fb-leap-947/wrong-task-suggestions'",
"commit": "c045329afafb47a3f94c68aa7610ef5d18603cb8",
"date": "2024-04-22T23:35:48.000Z",
"branch": "fb-leap-947/wrong-task-suggestions"
"message": "Merge branch 'develop' into 'fb-leap-1029'",
"commit": "637c44e92b0b8a984491df28b995be64156e7b0f",
"date": "2024-04-24T12:36:14.000Z",
"branch": "fb-leap-1029"
}
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ function getRectangleSuggestions(reg, group) {
'origin': 'manual',
}];
const annotation = window.labelStudio.store.annotationStore.selected;
const ids = group.map(r => r.id);
const ids = group.map(r => r.cleanId);
const results = annotation.serializeAnnotation().filter((res) => ids.includes(res.id));
const suggestions = allSuggestions.filter(predictionResult => {
const targetCenterX = predictionResult.value.x + predictionResult.value.width / 2;
Expand Down

0 comments on commit 0619295

Please sign in to comment.