Skip to content

Prepare MaweJS for multifile support #368

@mkoskim

Description

@mkoskim

At the moment, when displaying indices and editor canvases, the file & sections are fixed:

Indices:

return <VBox style={style} className="TOC">
<SectionIndex
doc={doc}
sectID="storybook"
name="Storybook"
side={side}
indexing={indexing}
updateIndexing={updateIndexing}
indexed={indexed}
words={words}
setActive={setActive}
track={track}
/>
<SectionIndex
doc={doc}
sectID="draft"
name="Draft"
side={side}
indexing={indexing}
updateIndexing={updateIndexing}
indexed={indexed}
words={words}
setActive={setActive}
track={track}
/>
<SectionIndex
doc={doc}
sectID="notes"
name="Notes"
side={side}
indexing={indexing}
updateIndexing={updateIndexing}
indexed={indexed}
words={words}
setActive={setActive}
track={track}
/>
</VBox>

Editor instances:

<Slate editor={editors.draft} initialValue={doc.draft.acts} onChange={updateDraft}>
<SlateEditable visible={active === "draft"} className="Sheet Regular" highlight={highlightText}/>
</Slate>
<Slate editor={editors.notes} initialValue={doc.notes.acts} onChange={updateNotes}>
<SlateEditable visible={active === "notes"} className="Sheet Regular" highlight={highlightText}/>
</Slate>
<Slate editor={editors.storybook} initialValue={doc.storybook.acts} onChange={updateStorybook}>
<SlateEditable visible={active === "storybook"} className="Sheet Regular" highlight={highlightText}/>
</Slate>

What is needed is that the implementation gives us freedom to have as many sections in the index (and with editor instances) as we like. Later, we change this so, that it is possible to load sections from multiple files (and of course save them to corresponding files), to create:

  1. Multifile stories: for example, long stories to splitted to parts.

  2. Story series: Multiple related stories with separate background files.

  3. Collections: Collections of stories.

  4. Splitting and merging content: making spin-offs from stories, or merging two stories together.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions