diff --git a/RELEASE.md b/RELEASE.md index e0baa7b6c2..438912f528 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -27,6 +27,7 @@ Please follow the established format: - Migrate from `toposort` to `graphlib`. (#1942) - Fix packaging. (#1766) - Adjust requirements file and dependabot versioning strategy. (#1978) +- Refactor CommandCopier component. (#1998) # Release 9.1.0 diff --git a/src/components/metadata/metadata.js b/src/components/metadata/metadata.js index 875f03da32..4346f1b593 100644 --- a/src/components/metadata/metadata.js +++ b/src/components/metadata/metadata.js @@ -249,6 +249,7 @@ const MetaData = ({ diff --git a/src/components/ui/command-copier/command-copier.js b/src/components/ui/command-copier/command-copier.js index ab3466505b..0f46d91209 100644 --- a/src/components/ui/command-copier/command-copier.js +++ b/src/components/ui/command-copier/command-copier.js @@ -1,11 +1,11 @@ import React, { useState } from 'react'; -import MetaDataValue from '../../metadata/metadata-value'; +import classnames from 'classnames'; import IconButton from '../../ui/icon-button'; import Tooltip from '../tooltip'; import CopyIcon from '../../icons/copy'; import './command-copier.scss'; -const CommandCopier = ({ command, isCommand, dataTest }) => { +const CommandCopier = ({ command, classNames, isCommand, dataTest }) => { const [showCopied, setShowCopied] = useState(false); const onCopyClick = () => { @@ -17,11 +17,7 @@ const CommandCopier = ({ command, isCommand, dataTest }) => { return (
- + {command} {window.navigator.clipboard && isCommand && (
    { it('shows the node command', () => { const wrapper = mount(); - const row = wrapper.find('.pipeline-metadata__value'); + const row = wrapper.find('.command-value'); expect(row.text()).toEqual('test command'); });