desktop icon indicating copy to clipboard operation
desktop copied to clipboard

refactor(types): LogItem & VersionInfo

Open ramfox opened this issue 4 years ago • 1 comments

https://github.com/qri-io/qri/pull/1221

Let's create types that more closely match the responses we are going to get from the backend:

LogItem: { ...LogItem.VersionInfo, commitMessage: string commitTitle: string }

ListItem: VersionInfo

ramfox avatar Mar 30 '20 15:03 ramfox

Just to make sure we're on the same page, LogItem does not contain a VersionInfo, it embeds a VersionInfo. So we won't have:

LogItem = {
  "versionInfo": {
    "name": "my_dataset",
    "path": "QmAbCd",
    ... // other fields of VersionInfo
  },
  "commitMessage": "...",
  "commitTitle": "..."
}

instead the intention is that we will have:

LogItem = {
  "name": "my_dataset",
  "path": "QmAbCd",
  ... // other fields from VersionInfo
  "commitMessage": "...",
  "commitTitle": "..."
}

This was a mistake that wasn't caught on the original PR. See: https://github.com/qri-io/qri/issues/1218#issuecomment-603946810

Not sure if that's what your ...LogItem.VersionInfo syntax meant, just wanted to check.

dustmop avatar Mar 30 '20 15:03 dustmop