label-studio-frontend
label-studio-frontend copied to clipboard
fix: DEV-4081: e2e tests for selected region after tool changes
e2e tests to ensure selected region is correct after moving between certain tools.
When using Brush then Eraser or Pan, existing region should stay selected and have new additions be added to it. Similar for the Magic Wand.
We also have to ensure that the unselectRegionOnToolChange property for the Brush tool is updated on afterCreate
so that e2e tests can dynamically update a feature flag and have it be applied.
In addition, we have made adding the magicwand tag to the Registry safer, feature flag gating it on import rather than dynamically in the Registry class.
PR fulfills these requirements
- [*] 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)
- [*] Best efforts were made to ensure docs/code are concise and coherent (checked for spelling/grammatical errors, commented out code, debug logs etc.)
- [*] 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
- [*] Frontend
Describe the reason for change
(link to issue, supportive screenshots etc.)
e2e tests for the fixes in https://github.com/heartexlabs/label-studio/issues/3510 , that were also bundled in the PR at https://github.com/heartexlabs/label-studio-frontend/pull/1119
What does this fix?
(if this is a bug fix)
These are e2e tests for region selection behavior for the Brush/Magic Wand when interacting with the Eraser and Pan tools. It also includes a small change to how the unselectRegionOnToolChange value is set on the Brush tool to ensure it can be dynamically changed based on the Magic Wand flag when running during e2e tests.
What is the new behavior?
(if this is a breaking or feature change)
What is the current behavior?
(if this is a breaking or feature change)
What libraries were added/updated?
(list all with version changes)
Does this change affect performance?
(if so describe the impacts positive or negative)
Does this change affect security?
(if so describe the impacts positive or negative)
What alternative approaches were there?
(briefly list any if applicable)
What feature flags were used to cover this change?
(briefly list any if applicable)
FF_DEV_4081 = 'fflag_feat_front_dev_4081_magic_wand_tool'
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)
- [*] 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?
(for bug fixes/features, be as precise as possible. ex. Authentication, Annotation History, Review Stream etc.)
✅ Linked to Task DEV-4081 · Review and merge Implements Magic Wand tool PR
➡️ Part of Epic DEV-971 · Label Studio Community
We're tracking internally and waiting for assignment.
Thanks!
On Tue, Mar 14, 2023 at 7:56 PM Chris Hoge @.***> wrote:
We're tracking internally and waiting for assignment.
— Reply to this email directly, view it on GitHub https://github.com/heartexlabs/label-studio-frontend/pull/1192#issuecomment-1469233819, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABEHUKCTH3CON2UNM3ME6DW4EVXXANCNFSM6AAAAAAU22AJUM . You are receiving this because you authored the thread.Message ID: @.***>
-- Brad Neuberg Website: http://codinginparadise.org
@hogepodge Hi Chris, any updates on this PR? I think all the work and feedback on the code review are essentially done, and these are just integration tests. I'd love to land this if possible. We have a tracking ticket over on Planet's side for this work and I'd love to close that soon if possible.
@hogepodge Checking in about this again :) These are important integration tests to us at Planet, as the selected region getting unselected during a tool change causes significant friction during labeling in our workflow. @cameronbronstein might have found this feature regressing the last few weeks (not completely sure yet as selection can be subtle), and these integration tests were meant to catch that kind of regression. Any updates on landing these tests so that when they break that is caught?
I just learned about this new option in the annotator settings: "Keep label selected after creating a region". I think if we have this enabled then we will get the behavior that we want.
I'll be checking in tomorrow with the QA team to see if we can get this moved along. Thanks
@nicholasrq ping on reviewing this patch
Any update on landing these? They are just tests :)
I've created an internal ticket to try and move this forward.
/git merge master
Workflow run Error: Merge conflict detected, please resolve it using the command line.