Edits as asides: CriticMarkup under a line, by a reviewer

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

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
javascript, markdown
Domain
frontend, web-dev

Research direction

Read the aside documentation linked in the issue and follow the work in #163 on CriticMarkup and the view toggle. First map how asides are parsed, rendered, added to the legend, and handled by the toggle; the issue does not name implementation files or tests. Done means the proposed edit forms render in the reviewer’s colour, leave source lines unchanged, show trailing text in the margin, appear in the legend, and work in all three views, with the listed syntax questions resolved.

Written by the indexing model from the issue text.

Description

enhancement

Follows #163, which reads CriticMarkup in the text.

CriticMarkup says what changed but not who changed it, and written in the line, it changes the text it's marking: the line no longer reads as it came. Asides already have both of those: an aside names who it's from and what it's about, and names the words it means in the line above, without touching it. That already works under a heading:

---
reviewer #: Josh
---

### Heavenly Father knew me before I was born.
~#[Heavenly Father] My Heavenly Parents

Here "Heavenly Father" is underlined in Josh's colour, tied to the aside. An edit is that, but saying replace these words with these rather than about these words.

Let's let an aside carry CriticMarkup, its words found in the line above as a mark's are:

### Heavenly Father knew me before I was born.
~#{~~Heavenly Father~>My Heavenly Parents~~}

I have two duck
~#[duck]{++s++}

I have one ducks
~#{~~ducks~>duck~~}

The Lord is a man of war
~#c{--a man of war--} what else could this mean?
  • The edit is drawn in the line above as #163 draws one: struck through, written above in script, a caret for what's added; but in the reviewer's colour, as their asides' rules are, rather than red. An edit with no reviewer (~{~~a~>b~~}) is red.
  • Text after the markup is the aside itself, in the margin, as any aside's is: why the edit was made.
  • An edit counts in the legend under the byline with its reviewer and topics, as an aside does.
  • The line itself is never touched: one sentence to a line, the material reads as it came anywhere else, and every edit is on a line of its own beneath it.
  • A substitution's old and new are diffed by letter where they share a word, so ducks → duck is the s struck through, and box → boxes an es written after box, not the whole word replaced.
  • #163's view toggle covers these too: Marked up, Edited (applied, no asides) and Original (nothing on it).

Things to settle

  • Where an addition goes. A substitution and an omission name their words; an addition has none to find. ~#[duck]{++s++}, after the words named, is one way, though braces after [words] already override a mark's style (~a[quick]{highlight}). Or only substitutions, ~#{~~duck~>ducks~~}, with the diff finding the addition?
  • A word's second time in the line. A mark names it [the#2]; inside {~~the~>a~~} that has no place. ~#[the#2]{~~the~>a~~}?
  • Accepting and rejecting. An edit, like a review's aside, is a proposal. Accepting one could write it into the line and remove the aside; rejecting one, remove it. This is near #22, marking an attributed aside resolved, and #27, bringing a review back.
  • CriticMarkup tools. An aside's ~#{...} isn't CriticMarkup any other tool reads. Exporting to plain CriticMarkup, edits written into their lines with {>>Josh<<} comments, would let a review go to them.

To check: a document with a reviewer, an edit of each kind under a line and under a heading, one with words after it. Each draws in the line above in the reviewer's colour, the line itself unchanged in the file; the words after show in the margin; the legend counts the edits; the toggle hides and applies them with the asides.

Dominant language
JavaScript
Stars
0
Forks
1
Avg merge
2d 4h
Merged PRs (30d)
26

Getting set up

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 jzheaux/reader

All issues in jzheaux/reader

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.