Skip to content
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

fix: OPTIC-1125: Label config preview always showing a step behind when making updates #6417

Merged
merged 9 commits into from
Sep 25, 2024

Conversation

bmartel
Copy link
Contributor

@bmartel bmartel commented Sep 20, 2024

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
  • Backend (Database)
  • Backend (API)
  • Frontend

Describe the reason for change

The change originally made to fix an issue with taxonomy loading after updating the Label Config made it such that the preview was always a step behind changes that were made by the user. This addresses this by moving all the associated logic of updating and initializing to the same useEffect.

The following now occurs:

  • Only a single initialization takes place for the preview
  • Updates apply consistently on change of either config or task data.
  • Only a single destroy will take place when the preview unmounts (important fix to the original issue!)

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?

Label Config Preview

Copy link

netlify bot commented Sep 20, 2024

Deploy Preview for label-studio-docs-new-theme canceled.

Name Link
🔨 Latest commit 35555fd
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/66f3242475ef2000081a258f

Copy link

netlify bot commented Sep 20, 2024

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit 35555fd
🔍 Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/66f3242439b5ea000890f7a7

@yyassi-heartex
Copy link
Contributor

yyassi-heartex commented Sep 24, 2024

/git merge develop

Workflow run
Successfully merged: create mode 100644 web/libs/editor/src/stores/Comment/Anchor.js

@hlomzik hlomzik merged commit 08b2ea4 into develop Sep 25, 2024
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants