Render gap markers inside mark components so they inherit the mark’s styles

Open
#378 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
65/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
frontend

Research direction

Start in the NodeArrayProperty component, where NodeGapMarkers is rendered once after all fragments, and in MarkComponent, which should receive the gap markers for gaps between its own nodes. Reproduce with a section mark that has a colorset, then check that markers between its blocks take the mark's --editing-stroke color. Done when those markers match the colors of nested-array markers and boundary gaps still render in the array's context.

Written by the indexing model from the issue text.

Description

NodeArrayProperty renders NodeGapMarkers once, after all fragments, so markers for gaps inside a mark (such as a section) sit outside the mark component's element. They take their color (--editing-stroke, derived from currentColor) from the array's container instead of the mark.

In Editable, a section with a dark or colored color set wraps its blocks in <section class="ew-colorset-3">. Gap markers between blocks of that section render after the section and stay dark on its purple background, while markers in nested arrays (inside the blocks) pick up the section's colors correctly.

Proposed fix: render the markers for gaps between a mark's nodes inside the MarkComponent, next to those nodes. Gaps at the boundaries of a mark can stay outside, in the array's own context.

Follow-up in Editable: none needed; markers inside sections will then follow the section's tokens automatically.

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.