Skip to content

Commit

Permalink
105 transcript improvements (#106)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
allishultes authored Jun 10, 2021
1 parent e0eb31d commit b99f27a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
- I92 Updates placeholder text and titles of project, transcript and programme script modals

## [ 1.27.0 ]
- I105 Updates TranscriptRow components
4 changes: 2 additions & 2 deletions src/TranscriptForm/index.js
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -105,7 +105,7 @@ const TranscriptForm = ({ ...props }) => {
</Form.Group>
<Modal.Footer>
<Button variant="primary" type="submit">
Save
Upload
</Button>
</Modal.Footer>
</Form>
Expand Down
4 changes: 2 additions & 2 deletions src/TranscriptRow/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const TranscriptRow = (props) => {
<FontAwesomeIcon icon={ faExclamationTriangle } /> This file will be automatically deleted after 60 days.
{typeof props.progress === 'number' ? (
<Row style={ { display: 'flex' } }>
<Col xs={ 8 } sm={ 9 }>
<Col xs={ 12 } sm={ 12 }>
<div style={ { display: 'flex' } }>
<span style={ { marginRight: '0.4rem' } }>Uploading...</span>
<ProgressBar
Expand Down Expand Up @@ -208,7 +208,7 @@ const TranscriptRow = (props) => {
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();
Expand Down
6 changes: 3 additions & 3 deletions src/TranscriptRow/rows.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }`;
};

Expand Down

0 comments on commit b99f27a

Please sign in to comment.