Skip to content

Commit bdd4662

Browse files
author
ntwigg
committed
Update README with progress so far.
1 parent b3f7730 commit bdd4662

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

browser-extension/README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,18 @@
2727

2828
This is a [WXT](https://wxt.dev/)-based browser extension that
2929

30-
- finds `textarea` components and decorates them with [overtype](https://overtype.dev/) and [shiki](https://github.com/shikijs/shiki).
30+
- finds `textarea` components and decorates them with [overtype](https://overtype.dev/) and [highlightjs](https://highlightjs.org/)
3131
- stores unposted comment drafts, and makes them easy to find via the extension popup
3232

3333
### Entry points
3434

35-
- src/entrypoints/content.ts - injected into every webpage
36-
- src/entrypoints/popup - html/css/ts which opens when the extension's button gets clicked
35+
- `src/entrypoints/content.ts` - injected into every webpage
36+
- `src/entrypoints/popup` - html/css/ts which opens when the extension's button gets clicked
37+
38+
### Architecture
39+
40+
Every time a `textarea` shows up on a page, on initial load or later on, it gets passed to a list of `CommentEnhancer`s. Each one gets a turn to say "I can enhance this box!". They show that they can enhance it by returning a [`CommentSpot`, `Overtype`].
41+
42+
Those values get bundled up with the `HTMLTextAreaElement` itself into an `EnhancedTextarea`, which gets added to the `TextareaRegistry`. At some interval, draft edits will get saved by the browser extension (TODO).
43+
44+
When the `textarea` gets removed from the page, the `TextareaRegistry` is notified so that the `CommentSpot` can be marked as abandoned or submitted as appropriate (TODO).

0 commit comments

Comments
 (0)