cljdoc

lread 2022-04-25T12:34:45.589359Z

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) 2022-04-25T13:00:19.269579Z

is it worth crafting an announcement?

lread 2022-04-25T13:02:07.762369Z

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

Cora (she/her) 2022-04-25T13:02:43.306859Z

ahhh ok

lread 2022-04-25T13:05:14.830649Z

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…

lread 2022-04-25T13:06:14.984239Z

Oh description on #announcements sez ā€œPlease keep them occasionalā€.

lread 2022-04-25T13:07:47.451739Z

I’ll post the news in #releases

šŸ‘šŸ» 1
Cora (she/her) 2022-04-25T13:12:30.216619Z

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

lread 2022-04-25T13:14:32.778059Z

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) 2022-04-25T13:46:02.248669Z

gah, all search clicks are broken

Cora (she/her) 2022-04-25T13:46:03.224079Z

oof

Cora (she/her) 2022-04-25T13:46:26.867149Z

fixes it

šŸš€ 1
Cora (she/her) 2022-04-25T13:50:23.984639Z

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

Cora (she/her) 2022-04-25T13:50:35.026829Z

āÆ 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;

lread 2022-04-25T13:50:37.065989Z

Sure!

Cora (she/her) 2022-04-25T13:51:25.575209Z

can't believe I broke it 😬

lread 2022-04-25T13:52:05.109919Z

Yeah, but the important thing is you noticed and you fixed it! šŸŽ‰

Cora (she/her) 2022-04-25T14:16:58.763359Z

@lee https://github.com/cljdoc/cljdoc/pull/618/files

Cora (she/her) 2022-04-25T14:17:03.286079Z

pretty sure that fixes all the things

lread 2022-04-25T17:10:46.897309Z

Awesome!

Cora (she/her) 2022-04-25T01:21:51.694089Z

oof, type errors

Cora (she/her) 2022-04-25T01:22:24.625009Z

Cora (she/her) 2022-04-25T01:23:07.181889Z

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

Cora (she/her) 2022-04-25T02:12:18.622359Z

oof, this is all tangled

lread 2022-04-25T02:56:59.570459Z

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) 2022-04-25T03:02:25.527569Z

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

Cora (she/her) 2022-04-25T03:03:50.911789Z

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

Cora (she/her) 2022-04-25T03:08:59.668409Z

or put in the work to switch to cljs

lread 2022-04-25T03:14:11.739619Z

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) 2022-04-25T03:42:33.289149Z

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

Cora (she/her) 2022-04-25T03:43:08.584189Z

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

šŸ¤” 1
lread 2022-04-25T12:40:33.901249Z

There’s an old https://github.com/cljdoc/cljdoc/issues/70 on this topic.

lread 2022-04-25T12:42:42.333699Z

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

Cora (she/her) 2022-04-25T12:59:01.701849Z

oooooh

Sam Ritchie 2022-04-25T14:03:29.341129Z

big upvote here, rendering docs with clerk would be amazing

Cora (she/her) 2022-04-25T14:18:02.868319Z

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

Cora (she/her) 2022-04-25T14:18:53.558629Z

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

Cora (she/her) 2022-04-25T14:19:20.657889Z

puts on her infosec hat

Cora (she/her) 2022-04-25T14:22:09.760759Z

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) 2022-04-25T14:22:45.934349Z

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

lread 2022-04-25T17:12:42.669279Z

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
lread 2022-04-25T17:15:37.833689Z

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

Cora (she/her) 2022-04-25T17:16:48.831519Z

yikes

lread 2022-04-25T17:18:13.378169Z

Part of all that background maintenance work I was doing.

Cora (she/her) 2022-04-25T17:18:28.984809Z

you're the real MVP, Lee

lread 2022-04-25T17:19:05.716769Z

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