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

PROD-4408 Timeline wall prod release -> prod #6925

Merged
merged 7 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ workflows:
filters:
branches:
only:
- free
- PROD-4251
# This is alternate dev env for parallel testing
- "build-qa":
context : org-global
Expand Down
8 changes: 7 additions & 1 deletion src/shared/components/GUIKit/PhotoVideoItem/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,13 @@ function PhotoVideoItem({
})}
type="button"
>
{imageUrl ? (<img styleName="img-container" src={imageUrl} alt="" />) : null}
{imageUrl && !isThisVideo ? (<img styleName="img-container" src={imageUrl} alt="" />) : null}
{isThisVideo && (
<video styleName="video-container">
<source src={imageUrl} />
<track kind="captions" />
</video>
)}
{isThisVideo ? (<BtnPlay styleName="btn-play" width="25" height="25" />) : null}
</button>
);
Expand Down
4 changes: 4 additions & 0 deletions src/shared/components/GUIKit/PhotoVideoItem/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
object-fit: cover;
}

.video-container {
max-width: 100%;
}

.btn-play {
position: absolute;
top: calc(50% - 12px);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ function ModalPhotoViewer({ onClose, selectedPhoto, photos }) {
selected: photo.id === localSelectedPhoto,
})}
url={photo.previewUrl || photo.url}
videoThumnailUrl={photo.videoThumnailUrl}
isUrlPhoto={!photo.videoThumnailUrl}
videoThumnailUrl={photo.previewUrl || photo.url}
isUrlPhoto={!photo.isVideo}
onClick={() => setLocalSelectedPhoto(photo.id)}
key={uuidv4()}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ function ApprovalItem({
key={photo.id}
styleName="photo-item"
url={photo.previewUrl || photo.url}
videoThumnailUrl={photo.videoThumnailUrl}
isUrlPhoto={!photo.videoThumnailUrl}
videoThumnailUrl={photo.previewUrl || photo.url}
isUrlPhoto={!photo.isVideo}
onClick={() => {
setShowModalPhoto(true);
setSelectedPhoto(photo.id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,13 @@ function PhotoItemsMobile({ photos, className }) {
role="button"
tabIndex={0}
>
{selectedPhotoObject && !selectedPhotoObject.videoThumnailUrl ? (<img src={selectedPhotoObject.previewUrl || selectedPhotoObject.url} alt="main" />) : null}
{selectedPhotoObject && !!selectedPhotoObject.videoThumnailUrl ? (
{selectedPhotoObject && !selectedPhotoObject.isVideo ? (<img src={selectedPhotoObject.previewUrl || selectedPhotoObject.url} alt="main" />) : null}
{selectedPhotoObject && selectedPhotoObject.isVideo ? (
<React.Fragment>
<img src={selectedPhotoObject.videoThumnailUrl} alt="main" />
<video styleName="video-container">
<source src={selectedPhotoObject.url} />
<track kind="captions" />
</video>
<BtnPlay styleName="img-play" />
</React.Fragment>
) : null}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
top: calc(50% - 25px);
}

.video-container {
max-width: 100%;
}

.btn-left,
.btn-right {
position: absolute;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ function EventItem({
<PhotoVideoItem
styleName="photo-item hide-mobile"
url={photo.previewUrl || photo.url}
videoThumnailUrl={photo.videoThumnailUrl}
isUrlPhoto={!photo.videoThumnailUrl}
videoThumnailUrl={photo.url}
isUrlPhoto={!photo.isVideo}
key={photo.id}
onClick={() => {
setShowModalPhoto(true);
Expand Down
Loading