Skip to content

Commit

Permalink
Merge pull request #2972 from jenny-s51/RHOAIENG-8502
Browse files Browse the repository at this point in the history
[RHOAIENG-8502]: Change pipeline URI truncate to middle instead of end
  • Loading branch information
openshift-merge-bot[bot] authored Jul 3, 2024
2 parents 38ba83d + 397faf7 commit ba2592a
Showing 1 changed file with 6 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
import React from 'react';
import {
Button,
Flex,
FlexItem,
Icon,
Popover,
Split,
SplitItem,
Truncate,
} from '@patternfly/react-core';
import { Button, Flex, FlexItem, Icon, Popover, Truncate } from '@patternfly/react-core';
import { ExclamationTriangleIcon, ExternalLinkAltIcon } from '@patternfly/react-icons';
import { usePipelinesAPI } from '~/concepts/pipelines/context';
import { useIsAreaAvailable, SupportedArea } from '~/concepts/areas';
Expand Down Expand Up @@ -78,18 +69,15 @@ export const ArtifactUriLink: React.FC<ArtifactUriLinkProps> = ({ uri, type }) =
<Button
variant="link"
isInline
icon={<ExternalLinkAltIcon />}
iconPosition="end"
// TODO: remove this style override after upgrading to PFv6
style={{ display: 'inline-flex' }}
onClick={() => {
window.open(url);
}}
>
<Split>
<SplitItem>
<Truncate content={uri} />
</SplitItem>
<SplitItem>
<ExternalLinkAltIcon />
</SplitItem>
</Split>
<Truncate content={uri} position="middle" trailingNumChars={30} />
</Button>
</FlexItem>
</Flex>
Expand Down

0 comments on commit ba2592a

Please sign in to comment.