Skip to content

Commit e7d90fd

Browse files
authored
Revert "feat: Add audio description functionality to video editor (#91)" (#93)
This reverts commit 0b58258.
1 parent ac4f1bd commit e7d90fd

31 files changed

Lines changed: 48 additions & 1399 deletions

File tree

src/data/api.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ export const waffleFlagDefaults = {
5353
useNewGroupConfigurationsPage: true,
5454
useReactMarkdownEditor: true,
5555
useVideoGalleryFlow: false,
56-
enableAudioDescription: false,
5756
} as const;
5857

5958
export type WaffleFlagName = keyof typeof waffleFlagDefaults;

src/editors/EditorContext.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ export interface EditorContext {
1515
learningContextId: string;
1616
/** Is the so-called "Markdown" problem editor available in this learning context? */
1717
isMarkdownEditorEnabledForContext: boolean;
18-
/** Is the audio description upload widget enabled for the current learning context? */
19-
isAudioDescriptionEnabled: boolean;
2018
}
2119

2220
export type EditorContextInit = {
@@ -40,19 +38,15 @@ export const EditorContextProvider: React.FC<{ children: React.ReactNode; } & Ed
4038
learningContextId,
4139
}) => {
4240
const courseIdIfCourse = isCourseKey(learningContextId) ? learningContextId : undefined;
43-
const waffleFlags = useWaffleFlags(courseIdIfCourse);
44-
const isMarkdownEditorEnabledForContext = waffleFlags.useReactMarkdownEditor;
45-
const isAudioDescriptionEnabled = waffleFlags.enableAudioDescription;
41+
const isMarkdownEditorEnabledForContext = useWaffleFlags(courseIdIfCourse).useReactMarkdownEditor;
4642

4743
const ctx: EditorContext = React.useMemo(() => ({
4844
learningContextId,
4945
isMarkdownEditorEnabledForContext,
50-
isAudioDescriptionEnabled,
5146
}), [
5247
// Dependencies - make sure we update the context object if any of these values change:
5348
learningContextId,
5449
isMarkdownEditorEnabledForContext,
55-
isAudioDescriptionEnabled,
5650
]);
5751
return <context.Provider value={ctx}>{children}</context.Provider>;
5852
};

src/editors/containers/VideoEditor/components/VideoEditorModal.test.tsx

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ import { IntlProvider } from '@edx/frontend-platform/i18n';
66
import { initializeMockApp } from '@edx/frontend-platform';
77
import VideoEditorModal from './VideoEditorModal';
88
import { thunkActions } from '../../../data/redux';
9-
import { EditorContextProvider } from '../../../EditorContext';
10-
import { mockWaffleFlags } from '../../../../data/apiHooks.mock';
119

1210
jest.mock('../../../data/redux', () => ({
1311
...jest.requireActual('../../../data/redux'),
@@ -20,8 +18,6 @@ jest.mock('../../../data/redux', () => ({
2018
},
2119
}));
2220

23-
mockWaffleFlags();
24-
2521
describe('VideoUploader', () => {
2622
let store;
2723

@@ -40,8 +36,6 @@ describe('VideoUploader', () => {
4036
uploadTranscript: { status: 'inactive' },
4137
deleteTranscript: { status: 'inactive' },
4238
fetchVideos: { status: 'inactive' },
43-
uploadAudioDescription: { status: 'inactive' },
44-
deleteAudioDescription: { status: 'inactive' },
4539
},
4640
video: {
4741
videoSource: '',
@@ -59,7 +53,6 @@ describe('VideoUploader', () => {
5953
stopTime: '00:00:00',
6054
total: '00:00:00',
6155
},
62-
audioDescriptionUrl: '',
6356
},
6457
},
6558
});
@@ -76,15 +69,13 @@ describe('VideoUploader', () => {
7669
const renderComponent = async () => render(
7770
<AppProvider store={store} wrapWithRouter={false}>
7871
<IntlProvider locale="en">
79-
<EditorContextProvider learningContextId="course-v1:test+test+test">
80-
<MemoryRouter
81-
initialEntries={[
82-
'/some/path?selectedVideoId=id_1&selectedVideoUrl=https://video.com',
83-
]}
84-
>
85-
<VideoEditorModal isLibrary={false} />
86-
</MemoryRouter>
87-
</EditorContextProvider>
72+
<MemoryRouter
73+
initialEntries={[
74+
'/some/path?selectedVideoId=id_1&selectedVideoUrl=https://video.com',
75+
]}
76+
>
77+
<VideoEditorModal isLibrary={false} />
78+
</MemoryRouter>
8879
</IntlProvider>
8980
</AppProvider>,
9081
);

src/editors/containers/VideoEditor/components/VideoSettingsModal/components/AudioDescriptionWidget/hooks.jsx

Lines changed: 0 additions & 84 deletions
This file was deleted.

0 commit comments

Comments
 (0)