Singelton Nodes (rules for nodes)

Open
#152 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
typescript
Domain
frontend

Research direction

Start by locating the document model and the existing node insertion, copy/extract/paste, reorder, and deletion paths. Determine how node types are registered and constrained, then define how singleton and required-node rules should be configured. Done means those rules apply consistently wherever nodes are manipulated.

Written by the indexing model from the issue text.

Description

As a developer I may want endusers to use certain node types only once in a document. They can place it anywhere where the node type is allowed, copy/ extract and paste, reorder it, etc. But it should only exist once in the document.

Candidates of such node types are:

In case of a website builder: FooterNode, TopMenuNode, CookieBannerNode, Alert/NotificationbarNode
In case of a google doc style editor: TableOfContentsNode, EndnotesNode (for footnotes)
In case of a newsletter tool: EmailHeaderNode, EmailFooterNode, EmailPreviewLineNode, ManageSubscriptioNode

In the last example as a developer I may even want to make it a requirement that the "ManageSubscriptioNode" is present in the document, so deletion is not possible.

Dominant language
TypeScript
Stars
691
Forks
20
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from michael/svedit

All issues in michael/svedit

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.