-
Notifications
You must be signed in to change notification settings - Fork 212
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: only show audio message when track ID matches active #5305
base: main
Are you sure you want to change the base?
fix: only show audio message when track ID matches active #5305
Conversation
? t(`audioTrack.messages.${activeMediaStore.message}`) | ||
const message = computed(() => | ||
activeMediaStore.id === props.audio.id && activeMediaStore.message | ||
? i18n.t(`audioTrack.messages.${activeMediaStore.message}`).toString() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@obulat's comment #2202 (comment), although correct in terms of the changes, was a bit out of date. We can access t
directly as it has been defined in line 70. Also there is no longer a need to use .toString()
.
? i18n.t(`audioTrack.messages.${activeMediaStore.message}`).toString() | |
? t(`audioTrack.messages.${activeMediaStore.message}`) |
In fact, using i18n
introduces an error because that's an undefined variable.
Error: frontend types: src/components/VAudioTrack/VAudioTrack.vue(301,7): error TS2304: Cannot find name 'i18n'.
const message = computed(() => | ||
activeMediaStore.id === props.audio.id && activeMediaStore.message |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove trailing spaces.
Tip
This can be done automatically by setting up the pre-commit and pre-push Git hooks > or by running ov just lint
manually.
const message = computed(() => | |
activeMediaStore.id === props.audio.id && activeMediaStore.message | |
const message = computed(() => | |
activeMediaStore.id === props.audio.id && activeMediaStore.message |
Hey @dhruvkb, I've updated the PR based on your suggestions: 1.Removed .toString() as it's no longer needed. Please review and let me know if any other changes are needed. Thanks for the helpful feedback! |
Hey @dhruvkb, One check failed on my PR. Could you please take a look to help identify what needs to be fixed? |
@Anuj012004 thanks for incorporating the feedback from the PR review. The changes in your PR are correct, and you might have noticed that the previously failing Lint check has passed. However the PR is failing the unit tests defined in the file Now you would need to make changes to that file to rectify any incorrect test conditions, and run the tests locally with |
Hey @dhruvkb, |
Fixes #2202
Fixes #2202 by @obulat
Description
An audio-related error is observed across all audio cells in the content view. Specifically, all cells incorrectly display an error message regardless of their state. This occurs because the application does not validate whether the audio.id matches the activeMediaStore.id when setting the message. As a result, messages intended for the active audio track are incorrectly shown for all audio tracks.
Testing Instructions
Checklist
Update index.md
).main
) or a parent feature branch.ov just catalog/generate-docs
for catalogPRs) or the media properties generator (
ov just catalog/generate-docs media-props
for the catalog or
ov just api/generate-docs
for the API) where applicable.Developer Certificate of Origin
Developer Certificate of Origin