CentreForDigitalHumanities / CentreForDigitalHumanities/readit-interface
Comment view
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
A box showing a comment to any linked data item.
## Depends on
#11.
## Constructor options
name | description
---|---
`model` | An instance of `oa:Annotation` with an `oa:bodyValue` or that `oa:hasBody` any arbitrary linked resource.
## Rendering
A width-constrained, rectangular box consisting mostly of the body of the `.model`. This might be a Bulma `.message` or `.card` with the username of the creator and the creation date in the header.
If there is more than one body, this view might just show all of them in arbitrary order. Our application should avoid creating such a situation, but it cannot be ruled out by the data model.
The view should have a `max-height` less than the available height and `overflow: scroll`, so that very lengthy comments will not obscure the existence of later comments.
If the current user has permission to do so, a "reply" button should be present at the bottom of the view. Pressing this should open a simple in-line form consisting of a `` and submit/cancel buttons. Submitting this form would create a new `oa:Annotation` which `oa:hasTarget` the `.model` (so replying to a comment creates an annotation to an annotation) and the `oa:bodyValue` of which would be the text just entered into the form.
## Special methods
None required yet, but this may change in later issues. For example, at some point we might want to be able to collapse comments.
## Events
name | description
---|---
`reply` (model, annotation) | Triggered when the reply form is used. The first argument is the current annotation and the second is the reply.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.