indentlabs / indentlabs/notebook

Content should be able to be nested under other content

Open
#241 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Needs Design
Dominant language
HTML
Stars
410
Forks
78
Avg merge
1d
Merged PRs (30d)
9

Description

Expected behavior
  • Instead of just a one-dimensional list of content under each content type (characters, locations, etc), we should allow each piece of content to have a parent and/or child content.
  • We also need to figure out how to rearrange things in the UI to make these relationships clear to set, while also avoiding people "losing" nested content (that might not otherwise be in e.g. the top-level Characters list).
Implementation steps
  • Add parent_content_id and parent_content_type fields on all content types to add a polymorphic hierarchy of content linking across all types
  • Add a child_content method to content (probably through a concern so we can reuse it across all types) for getting all children content
Design
  • Rework the sidebar from a list of content types to a hierarchical view of a user's content, with content-without-a-parent nested under the (current) content types. For example:
Characters
  Bob
  Alice
Locations
  Empiria
    Citytown
      Mr. Mayor
      Superchurchplace
    Towntown
Magic
  Elemental Magic
    Fireball
  Nature Magic
    Earthball
  • Since we can nest any kind of content under any other kind of content, we want to include an icon for the content type next to each name. So, for example, Mr. Mayor should have a character icon next to it in the above list.
  • When a user only has one universe, omit the Universes section in the sidebar.
  • When a user has multiple universes, use them as the top-level elements in the hierarchy and nest Characters, Locations, Items, etc under the selected universe.
  • All content should be collapsible/expandable.

Here's a screenshot of a user who offered this as feedback on how they're organizing their magic structure:
eib7f1x

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by reviewing the implementation steps and sidebar design checklist in this issue; done means content can be nested across types and the sidebar clearly represents, expands, and collapses those relationships without hiding content.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
full-stack, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.