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

Implement timelines for annotation and transcription 186955197 #544

Open
wants to merge 35 commits into
base: integration
Choose a base branch
from

Conversation

aaron-plahn
Copy link
Contributor

No description provided.

aaron-plahn and others added 30 commits December 20, 2023 12:11
* use media item IDs instead of URLs on photographs

* use media IDs on songs

* add comment about spatial feature properties image URL

* fix build

* remove time range context for songs

* update test setup for seed-test-data CLI command

* WIP[media-item-ids]: fix additional tests

* seed related audio item in translate song lyrics test
* docs(coscrad-frontend): add instructions for Redux DevTools

* WIP address PR comments

---------

Co-authored-by: yaanahuu2 <[email protected]>
* implement Term.fromEventHistory

* WIP Event source terms and use event sourcing for term tests

* fix command tests that involve terms

* opt out of auto-generated tests for event sourced terms (and vocabulary lists)

* support publication flow for terms

* support query access grants for terms

* rewrite grant resource read access to user test case with non-event sourced instance

* fix additional tests with term event sourcing

* skip obsolete test

* WIP[event source terms] fix additonal tests

* WIP[event source terms] fix a couple additional tests

* update base event payload interface

* fix base event interace

* add invalid cases to Term.fromEventHistory test

* refactor based on PR (#511)
* WIP: happy path for page content method

* WIP finalize validation and tests for translatePageContent

* add integration test for command

* finished fuzz test

* refactor based on PR (#512)

* update text file to use new base event api

---------

Co-authored-by: Blake Sellars <[email protected]>
* WIP implement Term.addAudio

* finish implementing Term.addAudio

* validate happy path

* WIP: integration test

* update valid test case

* finish integration test for add-audio-for-term

* add payload type test for add-audio-for-term

* update stale snapshots

* update stale snapshots

* include langauge code on add audio for term

* expose URL from media item in queries

---------

Co-authored-by: Aaron Plahn <[email protected]>
* WIP implement media ingester

* satisfy happy-path test

* remove legacy bilingual text property from media items

* fix some failing tests
* WIP prototype serving of protected static assets

* add happy path test

* ensure that url lines up with endpoint in media imports

* add comprehensive test coverage for binary media asset queries

* remove filepath from query response

* gitkeep the static asset directory

* create static assets dir if necessary in tests

* increase test timeout for **ingest-media-items** test

* fix test data setup

* fix removal of the filepath property from media item queries

* refactor based on PR (#516)
* WIP add failing test for **export-media-annotations**

* feat(coscrad-cli): introduce **export-media-annotations**
…ion (#520)

* feat(coscrad-cli): discover audio-visual media item lengths on ingestion

* update stale snapshot

* update another stale snapshot

* refactor: break out a separate MediaProber class

* refactor based on PR (#520)

* fix MediaItem.validateInvarints

* fix CreateVideo

* update default lengthMillisecond in CREATE_MEDIA_ITEM
* WIP feat(api): introduce CREATE_PHOTOGRAPH

* finish CREATE_PHOTOGRAPH integration test

* add payload type test for CREATE_PHOTOGRAPH

* update snapshot to include CREATE_PHOTOGRAPH schema

* import IDGenerationModule into PhotographModule

* fix invalid references in photograph test data

* refactor based on PR (#521)
* feat(coscrad-cli): create resoruces for media items in **ingest-media-items**

* feat(coscrad-cli): create resources in **ingest-media-items**
…tems** (#524)

* feat(coscrad-cli): discover photograph dimensions in **ingest-media-items**

* update stale snapshots

* refactor based on PR (#524)

* fix media probe for duration
* add multilingual audio

* introduce audio for digital text pages

* WIP happy path for add audio for page

* fix happy path test for ADD_AUDIO_FOR_DIGITAL_TEXT_PAGE

* add invalid test cases for add audio to digital text page

* refactor based on PR (#525)

* update test data with empty multilingual audio for pages

* fix stale snapshots

---------

Co-authored-by: Aaron Plahn <[email protected]>
…citations (#527)

* feat: update all (including user-facing) references to bibliogrpahic citations

* fix test setup for bibliographic citations

* refactor based on PR (#527)
* refactor(api): leverage multilingual audio for terms

* opt-out of stale migration tests

* relax types in stale migration code

* update CREATE_PROMPT_TERM handler to support multilingual audio

* update stale snapshot
…sourcing logic (#531)

* implement simpler pattern for organizing domain event sourcing logic

* append event to history automatically when applying an event
* feat(api): remove redundant book resource

* test(coscrad-frontend): remove reference to old book model in test

* loosen interface and fix build

* fix some types

* update stale snapshots and fix test data

* fix additional tests

* remove identity context

* fix some tests

* update tests to support changes to category test data
…ting command streams (#538)

* updated execute-event-stream to support streams for multiple aggregate roots

* refactor based on PR (#538)

---------

Co-authored-by: yaanahuu2 <[email protected]>
Co-authored-by: Aaron Plahn <[email protected]>
* WIP: create menu component and api call

* WIP: pull API url from config

* WIP: update api url
* refactor(api): use new pattern to event source digital texts

* implement event handler for digital text title translated

* implement update method

* implement invalid test cases for translateTitle update method

* add happy integration test for translate digital text title

* added invalid test cases for translte digital text title

* added validation and fuzz test for translate digital text title

* removed comments

* refactor based on PR (#537)

* fix some tests

* use event sourcing for digital text test data setup

* refactor TestEventStream and fix duplicate append event calls for Term

* fix reference errors in updated digital text test data

* update stale snapshots

* update additional snapshots

* update additional stale snapshots

---------

Co-authored-by: Aaron Plahn <[email protected]>
* WIP introduce create audio annotation note

* WIP submit annotation note immersive form

* WIP begin adding cypress test and troubleshoot

* fix issue with media item test data in cypress test

* WIP re-work cypress test to add login

* WIP expand test and format context

* WIP update audio annotator appearance

* WIP remove testData.json from git index

* WIP fix cypress user issue and command stream

* repair git history

* test for time range values in annotation

* add ui feedback and test

* break out component for annotator and form

* fix max depth issue with nested annotator component

* show acknowledge button in immersive form

* modify keydown to exclude meta keys

* remove unnecessary hook and disable command panel for audio item page

* update component test, break out types, and git ignore test data

---------

Co-authored-by: yaanahuu2 <[email protected]>
Co-authored-by: Aaron Plahn <[email protected]>
* handle VocabularyListCreated

* WIP Add vocabulary list test events to TestEventStream

* finalize VocabularyList.fromEventHistory

* update API for VocabularyList.registerFilterProperty
* WIP: implement carousel with alphabet cards

* WIP: changes from PR

* WIP: add detox tests
* add happy path test for DigtalText.addAudioForTitle

* add invalid path test for DigtalText.addAudioForTitle

* WIP: digital text from event history test

* implement event sourcing for AUDIO_ADDED_FOR_DIGITAL_TEXT_TITLE

* add happy path test for add-audio-for-digital-text-title

* add invalid test cases for add-audio-for-digital-text-title

* add payload type and fuzz test for add-audio-for-digital-text-title

* Fixed mistake for add-audio-for-digital-text-title

* add second valid test case for audio that targets title translation

* refactor for add-audio-for-digital-text-title

* create test data directory if necessary before writing

* fix issue with creating test data directory

---------

Co-authored-by: Aaron Plahn <[email protected]>
* implement DigitalText.addPhotographToPage

* add handler for PHOTOGRAPH_ADDED_TO_DIGITAL_TEXT_PAGE

* add happy path test ADD_PHOTOGRAPH_TO_DIGITAL_TEXT_PAGE

* add invalid test cases

* add type validation test ADD_PHOTOGRAPH_TO_DIGITAL_TEXT_PAGE

* fix tests for ADD_PHOTOGRAPH_TO_DIGITAL_TEXT_PAGE
Copy link
Collaborator

@yaanahuu2 yaanahuu2 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, awesome to see this take shape

@@ -158,6 +160,22 @@ export class EdgeConnection extends Aggregate {
);
}

isAudioVisualAnnotation(): boolean {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Excellent!

@@ -202,7 +213,13 @@ describe('the audio annotation process', () => {

describe(`before the successful command is acknowledged`, () => {
beforeEach(() => {
steps.apply([setTimeRange, fillTextForm, chooseLanguage, submitForm]);
steps.apply([
Copy link
Collaborator

Choose a reason for hiding this comment

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

Love the steps!


const nubmerOfNotes = 5;

const langaugeCodeForNotes = LanguageCode.Chilcotin;
Copy link
Collaborator

Choose a reason for hiding this comment

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

(sp) langaugeCodeForNotes

* video annotation?
*/
return [
buildTimelineMark({
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would imagine this as just a vertical line that then becomes the left hand side of a rectangle when the time range is fully selected. That way you can see the full selection and like we talked about it could have a transparency.

name: string;
}

export const Timeline = ({ marks, defaultValue, step, min, max, name }: TimelineProps) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

So here, if I switch out the MUI slider for a custom timeline component, this API would change

/**
* Just the notes that use time range context.
*/
annotations: INoteViewModel[];
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice!

* freedom to syncronize state between the audio element and ad-hoc command
* forms.
*/
audioRef: RefObject<HTMLAudioElement>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

from my reading and prototyping the custom timeline, useRef can also be used for grabbing information about the layout of a div. I'll be interested to see if that will work in our context.

Copy link

sonarqubecloud bot commented Feb 6, 2024

Quality Gate Failed Quality Gate failed

Failed conditions

B Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

idea Catch issues before they fail your Quality Gate with our IDE extension SonarLint SonarLint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants