Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

Authors field in the highlights data should be an array #104

Open
Extheoisah opened this issue Jun 7, 2023 · 6 comments
Open

Authors field in the highlights data should be an array #104

Extheoisah opened this issue Jun 7, 2023 · 6 comments
Labels
a project task Non-feature task (internal use only) enhancement New feature or request

Comments

@Extheoisah
Copy link
Collaborator

Currently, the authors field in the highlights data returned from collab is a string. Instead it should be an array of strings(authors) so as to accommodate other authors that may have highlighted the same text. cc @nully0x @okjodom

@Extheoisah Extheoisah added the enhancement New feature or request label Jun 7, 2023
@okjodom
Copy link
Contributor

okjodom commented Jun 8, 2023

Ack. This falls under design space for interactivity with a highlight:

  • should we keep the representation of a highlight independent per author, even though we might merge the rendered UI of the highlight?
    • how would we merge public vs private highlight of the same content?
  • can multiple users create the highlight
  • what other user actions would make them a co-author highlight?

@Extheoisah
Copy link
Collaborator Author

My thoughts on your questions:

  1. A highlight can have multiple authors. I don't think w should do the computation of merging the authors in the UI (extension)
  2. Multiple users can highlight a single text/paragraph. We can use the author's field to identify which belongs to which.
  3. I have not thought about co-authorship but what comes to mind might be comments/references under another author's highlights.

@adamjonas @aassoiants can provide more insights/thoughts on this

@adamjonas
Copy link
Collaborator

Wouldn't one author for each highlight be simpler? This is probably going to make things easier when you follow a list of people right?

Another con would be that if you merge authorship you lose time stamps when an author made the timestamp.

@Extheoisah
Copy link
Collaborator Author

Extheoisah commented Jun 8, 2023

Wouldn't one author for each highlight be simpler? This is probably going to make things easier when you follow a list of people right?

Another con would be that if you merge authorship you lose time stamps when an author made the timestamp.

The flow I have in mind is this -> each highlight is saved independently but is referenced by an author. So to know which highlights belongs to an author, we fetch the highlights that has the author's name/pubkey/id in the author array field.

This also helps to fetch all highlight without taling into consideration the authors field since we have a "all highlights" button in the UI.

Design wise, this introduces separation of concerns and is much easier in my opinion to map authors and highlights together both on the frontend and backend.

@okjodom
Copy link
Contributor

okjodom commented Jun 9, 2023

@Extheoisah I'd defer this for post MVP1. It would require a data model redesign, and of course we'd be better informed by user expectations and requirements.

@Extheoisah
Copy link
Collaborator Author

@Extheoisah I'd defer this for post MVP1. It would require a data model redesign, and of course we'd be better informed by user expectations and requirements.

Sounds good. I'll label this as a 1.5 issue

@Extheoisah Extheoisah added the a project task Non-feature task (internal use only) label Jun 9, 2023
@Extheoisah Extheoisah added this to the Version 1.5 milestone Jun 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a project task Non-feature task (internal use only) enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants