From b99f27a39cd66e34dd76d8dc46941e9ad7fc24a9 Mon Sep 17 00:00:00 2001 From: Alli Shultes Date: Thu, 10 Jun 2021 09:33:14 +0100 Subject: [PATCH] 105 transcript improvements (#106) * fix(transcripts): Remove stripping and sending messages * fix(transcripts): #105 Remove cancel upload button * fix(import): Remove useEffect hook * chore(transcripts): #105 Remove handleCancelUpload prop and update status for error card * chore(doc): #105 Updates changelog --- CHANGELOG.md | 5 ++++- src/TranscriptForm/index.js | 4 ++-- src/TranscriptRow/index.js | 4 ++-- src/TranscriptRow/rows.js | 6 +++--- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6d5342..e5c495f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,4 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - I230 Updated design of the workspace: TranscriptRow component ## 1.26.0 -- I92 Updates placeholder text and titles of project, transcript and programme script modals \ No newline at end of file +- I92 Updates placeholder text and titles of project, transcript and programme script modals + +## [ 1.27.0 ] +- I105 Updates TranscriptRow components diff --git a/src/TranscriptForm/index.js b/src/TranscriptForm/index.js index a7dd851..cbdb6f6 100644 --- a/src/TranscriptForm/index.js +++ b/src/TranscriptForm/index.js @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from 'react'; +import React, { useState } from 'react'; import PropTypes from 'prop-types'; import Form from 'react-bootstrap/Form'; import Button from 'react-bootstrap/Button'; @@ -105,7 +105,7 @@ const TranscriptForm = ({ ...props }) => { diff --git a/src/TranscriptRow/index.js b/src/TranscriptRow/index.js index ec8ed86..7b37f26 100644 --- a/src/TranscriptRow/index.js +++ b/src/TranscriptRow/index.js @@ -129,7 +129,7 @@ const TranscriptRow = (props) => { This file will be automatically deleted after 60 days. {typeof props.progress === 'number' ? ( - +
Uploading... { card = DoneCard(); } else if (props.status === 'in-progress') { card = InProgressCard(); - } else if (props.status === 'error') { + } else if (props.status === 'error' || props.status === 'fail') { card = ErrorCard(); } else if (props.status === 'uploading') { card = UploadingCard(); diff --git a/src/TranscriptRow/rows.js b/src/TranscriptRow/rows.js index d375980..1d3abeb 100644 --- a/src/TranscriptRow/rows.js +++ b/src/TranscriptRow/rows.js @@ -22,12 +22,12 @@ const getExpiryDate = (createdDate) => { }; const formatMessage = (message, mediaDuration) => { - if (message === 'Transcribing...') { + if (message === 'Transcribing...' || 'Stripping audio...' || 'Sending media to a Speech-to-Text service...') { return mediaDuration ? `Transcribing, approx. ${ mediaDuration }` : message; - } else if (message === 'Stripping audio...' || 'Sending media to a Speech-to-Text service...') { - return `Preparing: ${ message }`; } + // Will return queued message + return `Transcribing: ${ message }`; };