Browse Source

SONAR-12996 Make copy-path-to-clipboard button more accessible

tags/8.5.0.37579
Wouter Admiraal 3 years ago
parent
commit
2010ef3ed9

+ 5
- 1
server/sonar-web/src/main/js/components/SourceViewer/SourceViewerHeader.tsx View File

@@ -149,7 +149,11 @@ export default class SourceViewerHeader extends React.PureComponent<Props, State
<QualifierIcon qualifier={q} /> <span>{collapsedDirFromPath(path)}</span>
<span className="component-name-file">{fileFromPath(path)}</span>
<span className="nudged-up spacer-left">
<ClipboardIconButton className="button-link link-no-underline" copyValue={path} />
<ClipboardIconButton
aria-label={translate('component_viewer.copy_path_to_clipboard')}
className="button-link link-no-underline"
copyValue={path}
/>
</span>
</div>
</div>

+ 3
- 0
server/sonar-web/src/main/js/components/SourceViewer/__tests__/__snapshots__/SourceViewerHeader-test.tsx.snap View File

@@ -45,6 +45,7 @@ exports[`should render correctly for a regular file 1`] = `
className="nudged-up spacer-left"
>
<ClipboardIconButton
aria-label="component_viewer.copy_path_to_clipboard"
className="button-link link-no-underline"
copyValue="foo/bar.ts"
/>
@@ -165,6 +166,7 @@ exports[`should render correctly for a unit test 1`] = `
className="nudged-up spacer-left"
>
<ClipboardIconButton
aria-label="component_viewer.copy_path_to_clipboard"
className="button-link link-no-underline"
copyValue="foo/bar.ts"
/>
@@ -303,6 +305,7 @@ exports[`should render correctly if issue details are passed 1`] = `
className="nudged-up spacer-left"
>
<ClipboardIconButton
aria-label="component_viewer.copy_path_to_clipboard"
className="button-link link-no-underline"
copyValue="foo/bar.ts"
/>

+ 1
- 0
sonar-core/src/main/resources/org/sonar/l10n/core.properties View File

@@ -2518,6 +2518,7 @@ component_viewer.show_details=Show Measures
component_viewer.file_measures=File measures
component_viewer.show_all_measures=Show all measures
component_viewer.no_component=The component has been removed or never existed.
component_viewer.copy_path_to_clipboard=Copy the file path to the clipboard

source_viewer.view_all_issues=See all issues in this file
source_viewer.covered=Covered by the following tests

Loading…
Cancel
Save