Fork me on GitHub
#cljdoc
<
2022-04-25
>
Cora (she/her)01:04:51

oof, type errors

Cora (she/her)01:04:07

maybe I'll do the work of rewriting these using functional components

Cora (she/her)02:04:18

oof, this is all tangled

lread02:04:59

Oof, if only I understood TypeScript! simple_smile Does that cause us problems? Can we catch these types of errors at build time and fail the build?

Cora (she/her)03:04:25

it doesn't right now but it's something we should fix

Cora (she/her)03:04:50

things are a bit tangled but it's nothing that can't be fixed

Cora (she/her)03:04:59

or put in the work to switch to cljs

lread03:04:11

I will defer to you on all things client-side, but I certainly would not object to a switch to cljs someday. That said, if TypeScript is a better fit and/or preferred, that’s absolutely cool too.

Cora (she/her)03:04:33

I'd like to learn some more cljs and it might be fun

Cora (she/her)03:04:08

I was also thinking we might be able to use sci to make it so certain libraries could be tried in the browser

1
lread12:04:42

I’m also quite fascinated with https://github.com/nextjournal/clerk and wonder if/how it could integrate.

Sam Ritchie14:04:29

big upvote here, rendering docs with clerk would be amazing

Cora (she/her)14:04:02

maybe a new doc format for this? allow people to include clerk files?

Cora (she/her)14:04:53

we'd have to be careful that nothing is automatically executed, that this is entirely opt-in

Cora (she/her)14:04:20

puts on her infosec hat

Cora (she/her)14:04:09

I definitely get a little anxiety at the thought of library publishers being able to run arbitrary javascript in a user's browser

Cora (she/her)14:04:45

specifically it potentially allows people to use the trust people have for cljdoc to ship malicious js without suspicion

lread17:04:42

The other thing we need to think of is stability and longevity. CommonMark and AsciiDoc are stable and safe and don’t change much. But other things do change.

1
lread17:04:37

Scary JS tidbit: it was only recently that cljdoc started sanitizing out embedded JavaScript from adoc and md 😬

lread17:04:13

Part of all that background maintenance work I was doing.

Cora (she/her)17:04:28

you're the real MVP, Lee

lread17:04:05

Bah, I don’t know about that! I like to help out here and there.

lread12:04:45

Now live: Searching within a single library now breaks down results for articles by section headings. Looking good to me, let us know if you see any issues! Thanks to @corasaurus-hex for encouraging me to dive in on this one (it is just a small change atop all the hard work done by her!).

💜 1
🎉 1
Cora (she/her)13:04:19

is it worth crafting an announcement?

lread13:04:07

Well… there are rules for #announcements… and their frequency. But we can noisy as we like in #releases.

lread13:04:14

I think(?) the rule of thumb was that if you can still see your #announcements announcement then don’t post a new one. But now that we have full Slack history… that rule no longer makes sense. simple_smile Can’t remember where this spelled out… somewhere…

lread13:04:14

Oh description on #announcements sez “Please keep them occasional”.

lread13:04:47

I’ll post the news in #releases

1
Cora (she/her)13:04:30

oof, tapping on mobile is broken because of loss of focus. i'll need to fix that

lread13:04:32

Good catch! And related: Would be interesting to know, some sort of usage stats. Like what percentage of folks come in from mobile.

Cora (she/her)13:04:02

gah, all search clicks are broken

Cora (she/her)13:04:23

@lee I'm just going to commit this to master so it ships quicker

Cora (she/her)13:04:35

❯ git diff HEAD
diff --git a/js/single-docset-search.tsx b/js/single-docset-search.tsx
index 7461755..81113ed 100644
--- a/js/single-docset-search.tsx
+++ b/js/single-docset-search.tsx
@@ -485,9 +485,6 @@ const SingleDocsetSearch = (props: { url: string }) => {
             onBlur={(event: FocusEvent) => {
               const input = event.target as HTMLInputElement;
               input.classList.toggle("b--blue");
-              if (showResults) {
-                setShowResults(false);
-              }
             }}
             onKeyDown={(event: KeyboardEvent) => {
               const input = event.target as HTMLInputElement;

Cora (she/her)13:04:25

can't believe I broke it 😬

lread13:04:05

Yeah, but the important thing is you noticed and you fixed it! 🎉

Cora (she/her)14:04:03

pretty sure that fixes all the things