From 15393f3da14e60a8893adbd04a61b1f74700c38e Mon Sep 17 00:00:00 2001 From: XnpioChV Date: Mon, 24 Apr 2023 18:06:50 -0500 Subject: [PATCH] style: Fixing styles on gallery, editor and uploader video page --- package-lock.json | 2 +- .../__snapshots__/index.test.jsx.snap | 21 +++++-- .../LanguageNamesWidget.jsx | 6 +- .../components/VideoSettingsModal/index.jsx | 12 ++-- src/editors/containers/VideoEditor/index.jsx | 18 ++++-- .../__snapshots__/index.test.jsx.snap | 56 +++++++++++-------- .../containers/VideoUploadEditor/index.jsx | 26 +++++---- .../containers/VideoUploadEditor/index.scss | 5 ++ .../data/redux/thunkActions/video.test.js | 7 +++ .../__snapshots__/index.test.jsx.snap | 3 +- .../sharedComponents/BaseModal/index.jsx | 2 +- .../SelectionModal/Gallery.jsx | 6 +- .../SelectionModal/GalleryCard.jsx | 32 ++++++++--- .../SelectionModal/SearchSort.jsx | 6 +- .../__snapshots__/Gallery.test.jsx.snap | 6 +- .../__snapshots__/GalleryCard.test.jsx.snap | 15 ++++- .../__snapshots__/SearchSort.test.jsx.snap | 8 +++ .../sharedComponents/SelectionModal/index.jsx | 16 ++++-- 18 files changed, 168 insertions(+), 79 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0828bba6a..dc17aa36b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47382,4 +47382,4 @@ "dev": true } } -} \ No newline at end of file +} diff --git a/src/editors/containers/VideoEditor/__snapshots__/index.test.jsx.snap b/src/editors/containers/VideoEditor/__snapshots__/index.test.jsx.snap index 4228e5ac6..beddeae9e 100644 --- a/src/editors/containers/VideoEditor/__snapshots__/index.test.jsx.snap +++ b/src/editors/containers/VideoEditor/__snapshots__/index.test.jsx.snap @@ -8,11 +8,22 @@ exports[`VideoEditor snapshots renders as expected with default behavior 1`] = ` onClose={[MockFunction props.onClose]} validateEntry={[MockFunction validateEntry]} > - +
+ +
`; diff --git a/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/VideoPreviewWidget/LanguageNamesWidget.jsx b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/VideoPreviewWidget/LanguageNamesWidget.jsx index 2fabd32cb..79333e689 100644 --- a/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/VideoPreviewWidget/LanguageNamesWidget.jsx +++ b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/VideoPreviewWidget/LanguageNamesWidget.jsx @@ -10,18 +10,16 @@ export const LanguageNamesWidget = ({ transcripts, intl }) => { let icon = ClosedCaptionOff; const hasTranscripts = transcriptHooks.hasTranscripts(transcripts); let message = intl.formatMessage(messages.noTranscriptsAdded); - let fontClass = 'text-gray'; if (hasTranscripts) { message = transcriptHooks.transcriptLanguages(transcripts, intl); - fontClass = 'text-primary'; icon = ClosedCaption; } return (
- - {message} + + {message}
); }; diff --git a/src/editors/containers/VideoEditor/components/VideoSettingsModal/index.jsx b/src/editors/containers/VideoEditor/components/VideoSettingsModal/index.jsx index af7a8a90f..c46e1dea4 100644 --- a/src/editors/containers/VideoEditor/components/VideoSettingsModal/index.jsx +++ b/src/editors/containers/VideoEditor/components/VideoSettingsModal/index.jsx @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { Button } from '@edx/paragon'; +import { Button, Icon } from '@edx/paragon'; import { ArrowBackIos } from '@edx/paragon/icons'; import { FormattedMessage, @@ -24,12 +24,16 @@ export const VideoSettingsModal = ({ }) => ( <> diff --git a/src/editors/containers/VideoEditor/index.jsx b/src/editors/containers/VideoEditor/index.jsx index 4e8c9d33c..d0eb74610 100644 --- a/src/editors/containers/VideoEditor/index.jsx +++ b/src/editors/containers/VideoEditor/index.jsx @@ -38,11 +38,19 @@ export const VideoEditor = ({ ) : ( - +
+ +
)} diff --git a/src/editors/containers/VideoUploadEditor/__snapshots__/index.test.jsx.snap b/src/editors/containers/VideoUploadEditor/__snapshots__/index.test.jsx.snap index 397e908b3..76b3b224e 100644 --- a/src/editors/containers/VideoUploadEditor/__snapshots__/index.test.jsx.snap +++ b/src/editors/containers/VideoUploadEditor/__snapshots__/index.test.jsx.snap @@ -62,21 +62,25 @@ exports[`VideoUploadEditor renders without errors 1`] = ` />
- - + +
@@ -135,21 +139,25 @@ exports[`VideoUploader renders without errors 1`] = ` />
- - + +
diff --git a/src/editors/containers/VideoUploadEditor/index.jsx b/src/editors/containers/VideoUploadEditor/index.jsx index 71b2ce68d..726327fcf 100644 --- a/src/editors/containers/VideoUploadEditor/index.jsx +++ b/src/editors/containers/VideoUploadEditor/index.jsx @@ -60,18 +60,20 @@ export const VideoUploader = ({ onUpload, errorMessage }) => { -
- e.key === 'Enter' && handleSaveButtonClick()} - onClick={(event) => event.preventDefault()} - /> - +
+
+ e.key === 'Enter' && handleSaveButtonClick()} + onClick={(event) => event.preventDefault()} + /> + +
); diff --git a/src/editors/containers/VideoUploadEditor/index.scss b/src/editors/containers/VideoUploadEditor/index.scss index f94935505..b48aa025e 100644 --- a/src/editors/containers/VideoUploadEditor/index.scss +++ b/src/editors/containers/VideoUploadEditor/index.scss @@ -11,6 +11,11 @@ } } +.video-id-container { + width: 100%; + justify-content: center; +} + .video-id-prompt { position: absolute; top: 68%; diff --git a/src/editors/data/redux/thunkActions/video.test.js b/src/editors/data/redux/thunkActions/video.test.js index edb211f6c..841cb2b36 100644 --- a/src/editors/data/redux/thunkActions/video.test.js +++ b/src/editors/data/redux/thunkActions/video.test.js @@ -284,6 +284,10 @@ describe('video thunkActions', () => { stopTime: testMetadata.end_time, total: 0, }, + allowVideoSharing: { + level: 'course', + value: true, + }, handout: testMetadata.handout, licenseType: 'liCENSEtyPe', licenseDetails: { @@ -292,6 +296,9 @@ describe('video thunkActions', () => { noDerivatives: true, shareAlike: false, }, + selectedVideoTranscriptUrls: undefined, + videoSharingEnabledForCourse: undefined, + videoSharingLearnMoreLink: 'SomEUrL.Com', courseLicenseType: 'liCENSEtyPe', courseLicenseDetails: { attribution: true, diff --git a/src/editors/sharedComponents/BaseModal/__snapshots__/index.test.jsx.snap b/src/editors/sharedComponents/BaseModal/__snapshots__/index.test.jsx.snap index 00d2ed5d9..aee237271 100644 --- a/src/editors/sharedComponents/BaseModal/__snapshots__/index.test.jsx.snap +++ b/src/editors/sharedComponents/BaseModal/__snapshots__/index.test.jsx.snap @@ -13,7 +13,8 @@ exports[`BaseModal ImageUploadModal template component snapshot 1`] = ` diff --git a/src/editors/sharedComponents/BaseModal/index.jsx b/src/editors/sharedComponents/BaseModal/index.jsx index 66521fcb7..38fe4ad51 100644 --- a/src/editors/sharedComponents/BaseModal/index.jsx +++ b/src/editors/sharedComponents/BaseModal/index.jsx @@ -30,7 +30,7 @@ export const BaseModal = ({ isFullscreenOnMobile isFullscreenScroll={isFullscreenScroll} > - + {title} diff --git a/src/editors/sharedComponents/SelectionModal/Gallery.jsx b/src/editors/sharedComponents/SelectionModal/Gallery.jsx index e497a40c2..506448705 100644 --- a/src/editors/sharedComponents/SelectionModal/Gallery.jsx +++ b/src/editors/sharedComponents/SelectionModal/Gallery.jsx @@ -50,20 +50,20 @@ export const Gallery = ({ } if (galleryIsEmpty) { return ( -
+
); } if (searchIsEmpty) { return ( -
+
); } return ( - +
( - +
{ asset.status && asset.statusBadgeVariant && ( @@ -34,13 +44,21 @@ export const GalleryCard = ({ )} { asset.duration >= 0 && ( - + {formatDuration(asset.duration)} )}
-
-

{asset.displayName}

+
+

{asset.displayName}

{ asset.transcripts && (
)} -

+

} - + @@ -71,7 +71,7 @@ export const SearchSort = ({ { filterKeys && filterMessages && ( - + @@ -92,7 +92,7 @@ export const SearchSort = ({ onChange={onSwitchClick} isInline > - + diff --git a/src/editors/sharedComponents/SelectionModal/__snapshots__/Gallery.test.jsx.snap b/src/editors/sharedComponents/SelectionModal/__snapshots__/Gallery.test.jsx.snap index 9c2eacf95..029cbbaf2 100644 --- a/src/editors/sharedComponents/SelectionModal/__snapshots__/Gallery.test.jsx.snap +++ b/src/editors/sharedComponents/SelectionModal/__snapshots__/Gallery.test.jsx.snap @@ -2,7 +2,7 @@ exports[`TextEditor Image Gallery component component snapshot: loaded but no images, show empty gallery 1`] = `

-

+

props.img.displayName

@@ -78,6 +79,7 @@ exports[`SearchSort component snapshots with filterKeys with search string (clos @@ -138,6 +140,7 @@ exports[`SearchSort component snapshots with filterKeys with search string (clos onChange={null} > @@ -166,6 +169,7 @@ exports[`SearchSort component snapshots with filterKeys without search string (s @@ -216,6 +220,7 @@ exports[`SearchSort component snapshots with filterKeys without search string (s @@ -276,6 +281,7 @@ exports[`SearchSort component snapshots with filterKeys without search string (s onChange={null} > @@ -314,6 +320,7 @@ exports[`SearchSort component snapshots without filterKeys with search string (c @@ -385,6 +392,7 @@ exports[`SearchSort component snapshots without filterKeys without search string diff --git a/src/editors/sharedComponents/SelectionModal/index.jsx b/src/editors/sharedComponents/SelectionModal/index.jsx index 3ae534b8b..9ddd77e90 100644 --- a/src/editors/sharedComponents/SelectionModal/index.jsx +++ b/src/editors/sharedComponents/SelectionModal/index.jsx @@ -47,7 +47,7 @@ export const SelectionModal = ({ let background = '#FFFFFF'; let showGallery = true; if (isLoaded && !isFetchError && !isUploadError && !inputError.show) { - background = '#EBEBEB'; + background = '#E9E6E4'; } else if (isLoaded) { showGallery = false; } @@ -69,14 +69,22 @@ export const SelectionModal = ({ size={size} isFullscreenScroll={isFullscreenScroll} footerAction={( - )} title={intl.formatMessage(titleMsg)} - bodyStyle={{ background, padding: '9px 24px' }} + bodyStyle={{ background, padding: '3px 24px' }} headerComponent={( -

+
)}