clipboard-apis icon indicating copy to clipboard operation
clipboard-apis copied to clipboard

New terminology: ClipboardItem "entry" as data type → value.

Open lgarron opened this issue 4 years ago • 6 comments

Right now, the spec refers to two things as "items":

  • A list of ClipboardItems.
  • The individual data values inside a single ClipboardItem.

This is rather confusing, so this PR proposes to rename the latter to "entries", where an entry conceptually corresponds to a data type (e.g. "text/string") that maps to a value (e.g. a Blob). This:

  • Matches the JS naming convention (think of Object.entries()).
  • Does not change any spec semantics, only the names of some identifiers.

In addition, this PR also renames:

  • ClipboardItemDataTypeClipboardItemValue, and
  • ClipboardItemDataClipboardItemValuePromise.

This matches the "entry is a type mapping to a value" convention, and makes it clear what is a Promise. The previous names may have caused a semantic typo (https://github.com/w3c/clipboard-apis/pull/126).

Closes #????

The following tasks have been completed:

  • [ ] Confirmed there are no ReSpec/BikeShed errors or warnings.
  • [ ] Modified Web platform tests (link to pull request)

Implementation commitment:

  • [ ] WebKit (https://bugs.webkit.org/show_bug.cgi?id=)
  • [ ] Chromium (https://bugs.chromium.org/p/chromium/issues/detail?id=)
  • [ ] Gecko (https://bugzilla.mozilla.org/show_bug.cgi?id=)

Preview | Diff

lgarron avatar Jun 25 '20 10:06 lgarron

FYI: my W3C affiliation is set to GitHub, Inc., but this my participation in this repo should be considered under my Chromium affiliation. I don't know if there's a way to tell the CI this.

lgarron avatar Jun 25 '20 10:06 lgarron

@lgarron the IPR issue has been fixed by @travisleithead and our Systeam. It will no longer be a blocker for future contributions.

siusin avatar Dec 22 '20 22:12 siusin

@lgarron: are you still working on this PR? The change itself is desirable, it just requires slight adaptation to match the current base.

mbrodesser avatar Jun 01 '21 13:06 mbrodesser

@lgarron: are you still working on this PR? The change itself is desirable, it just requires slight adaptation to match the current base.

Yeah, I'd be glad to do that! Please give me a few days! 🙏

lgarron avatar Jun 02 '21 01:06 lgarron

@lgarron: just to be sure, do you still intend adapting this patch soon? It would be valuable.

mbrodesser avatar Jun 15 '21 12:06 mbrodesser

@lgarron: can you please give an update if you still intend to adapt this patch?

mbrodesser avatar Aug 06 '21 12:08 mbrodesser