Agoric / agoric-sdk

monorepo for the Agoric Javascript smart contract platform
Apache License 2.0
326 stars 206 forks source link

Generic module names in search and respective doc pages #9919

Open mujahidkay opened 1 month ago

mujahidkay commented 1 month ago

Description

Generic module names, specifically index, are present in docs. The easiest way to check is to navigate to docs and search for index.

image

or cases like when you search for debug:

image

When you visit the latter, you land on a blank(ish) page (just refresh, separate issue). The url you land on is https://docs.agoric.com/reference/agoric-sdk/modules/agoric_swingset_liveslots.index.html#parameters-5 (notice the .index.html)

if you navigate one level above, to https://docs.agoric.com/reference/agoric-sdk/modules/agoric_swingset_liveslots.html#parameters-5 you see that it lists index as a module as well as types and vatDataTypes. This is due to the fact that the typedoc.json file has all three of these as its entry points, so it treats them as separate modules.

Why do we need to explicitly specify types and vatDataTypes as entrypoints here? Both of these are being exported from src/index.js anyways, and they do become a part of docs that way. If you remove them from entrypoints, the search entries as well the module name on the page itself gets fixed.

image

Before After
image image

^This reorganizes everything under the same module as well as remove duplicate entries (entries that were previously both under index as well as either types or vatDataTypes

But there are some cases like inter-protocol, where we do have two entrypoints (src/index.js and src/clientSupport.js) but the latter isn't being exported from src/index.js so we can not just remove it as an entrypoint. Would it be safe to just export it from index.js instead? Is there a better way to go about this or is this intentional?

P.S. I just need more clarity on this before I open a fix PR.

Elephant in the Room

There are links such as Ratio Math and the one above that don't render completely, they do load on refresh though. image This seems to be a separate problem so I will report a separate issue for that.

dckc commented 3 weeks ago

The copy of the reference docs in docs.agoric.com is in a strange state. It should probably get removed.

https://github.com/Agoric/documentation/issues/927#issuecomment-2052276872

Current reference docs are at https://agoric-sdk.pages.dev/

Reference docs issues probably belong in the agoric-sdk repo now.

mujahidkay commented 3 weeks ago

The copy of the reference docs in docs.agoric.com is in a strange state. It should probably get removed.

#927 (comment)

Current reference docs are at https://agoric-sdk.pages.dev/

Reference docs issues probably belong in the agoric-sdk repo now.

@dckc should we move this to agoric-sdk then? Because the underlying naming issue still persists on the new url as well. Screenshot 2024-08-19 at 9 56 54 PM

dckc commented 3 weeks ago

should we move this to agoric-sdk then?

yes, I suppose so