cljdoc

Cora (she/her) 2023-03-12T01:07:01.657329Z

it would be really cool to provide an API for the data that the UI is built from. I have an itch to rebuild the UI

Cora (she/her) 2023-03-12T01:14:48.487949Z

I'm not sure what that would look like

Cora (she/her) 2023-03-12T01:37:18.000389Z

I suppose I could just return the entire cache-bundle and go from there

Cora (she/her) 2023-03-12T01:40:20.649279Z

any thoughts on this when you get a chance @lee?

Cora (she/her) 2023-03-12T01:45:40.203969Z

a UI in cljs would be nice for the community but it's hard to pass up all the mature, accessible UI libraries out there these days

Cora (she/her) 2023-03-12T01:48:16.022529Z

examples: https://mantine.dev/

Cora (she/her) 2023-03-12T01:48:32.127439Z

https://nextui.org/

Cora (she/her) 2023-03-12T01:50:15.228289Z

https://tailwindui.com/

Cora (she/her) 2023-03-12T01:51:09.107859Z

I'm not nearly as good a UI/UX person as all the collective hours put into these UI libraries, it's hard to just say no to all of this

Cora (she/her) 2023-03-12T02:11:34.314999Z

yep, the cache-bundle is basically all you would need to render the UI using any given frontend

Cora (she/her) 2023-03-12T02:25:52.036239Z

@lee https://github.com/cljdoc/cljdoc/pull/756

2023-03-12T02:56:18.534069Z

Counterpoint, the site loads instantly for me right now when I’m out of data in my phone. The lack of any fancy javascript framework makes browsing fast and natural. I’d hate to lose that

Cora (she/her) 2023-03-12T03:11:34.340389Z

we do use a fancy javascript framework, but for only a few things

Cora (she/her) 2023-03-12T03:12:49.476159Z

and server-side rendering has improved that story significantly. it's certainly lighter than using cljs

Cora (she/her) 2023-03-12T03:13:12.477969Z

but it's hard to argue with the lighthouse report on the current site: 98

Cora (she/her) 2023-03-12T03:13:39.830449Z

(98 on desktop, 70 on mobile)

Cora (she/her) 2023-03-12T03:20:40.547009Z

yeah, I'm looking at a jira clone built using remix.run right now and it's scoring a 97 on desktop and 65 on mobile...

phronmophobic 2023-03-12T03:43:48.797879Z

Theoretically, if there was an API, is that something that could be used by IDEs or desktop apps?

lread 2023-03-12T03:47:02.105269Z

Heya, sounds interesting!

lread 2023-03-12T03:48:01.688619Z

Be cool to get the dewey data in there too, but maybe that would just be to think about not do yet.

lread 2023-03-12T03:49:49.027009Z

This would allow front-end-smart folks to iterate quickly on different uis, ya?

lread 2023-03-12T03:50:10.704649Z

@smith.adriane I don't see why not.

lread 2023-03-12T03:52:02.187719Z

@corasaurus-hex not sure what API you had in mind, but if we aren't doing anything dynamic, I guess we could just generate static edn.

Cora (she/her) 2023-03-12T03:53:53.830329Z

that's true!

Cora (she/her) 2023-03-12T03:54:01.218429Z

I mean, we could content negotiate

lread 2023-03-12T03:55:45.402129Z

Is a goal a major redo of cljdoc, or are you just wanting to iterate faster on front end experiments, or maybe both?

lread 2023-03-12T03:58:43.809579Z

Not sure how practical static data is, but worth a think. We probably still want to support search and that would likely still be a dynamic server-side service, ya?

lread 2023-03-12T04:00:52.851029Z

If we are thinking of a major cljdoc redo, we could also brainstorm on any new features we'd like.

Cora (she/her) 2023-03-12T04:02:44.781029Z

I just wanted to experiment with it and maybe provide an api for others to do the same

lread 2023-03-12T04:02:52.129449Z

For example, I miss https://twitter.com/crossclojure?lang=en, but I don't know if its features are a fit for cljdoc.

Cora (she/her) 2023-03-12T04:03:24.607129Z

so a major redo of the ui in my case, just to see what I can do with a clean slate and some modern ui frameworks

Cora (she/her) 2023-03-12T04:03:39.696789Z

and for others, maybe ide stuff like @smith.adriane said

Cora (she/her) 2023-03-12T04:04:39.832239Z

I guess what I mean to say is I wanted to experiment with a new ui and it kind of prompted me to think about unlocking the data we have so others can experiment how they want as well

lread 2023-03-12T04:04:39.865289Z

I wouldn't think we'd get a ton of API traffic, but if we do, we'd have to figure out to deal with that.

Cora (she/her) 2023-03-12T04:04:46.564179Z

for sure

Cora (she/her) 2023-03-12T04:06:01.955179Z

there are options. given how static things are you could throw it on disk, on s3, in a cache, a cdn, etc

Cora (she/her) 2023-03-12T04:06:38.446589Z

likely easiest to try it and if we get too much traffic try sticking it on an object store that's cheap enough like s3

lread 2023-03-12T04:07:32.229199Z

ya, sounds fine to me.

lread 2023-03-12T04:10:08.861659Z

I guess we should ask our @martinklepsch what he thinks of all this. Cljdoc is his baby.

Cora (she/her) 2023-03-12T04:10:21.639939Z

for sure

lread 2023-03-12T04:11:10.720159Z

Nice to have your energy back here @corasaurus-hex!

šŸ’œ 2
lread 2023-03-12T04:11:22.782669Z

Oh and @nbtheduke, yeah good point.

lread 2023-03-12T04:13:51.330659Z

On Tailwind... I'm guessing when Tachyons was chosen for cljdoc, they were both equal in popularity. That changed a bit, ya?

Cora (she/her) 2023-03-12T04:15:53.090539Z

oh definitely

Cora (she/her) 2023-03-12T04:16:19.029849Z

I'm not a huge fan of utility css stuff and probably won't try another one of those

lread 2023-03-12T04:24:04.780449Z

I'm personally fine with that. It might just be the way we used Tachyons but I find the repetition a bit much. Maybe if we created and reused more components (fns, really). Dunno. Again @martinklepsch might have opinions on utility css! simple_smile

lread 2023-03-13T16:00:29.091649Z

Luckily https://github.com/cljdoc/cljdoc/issues/571 back then!

Cora (she/her) 2023-03-12T08:30:20.908769Z

yes, the repetition gets to me, too

martinklepsch 2023-03-12T08:37:17.541239Z

Hey! An api sounds like a great idea, definitely sounds like a good idea to allow people to build new or alternative UIs

šŸ‘ 1
lread 2023-03-12T14:04:21.944459Z

@corasaurus-hex I had been working on understanding our current cljdoc endpoints. And it is a bit confusing. Some endpoints are clearly API, others serve HTML and less obviously also act as API. Error returns are almost always unstructured (usually a single string). 500 returns do not respect content negotiation. These things are natural for a project that has grown organically over the years. But moving forward, we could probably define a clearer strategy for API endpoints. For an API that supports single-page apps, not too much to think about, maybe. Just maybe how we return errors? And if you are planning a cljdoc redo, probably best for me to pause on any cleanup (which is fine, I've been distracted by other work anyways).

Cora (she/her) 2023-03-12T17:47:28.542339Z

I wouldn't pause on cleanup, anything I do will be a longer-term effort and I'd probably want it to live alongside the current version for a while

Cora (she/her) 2023-03-12T17:47:55.067189Z

but only put in work you feel like putting in

Cora (she/her) 2023-03-12T17:48:33.852269Z

I didn't feel like putting in the work to revamp some of the parts of the UI, kind of wanted to start fresh and see what I could throw together, maybe spend some time in figma

Cora (she/her) 2023-03-12T17:49:14.952029Z

maybe it goes somewhere, maybe it doesn't, but exposing the cache-bundle seems like something useful in a broader sense, the information we have there is super valuable to the community

Cora (she/her) 2023-03-12T18:44:19.620689Z

I feel like the name needs some work. doc-bundle? analysis-bundle?

Cora (she/her) 2023-03-12T18:44:55.187359Z

"cache" is really an implementation detail and not a property of the data itself

martinklepsch 2023-03-12T19:51:03.220099Z

yeah, that name is definitely not great šŸ˜„

martinklepsch 2023-03-12T20:33:46.042829Z

both analysis and doc bundle seem like appropriate names

lread 2023-03-12T20:45:40.967139Z

we use "docsets" for the search api you built @corasaurus-hex, would that fit here?

Cora (she/her) 2023-03-13T00:26:14.251519Z

I think I used searchset for that?

Cora (she/her) 2023-03-13T00:26:19.228299Z

hmm maybe docset, too?

Cora (she/her) 2023-03-13T00:26:32.601899Z

docset is probably fine

Cora (she/her) 2023-03-13T01:03:41.231939Z

figuring out the cache bundle types is hard