Skip to content

Refactor Sections into their own Entries #15

Description

@zippy

Sections are currently a part of the Document entry. This should be refactored so that sections are their own entry, and thus each section has it's own hash and will be updated independently instead of being copied each time a document is updated. This also prepares the way for better management of history.

This means the tasks involved are:

  • create entry type for section along with accessor zome functions
  • Update initialization zome call to continue to take a document spec where the sections are included in the type.
  • Update document to hold a Vec<EntryHash> instead of Vec<Section>
  • creation of sections should still be able to happen in a the create_document zome call so DocumentInput needs to be updated to hold the Vec of sections outside the Document & when creating a document it should create the sections first and then add them to document section
  • update_document should take a list of sections to update in the input.
  • get_documents needs to be updated to to retrieve all the sections from the Vec<EntryHash> so as to actually return the contents of the sections too.
  • update UI store to match

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions