Skip to content

Commit

Permalink
Tweaks to title truncation and date format [RAUT-451]
Browse files Browse the repository at this point in the history
  • Loading branch information
ewagoner committed Jun 21, 2023
1 parent 2aa99a9 commit f84f201
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ describe('ODDProtocolDetails', () => {
it('renders protocol truncated name that expands when clicked', () => {
const [{ getByText }] = render()
const name = getByText(
'Nextera XT DNA Library Prep Kit Protocol: Part 1/4 - Tagment Genom...'
'Nextera XT DNA Library Prep Kit Protocol: Part 1/4 - Tagment...Amplify Libraries'
)
name.click()
getByText(
Expand All @@ -167,7 +167,7 @@ describe('ODDProtocolDetails', () => {
getByText(
`Date Added: ${format(
new Date('2022-05-03T21:36:12.494778+00:00'),
'MM/dd/yyyy k:mm'
'MM/dd/yy k:mm'
)}`
)
})
Expand Down
4 changes: 2 additions & 2 deletions app/src/pages/OnDeviceDisplay/ProtocolDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const ProtocolHeader = (props: {

let displayedTitle = title
if (title.length > 92 && truncate) {
displayedTitle = truncateString(title, 69)
displayedTitle = truncateString(title, 80, 60)
}

return (
Expand Down Expand Up @@ -195,7 +195,7 @@ const Summary = (props: {
>
<StyledText as="p">{`${t('protocol_info:date_added')}: ${
date != null
? format(new Date(date), 'MM/dd/yyyy k:mm')
? format(new Date(date), 'MM/dd/yy k:mm')
: t('shared:no_data')
}`}</StyledText>
</Flex>
Expand Down

0 comments on commit f84f201

Please sign in to comment.