You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 something non-null in the method `tryToEnhance(textarea: HTMLTextAreaElement): Spot | null`. Later on, that same `Spot` data will be used by the `tableRow(spot: Spot): ReactNode` method to create React components for rich formatting in the popup table.
64
64
65
-
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`].
65
+
Those `Spot` values get bundled up with the `HTMLTextAreaElement` itself into an `EnhancedTextarea`, which gets added to the `TextareaRegistry`. At some interval, draft edits get saved by the browser extension.
66
66
67
-
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).
68
-
69
-
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).
67
+
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.
70
68
71
69
## Testing
72
70
73
-
In `tests/har` there are various `.har` files. These are complete recordings of a single page load.
74
-
75
-
-`pnpm run har:view` and you can see the recordings, with or without our browser extension.
71
+
-`npm run playground` gives you a test environment where you can tinker with the popup with various test data, supports hot reload
72
+
-`npm run har:view` gives you recordings of various web pages which you can see with and without enhancement by the browser extension
76
73
77
74
### Recording new HAR files
78
75
76
+
- the har recordings live in `tests/har`, they are complete recordings of the network requests of a single page load
79
77
- you can add or change URLs in `tests/har-index.ts`
80
78
-`npx playwright codegen https://github.com/login --save-storage=playwright/.auth/gh.json` will store new auth tokens
0 commit comments