hajicj / rhythmify_frontend

0 stars 1 forks source link

Displaying alignments without a server request #15

Closed hajicj closed 2 years ago

hajicj commented 2 years ago

The AlignedComponent should be refactored so that it is possible to access the alignment UI in other ways than just making an alignment request to the back-end, e.g. uploading an alignment file.

hajicj commented 2 years ago

There should be two components. One is the AlignmentResultPage, which is accessed through the URL upon an alignment request from the ChantList as has been the case up until now. This acts as the wrapping component. The second component is the AlignmentComponent itself, which is responsible for displaying the alignment. (There may yet be a sub-hierarchy: AlignmentDisplayComponent, AlignmentControlsComponent, AlignedChantComponent, etc., but possibly also not, as there is a lot of synchronization across positions involved.

Come to think of it, the Alignment object might be a good place to implement some kind of position interface -- getting e.g. the range of the k-th syllable of the n-th word from the chant in the alignment, translating chant volpiano position to corresponding alpiano position and back, etc.

hajicj commented 2 years ago

Done for now. Further refactoring of the AlignedComponent, if necessary, into AlignmentControlsComponent etc., will be dealt with in separate issues.