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: LEAP-1490: Fix AudioUltra working with relations and comments #6494

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Gondragos
Copy link
Collaborator

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

(link to issue, supportive screenshots etc.)

What does this fix?

(if this is a bug fix)

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)

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.)

@github-actions github-actions bot added the fix label Oct 9, 2024
Copy link

netlify bot commented Oct 9, 2024

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit f46fe88
🔍 Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/6706a798c994ba000856ef57

Copy link

netlify bot commented Oct 9, 2024

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

Name Link
🔨 Latest commit f46fe88
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/6706a798f4e6a20008b686b8

@@ -131,6 +132,9 @@ export const AudioModel = types.compose(
})
.volatile(() => ({
errors: [],
stageRef: createRef(),
_ws: null,
_wf_frame: null,
Copy link
Contributor

@bmartel bmartel Oct 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_wf_frame: null,
_wfFrame: null,

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know there was historically a _ws_region which likely influenced this naming, but that was a mistake it should have been camelCase not snake_case. I don't know how ingrained _ws_region is already, but if at all possible could we rename both of these to camelCase like _wfFrame and _wsRegion.

@@ -534,6 +538,9 @@ export const AudioModel = types.compose(
console.warn("Already destroyed");
}
},
setWFFrame(frame) {
self._wf_frame = frame;
Copy link
Contributor

@bmartel bmartel Oct 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self._wf_frame = frame;
self._wfFrame = frame;

}))
.views((self) => ({
get bboxTriggers() {
return [self.start, self.end, self._ws_region, self.object?._ws, self.object?._wf_frame];
Copy link
Contributor

@bmartel bmartel Oct 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return [self.start, self.end, self._ws_region, self.object?._ws, self.object?._wf_frame];
return [self.start, self.end, self._wsRegion, self.object?._ws, self.object?._wfFrame];

@@ -143,5 +166,14 @@ export const AudioUltraRegionModel = types
self.updatePosition();
}
},

setWSRegion(wsRegion) {
self._ws_region = wsRegion;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self._ws_region = wsRegion;
self._wsRegion = wsRegion;

Comment on lines +31 to +33
const { _ws_region } = self;
if (!_ws_region) return null;
if (!_ws_region.inViewport) return null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const { _ws_region } = self;
if (!_ws_region) return null;
if (!_ws_region.inViewport) return null;
const { _wsRregion } = self;
if (!_wsRegion) return null;
if (!_wsRegion.inViewport) return null;

Copy link
Contributor

@bmartel bmartel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great 😎, just a suggestion on the snake_case -> camelCase, but logically speaking that won't affect this getting tested. Accidentally approved prematurely, taking this back to when the PR is considered for review officially.

@bmartel bmartel self-requested a review October 9, 2024 19:00
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.

2 participants