Skip to content

Alex/multiple transcripts editor#2899

Merged
auraz merged 1 commit intomasterfrom
alex/multiple_transcripts_editor
Mar 31, 2014
Merged

Alex/multiple transcripts editor#2899
auraz merged 1 commit intomasterfrom
alex/multiple_transcripts_editor

Conversation

@auraz
Copy link
Contributor

@auraz auraz commented Mar 11, 2014

Create an upload modal for video transcript translations (BLD-751: https://edx-wiki.atlassian.net/browse/BLD-751).
screen shot 2014-03-24 at 10 00 05

@cahrens please review
@valera-rozuvan please review
@frrrances please review
@dmitchell please review.
@olmar please review python part

@auraz
Copy link
Contributor Author

auraz commented Mar 14, 2014

@polesye fixed: I think should be

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fix typo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

FIxed

@auraz
Copy link
Contributor Author

auraz commented Mar 21, 2014

Fully covered:
common/lib/xmodule/xmodule/video_module/video_xfields.py (100%)
common/lib/xmodule/xmodule/video_module/video_module.py (100%)
cms/djangoapps/contentstore/views/transcripts_ajax.py 100%

Diff LMS/CMS/XModule coverage:

common/lib/xmodule/xmodule/video_module/transcripts_utils.py (>90%): Missing line(s) 344, 547
common/lib/xmodule/xmodule/video_module/video_handlers.py (
>80%): Missing line(s) 204, 237, 337, 251, 253, 254

Result => 94%

@dmitchell
Copy link
Contributor

Wow, this is huge! How urgent is this?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a bit confused as to why it defaults to uk on the double uploads below but is sticky with the existing zh here. I suppose my real question is whether the double upload tests should do something to ensure the selected language is uk or is it purely a matter of the order in the listing and is that order predictable and guaranteed?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a bit confused as to why it defaults to uk on the double uploads below but is sticky with the existing zh here. I suppose my real question is whether the double upload tests should do something to ensure the selected language is uk or is it purely a matter of the order in the listing and is that order predictable and guaranteed?

To make sure that after editing previously created video module and adding new translations will not change currently used translation.
As you can see in this test, we have created video module with chinese translation and then edit this module by adding new translation.
Logic is here

@auraz
Copy link
Contributor Author

auraz commented Mar 24, 2014

@dmitchell This PR seems to be huge, but really is not so. On python part, video module was split into smaller files for simpler code support, and so we have many additions, but the code is not so changed actually:

  1. XFields from video module were moved to separate file video_xfields.py
  2. All XBllock handlers from video_module were moved to separate file: video_handlers.py. All tests for video handlers were moved to test_video_handlers.py.
  3. New handler for Studio and tests for it were written: see VideoStudioViewHandlers class. This is main addition to python code part in this PR.

Urgency: I think it would be nice to merge it this week, so you have today and tomorrow for sure to review it, so we will have rest of week to address your comments)))

@polesye
Copy link
Contributor

polesye commented Mar 24, 2014

@cahrens FYI: I extended File uploader to make it works with srt files, because current validation by mime type doesn't work for this filetype (file.type equal '' and srt doesn't exist in mime types list).

@cahrens
Copy link

cahrens commented Mar 24, 2014

It would be nice if the error handling was better when you select a language for a transcript, but then never upload the transcript. Right now you get the error bar at the bottom and a "broken editor" when you hit Save.

Copy link

Choose a reason for hiding this comment

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

This test would be easier to understand if it said it was replacing the transcript file, instead of uploading (in this case, you press the Replace button, correct)? If the implementation of the step is correct, perhaps you can map 2 different BDD descriptions to the same method?

Copy link
Contributor

Choose a reason for hiding this comment

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

This test would be easier to understand if it said it was replacing the transcript file, instead of uploading (in this case, you press the Replace button, correct)? If the implementation of the step is correct, perhaps you can map 2 different BDD descriptions to the same method?

Done.

@cahrens
Copy link

cahrens commented Mar 24, 2014

Given the large number of new Lettuce tests (which I whole-heartedly applaud), I'd recommend having @jzoldak code review the tests.

Copy link

Choose a reason for hiding this comment

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

Why is the option disabled in this case? I thought this code was filtering to the values passed in.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why is the option disabled in this case? I thought this code was filtering to the values passed in.

I have renamed this function. We just disable previously selected options.

@cahrens
Copy link

cahrens commented Mar 24, 2014

I have reviewed the JavaScript files and the things that impact the metadata editor. I don't have enough context to figure out what changed and what did not in the xmodule video Python code. I think that is better reviewed by other Blades folks. And I don't know anything about the LMS tests, so I am also not reviewing those changes. If there is someone who is familiar with those tests, please tag them to review.

@polesye
Copy link
Contributor

polesye commented Mar 25, 2014

@jzoldak please also review this PR.

@marcotuts
Copy link
Contributor

@auraz - Just as a follow-on to the error message @Lyla-Fischer mentioned above. I can see how the red error text/bar Studio renders may not be possible to modify/adjust the text for in this PR. The text inside the upload modal that reads "We're sorry, there was an error" would be great to update to what Lyla suggested: " Sorry, there was an error parsing the subtitles that you uploaded. Please check the format and try again."

@auraz
Copy link
Contributor Author

auraz commented Mar 26, 2014

@Lyla-Fischer There will be this same message for all kind of exceptions. It is fine? Otherwise solving this will require proxy exception text from Studio to uploader snippet. I think @polesye use existing Studio snippet which does not allow this.

@auraz
Copy link
Contributor Author

auraz commented Mar 26, 2014

@Lyla-Fischer @marcotuts Ok, will change, thank you!

@Lyla-Fischer
Copy link

Don't change it if it is going to be wrong in other aspects of the system... Is it possible to make it effect only this one upload?

@auraz
Copy link
Contributor Author

auraz commented Mar 26, 2014

@Lyla-Fischer Sure! (What I mean, that this particular upload handler in video player can possibly show different specific kinds of exceptions during SRT uploading.)

@Lyla-Fischer
Copy link

Okay. Thanks for the clarification.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would suggest using the %cont-truncated mixin, eliminating the need for the text-overflow and overflow rules here. (see _mixins.scss, line 311).

Copy link
Contributor

Choose a reason for hiding this comment

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

I would suggest using the %cont-truncated mixin, eliminating the need for the text-overflow and overflow rules here. (see _mixins.scss, line 311).

Fixed.

@polesye
Copy link
Contributor

polesye commented Mar 27, 2014

would be great to update to what Lyla suggested: " Sorry, there was an error parsing the subtitles that you uploaded. Please check the format and try again."

Done.

@polesye
Copy link
Contributor

polesye commented Mar 27, 2014

@dmitchell , @cahrens , @marcotuts , @jzoldak , @valera-rozuvan all comments are addressed. Please continue review.

@valera-rozuvan
Copy link
Contributor

👍 Good to merge!

Copy link
Contributor

Choose a reason for hiding this comment

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

this width rule should be 45%, and .metadata-video-translations .create-setting should have a width of 100% not 88%. This ensures the button is the same width as the other list input button styles.

Copy link
Contributor

Choose a reason for hiding this comment

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

this width rule should be 45%, and .metadata-video-translations .create-setting should have a width of 100% not 88%. This ensures the button is the same width as the other list input button styles.

Done.

@marcotuts
Copy link
Contributor

I just tested with the latest, and the only bit that caught my eye that I think would be worth adjusting is some of the CSS for the list block as a whole.

This link shows the difference between the existing list setting styling and the new styling introduced in this PR. https://www.dropbox.com/s/3qjhgh5eibsgvgw/Screenshot%202014-03-27%2011.07.54.png

It would be great to sync up the alignment and input field sizing to what we have for the Video Sources setting.

Edit: In order to be more specific at the changes I'm suggesting:
1.) Width of input field should shrink down a bit to match existing Video Sources Setting.
2.) margin-right on input field to separate out the X icon a bit more should be added.
3.) This should cause the revert arrow icon to line up vertically with the one from the Video Sources (and other) settings as well.

@polesye
Copy link
Contributor

polesye commented Mar 28, 2014

@marcotuts your comments are addressed.

@dmitchell
Copy link
Contributor

I haven't thoroughly reviewed this but don't want to hold it up. If others accept it, go ahead.

@cahrens
Copy link

cahrens commented Mar 28, 2014

@polesye Why is the code coverage so low (video_module, video_handlers, transcript_utils)? Is the report not accurate?

https://jenkins.testeng.edx.org/job/edx-platform-report/3823/Diff_Coverage_Report/?

@marcotuts
Copy link
Contributor

@polesye - the changes are great thanks for addressing that.

👍 from an HTML,CSS perspective.

@polesye
Copy link
Contributor

polesye commented Mar 28, 2014

@cahrens As @auraz mentioned previously an actual coverage for python part is about 94%.

Video player module has tests which run in different runtimes: CMS, LMS, and xmodule.
For this 3 runtimes there are exist 3 different coverage.rc files.
But only one of them is used to show video module coverage.
Therefore all PR's for video player show wrong coverage.
@jzoldak was informed about it.

@cahrens
Copy link

cahrens commented Mar 28, 2014

Thank you for the information. I haven't had a chance to check this out again and review, but if you feel that the files have had adequate reviews by others, go ahead and merge when you are ready.

@jzoldak
Copy link
Contributor

jzoldak commented Mar 28, 2014

@polesye unfortunately I don't have enough time to review thoroughly today and I'll be out on Monday and Tuesday. Can you please make sure that all the new lettuce tests run reliably before merging in and also keep an eye out for failures after this gets merged in? thx.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible not to overwrite content here? This can help when debugging.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please clarify. Let's talk about this bit later.

@olmar
Copy link
Contributor

olmar commented Mar 31, 2014

👍

Fix donwload subs for non youtube videos and non-en language - continue.
Add acceptance tests.
Add detetion of assets on request.
Updated docstring.
Add fixes and acceptance tests.
Fix acceptance tests.
Update docsrtings and cleanup code, resful for language_id.
Specify exception type in POST.
Fix url in upload module.
Improve exception handling.
Remove 'en' and catching in editable_metadata.
Move descriptor.get_context test to lms tests.
Add query parameter to translation dispatch.
Response to format parameter of translatin GET request.
Fix Acceprance test: Metadata Editor.
move handlers to proper scores.
Split video player into smaller files.
Add ugettext and fix typoes.
Add changelog.
Support for downloading non-ascii filenames.
Change event binding.
Add content-language to download requests.
Reractor POST handler to not update self.transcripts.
@auraz
Copy link
Contributor Author

auraz commented Mar 31, 2014

Only single flaky test is failing (acid_xblock). I'm going to merge it, as this test is confirmed to be flaky (See conversation in testeng room today, at 19:22 GMT+2)

auraz added a commit that referenced this pull request Mar 31, 2014
@auraz auraz merged commit b3f479c into master Mar 31, 2014
@auraz auraz deleted the alex/multiple_transcripts_editor branch March 31, 2014 16:28
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.

9 participants