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
- this output means that this page is simulating the url `https://github.com/diffplug/selfie/issues/523`
34
+
- every textarea on the page is represented
35
+
-`NO_SPOT` means that the spot was not enhanced
36
+
-`type: GH_ISSUE_ADD_COMMENT` means that it was enhanced by whichever implementation of `CommentEnhancer` returns the spot type `GH_ISSUE_ADD_COMMENT`
37
+
- if you search for that string in `src/lib/enhancers` you will find the correct one
38
+
- the `tryToEnhance` method returned a `CommentSpot`, and that whole data is splatted out above
39
+
40
+
If you make a change to the code of the enhancer, you can click the button with id `gitcasso-rebuild-btn`. It will trigger a rebuild of the browser extension, and then refresh the page. You'll be able to see the effects of your change in the `gitcasso-comment-spots` div described above.
41
+
42
+
When writing `tryToEnhance` methods, don't hedge your bets and write lots of fallback code or strings of `?.`. Have a specific piece of data you want to get, use non-null `!` assertions where necessary to be clear about getting. The data they are extracting is going to change over time, and it's easier to fix broken ones if you know exactly what used to work. If the code has lots of branching paths, it's harder to tell what it was doing.
0 commit comments