Repository navigation
docs: define truthful copy feedback #12659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| # Copy feedback tells the truth | ||
|
|
||
| Proposed invariant: a copy control reports the clipboard's actual outcome. A | ||
| failed write reaches the client UI; a label, checkmark or toast meaning “Copied” | ||
| appears only after the write succeeds. This applies to corresponding copy actions | ||
| across web, Electron and React Native iOS/Android, including buttons, menus and | ||
| keyboard actions whose completion the app can observe. | ||
|
|
||
| A control can acknowledge accepted input before completion. Immediate light-impact | ||
| or selection haptics and pressed styling acknowledge a tap; they do not claim the | ||
| clipboard changed. Preserve this distinction when adapting feedback to a platform. | ||
|
|
||
| Clipboard writes can be delayed or refused independently of the gesture. Reporting | ||
| success at press time hides that boundary, while console-only failure leaves the | ||
| person without an explanation or a useful next step. Apple's | ||
| [Feedback](https://developer.apple.com/design/human-interface-guidelines/feedback) | ||
| and [Writing](https://developer.apple.com/design/human-interface-guidelines/writing) | ||
| guidance informs this proposal; the exact feedback channel is a product choice. | ||
|
|
||
| ## Boundaries | ||
|
|
||
| - Show failure through an available client UI channel, such as an inline message, | ||
| alert or toast. A control outside a toast host still needs visible feedback. | ||
| - Retrying uses the same intended content. Keep the source available after failure; | ||
| do not clear the message, file text or diagnostic report being copied. | ||
| - Preserve plain text and supported rich/context payloads. Corresponding controls | ||
| use the client's supported clipboard capabilities, including the existing plain | ||
| HTTP fallback on web. Remote access must not silently reduce individual controls. | ||
| - Describe the failed action without displaying the copied content in diagnostics. | ||
| - OS/native terminal copy shortcuts may race several clipboard mechanisms without | ||
| a reliable app-level completion receipt. Those native shortcuts are outside the | ||
| outcome-reporting contract; terminal context-menu actions with observable write | ||
| completion remain covered. Absence of a “Copied” label alone is not an exception. | ||
|
|
||
| ## Observable cases | ||
|
|
||
| - A delayed write produces no completed-copy state until it succeeds. | ||
| - A rejected write produces visible failure and no success state. | ||
| - Retrying after failure copies the unchanged source content. | ||
| - Supported plain HTTP copying continues to work across equivalent web controls. | ||
| - Immediate acknowledgment haptics still occur on press, on success and failure. | ||
|
|
||
| This contract defines desired behavior, not a claim that every current copy path | ||
| already meets it. Native presentations can differ while preserving the same outcome. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.