Skip to content

[W.I.P.] Comments and Annotations#317

Closed
migom6 wants to merge 9 commits intoWorldBrain:masterfrom
migom6:feature/comments
Closed

[W.I.P.] Comments and Annotations#317
migom6 wants to merge 9 commits intoWorldBrain:masterfrom
migom6:feature/comments

Conversation

@migom6
Copy link
Copy Markdown

@migom6 migom6 commented Feb 24, 2018

This PR aims to solve the issue #301.

Progress till now:

  1. Implemented presentational components for Comment DropDown feature.
  2. Read the code base to understand how the RPCs were called.
  3. Mock data model
"@context": "http://www.w3.org/ns/anno.jsonld",
"id": "12345,
"type": "Annotations",
"body": {
"type" : "Comments",
"items" : [
{
"selector": {} //this will depend upon the implementation of annotations / otherwise skip
"text": "this is comment1",
"created_At": "",
"modified_At": ""
},
{
"selector": {} //this will depend upon the implementation of annotations / otherwise skip
"text": "this is comment2",
"created_At": "",
"modified_At": ""
}
],
"count": 2 
},
"target": {
"pageid": "page/Z29vZ2xlLmNvbS9pbnRsL2VuX3VrL2Nocm9tZQ%3D%3D"
"uri": "http://abc.xyz/index.html"
}

Discussion and finalisation on the data mode is required before implemention

I faced some problems with annotatorjs , the release version 1.2.x had documentation only on how to save via REST, I tried going through the sc. The pre release version 2.x had a problem while loading the "ui.main" module. We need to discuss on how to implement annotations (or we can use other libraries)

@migom6 migom6 mentioned this pull request Feb 24, 2018
7 tasks
@migom6 migom6 changed the title [W.I.P] Comments and Annotations [W.I.P.] Comments and Annotations Feb 24, 2018
@blackforestboi
Copy link
Copy Markdown
Member

@migom6 Great progress on the data model! :)

@BigBlueHat: As a contributor to the spec, do you have any comments on this structure?

As each comment/annotation needs to be addressable separately, it is not practical to put both comments as items into the same annotation, right? Ideally each annotation's body is a separate comment?

@tilgovi
At hypothes.is you struggled with the problem of comments/annotations not being able to be part of 2+ groups. Is this related to the basic implementation of the data model? If yes, how can we prevent making the same mistake?

I faced some problems with annotatorjs , the release version 1.2.x had documentation only on how to save via REST, I tried going through the sc.

@blahah also faced some issue but worked around it with https://github.com/WorldBrain/direct-linking-client
Do you have any tips here @blahah?

Thanks folks for your input!

@migom6
Copy link
Copy Markdown
Author

migom6 commented Feb 27, 2018

@oliversauter
Actually I took some reference from hypothesis regarding the model, but you're right. The data should be normalised and should treat each comment as different objects.

  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "12345,
  "type": "Annotations",
  "body": {
    "type" : "Comments",
     "selector": {} //this will depend upon the implementation of annotations / otherwise skip
     "text": "this a is comment",
     "created_At": "",
     "modified_At": ""
  },
  "target": {
    "pageid": "page/Z29vZ2xlLmNvbS9pbnRsL2VuX3VrL2Nocm9tZQ%3D%3D",
    "uri": "http://abc.xyz/index.html",
    "parent_id": 56789 //for nested comments (one level nesting only)
  }
Thanks for your input. 😃

@migom6
Copy link
Copy Markdown
Author

migom6 commented Mar 1, 2018

@oliversauter @poltak
any suggestions on how I should proceed, since GSOC is near and it would be of great help?
Thanks!

@blackforestboi
Copy link
Copy Markdown
Member

@migom6 have you seen the post I made in the #intros channel yesterday about the structure of the proposal?

I would recommend starting on this and then we'll work through it together.

@migom6
Copy link
Copy Markdown
Author

migom6 commented Mar 1, 2018

@oliversauter yes, I have seen it and I am almost done with my proposal 😃.
Thank you!

@migom6
Copy link
Copy Markdown
Author

migom6 commented Mar 4, 2018

@oliversauter
Here is my first draft of my proposal for #301 Comments and Annotations.
I'll be glad if you review it.
Thanks 😃
https://docs.google.com/document/d/1t1A4OC9XrUSraJ1LW5z4Et4bFpAUjsGXKjMEH02Iepg/edit?usp=sharing

@blackforestboi
Copy link
Copy Markdown
Member

Great, thanks for that :) I gave you some feedback in the document.

@BigBlueHat
Copy link
Copy Markdown

@BigBlueHat: As a contributor to the spec, do you have any comments on this structure?

As each comment/annotation needs to be addressable separately, it is not practical to put both comments as items into the same annotation, right? Ideally each annotation's body is a separate comment?

The Web Annotation Data Model is built on JSON-LD and consequently will allow you to have separate reference-able bodies and targets within the same Annotation.

Here's a cleaned up version of the above:

{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "...needs to be a URL or URN of some kind...not just a number",
  "type": "Annotation",
  "body": [
    {
      "id": "#annoBody-125879234",
      "type": "TextualBody",
       "value": "this is comment1",
       "created": "",
       "modified": ""
    },
    {
      "id": "#annoBody-1252asdf234",
      "type": "TextualBody",
      "value": "this is comment2",
       "created": "",
       "modified": ""
    }
  ],
  "target": {
    "source": "http://abc.xyz/index.html",
    "selector": {}
  }
}

There are lots of changes in here, so be sure it give it a read through with a copy of the Web Annotation Data Model handy.

Hope it helps get you started!

@BigBlueHat
Copy link
Copy Markdown

Oh, and if you use hypothes.is as a "study partner" be sure to use the (mostly) standards compliant variation of each annotation: https://hypothes.is/api/annotations/mnc4BuDqEee56KODnVrTAw.jsonld

Sadly, their search endpoint does not (yet) return AnnotationCollection objects (as it should to be fully standards compliant), nor do they link to the standards-based representation from their search results endpoint (ex: https://hypothes.is/api/search?user=bigbluehat).

However, you can add .jsonld onto the end of rows[0].links.json (et al) to get to the standards compliant representation.

@tilgovi
Copy link
Copy Markdown
Contributor

tilgovi commented Mar 5, 2018

I would only add that the decision to have multiple annotations with one body or one annotation with multiple bodies is use case specific. If the intention is to model a single annotation activity, use a single annotation with one or more bodies. If the intention is to model multiple, independent annotation activities, use multiple annotations. Keep in mind that the annotation is the bearer of provenance: who and when.

@migom6
Copy link
Copy Markdown
Author

migom6 commented Mar 5, 2018

Hey! @BigBlueHat thanks for everything.

However, you can add .jsonld onto the end of rows[0].links.json (et al) to get to the standards compliant representation.

^ This is a great hack 😸

@migom6
Copy link
Copy Markdown
Author

migom6 commented Mar 5, 2018

@tilgovi @BigBlueHat I want to start contributing to your repo! Any suggestions?
I want to know how it is different from annotatorjs.org

@blackforestboi
Copy link
Copy Markdown
Member

thanks @BigBlueHat and @tilgovi for your input here.

@tilgovi so do I understand correctly?:

  1. Annotations that have the same source/selector and author should have multiple bodies
  2. Annotations that are made on the same source/selector but by multiple authors should be multiple annotations

@tilgovi
Copy link
Copy Markdown
Contributor

tilgovi commented Mar 10, 2018

  1. Annotations that have the same source/selector and author should have multiple bodies

You have to think about your own user activities and flows. If the user makes reference to the same source/selector on multiple different occasions (times) then these might be different annotations. It is best probably to think about the annotation as an activity / action.

  1. Annotations that are made on the same source/selector but by multiple authors should be multiple annotations

Definitely. However, advanced modeling of annotation does not preclude bodies having their own authorship. Some annotation uses are about stating the relationship between two resources. If I link two articles together that could be an annotation even if I did not author either article.

Once again, annotation is a record of the act of annotating. The common case of note-taking is a simultaneous production of body and annotation, but not every one is. So, if you say "by multiple authors" think about who is creating the annotation as data, not necessarily who is creating the commentary.

@blackforestboi blackforestboi changed the title [W.I.P.] Comments and Annotations MTNI-60 ⁃ [W.I.P.] Comments and Annotations Apr 19, 2018
@blackforestboi blackforestboi changed the title MTNI-60 ⁃ [W.I.P.] Comments and Annotations [W.I.P.] Comments and Annotations Apr 19, 2018
@blackforestboi
Copy link
Copy Markdown
Member

Closing this now, due to the work done by @digi0ps on the Comments/Annotations.

@blackforestboi
Copy link
Copy Markdown
Member

Thanks @migom6 for your application and tackling this issue!

@migom6
Copy link
Copy Markdown
Author

migom6 commented May 21, 2018

Thanks for the great time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants