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

Add caption support with new models, vuex, and edit modal integration #4151

Open
wants to merge 264 commits into
base: gsoc/transcription
Choose a base branch
from

Conversation

akash5100
Copy link
Contributor

@akash5100 akash5100 commented Jun 19, 2023

Summary

Description of the change(s) you made

This PR adds caption files and cues models leveraging the change event architecture. It also:

Frontend

  • Adds a new Captions tab to the edit modal for managing and generating captions, visually controlled by feature flags
  • A new "caption" directory has been added under channelEdit vuex to manage the state for captions. Which is integrated into the EditModal and EditList components.

Backend

  • Adds support for captions by introducing new CaptionFile and CaptionCue models. The models leverage the change event architecture to track changes.
  • Tests have been added for the DRF endpoint to ensure it works properly with the sync API architecture.

Manual verification steps

TODO

References

Comments


Contributor's Checklist

PR process:

  • If this is an important user-facing change, PR or related issue the CHANGELOG label been added to this PR. Note: items with this label will be added to the CHANGELOG at a later time
  • If this includes an internal dependency change, a link to the diff is provided
  • The docs label has been added if this introduces a change that needs to be updated in the user docs?
  • If any Python requirements have changed, the updated requirements.txt files also included in this PR
  • Opportunities for using Google Analytics here are noted
  • Migrations are safe for a large db

Studio-specifc:

  • All user-facing strings are translated properly
  • The notranslate class been added to elements that shouldn't be translated by Google Chrome's automatic translation feature (e.g. icons, user-generated text)
  • All UI components are LTR and RTL compliant
  • Views are organized into pages, components, and layouts directories as described in the docs
  • Users' storage used is recalculated properly on any changes to main tree files
  • If there new ways this uses user data that needs to be factored into our Privacy Policy, it has been noted.

Testing:

  • Code is clean and well-commented
  • Contributor has fully tested the PR manually
  • If there are any front-end changes, before/after screenshots are included
  • Critical user journeys are covered by Gherkin stories
  • Any new interactions have been added to the QA Sheet
  • Critical and brittle code paths are covered by unit tests

Reviewer's Checklist

This section is for reviewers to fill out.

  • Automated test coverage is satisfactory
  • PR is fully functional
  • PR has been tested for accessibility regressions
  • External dependency files were updated if necessary (yarn and pip)
  • Documentation is updated
  • Contributor is in AUTHORS.md

@akash5100 akash5100 changed the title Caption model Add caption support with new models, vuex, and edit modal integration Jul 17, 2023
dependabot bot and others added 29 commits July 27, 2023 23:57
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](npm/node-semver@v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [fonttools](https://github.com/fonttools/fonttools) from 4.27.1 to 4.40.0.
- [Release notes](https://github.com/fonttools/fonttools/releases)
- [Changelog](https://github.com/fonttools/fonttools/blob/main/NEWS.rst)
- [Commits](fonttools/fonttools@4.27.1...4.40.0)

---
updated-dependencies:
- dependency-name: fonttools
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [workbox-precaching](https://github.com/googlechrome/workbox) from 6.5.4 to 7.0.0.
- [Release notes](https://github.com/googlechrome/workbox/releases)
- [Commits](GoogleChrome/workbox@v6.5.4...v7.0.0)

---
updated-dependencies:
- dependency-name: workbox-precaching
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@akash5100 akash5100 marked this pull request as ready for review November 1, 2023 17:44
contentcuration/contentcuration/viewsets/caption.py Outdated Show resolved Hide resolved
queryset = queryset.filter(file_id__in=file_ids)

if file_id:
queryset = queryset.filter(file_id=file_id)
Copy link
Member

Choose a reason for hiding this comment

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

Similarly to the above comment, could you also check File.filter_edit_queryset here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

        if file_id:
            allowed_file_id = set(
                File.filter_edit_queryset(
                    File.objects.get(pk=file_id), self.request.user
                )
                .values_list("id", flat=True)
            )
            queryset = queryset.filter(file_id=allowed_file_id)

Please check this.

I think there won't be comma seperated file_ids. (we don't actually use this query for now)

requirements.in Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants