CodeSnippet: allow more actions then copy #8322
Labels
component: code-snippet
proposal: open
This request has gone through triaging. We're determining whether we take this on or not.
type: enhancement 💡
Summary
Currently CodeSnippet supports the action to copy.
Consider adding actions like print, share, and client supplied actions.
This will need design than development.
Justification
To allow more actions than copy.
IBM Cognos had the ability to launch a product with the contents of the snippet.
Desired UX and success metrics
A client may want to give the user the ability to print the snippet.
Rather than making the user copy/paste in order to print lets supply a print button.
Discussions on this topic brought up the idea of a CodeSnippet Toolbar.
The toolbar could contain actions - copy, print, share, etc.
The toolbar could also have a 'wrapText' button which would likely address CodeSnippet: the scrollable content needs to be WCAG 1.4.10 compliant, initial setting based on the wrapText prop.
The toolbar could also have a 'include line numbers' button which would likely address [code snippet] add number line modifier, initial setting based on a prop.
Along with standard opt-in out-of-the-box actions, there should be a way for clients to insert their own actions.
"Must have" functionality
unknown
Specific timeline issues / requests
IBM Cognos has already shipped by overloading the Copy button with an action to Copy and Share.
Available extra resources
unknown
The text was updated successfully, but these errors were encountered: