Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated documentation website visual layout (navigation) #1054

Open
flip111 opened this issue Oct 8, 2023 · 9 comments
Open

Generated documentation website visual layout (navigation) #1054

flip111 opened this issue Oct 8, 2023 · 9 comments

Comments

@flip111
Copy link
Contributor

flip111 commented Oct 8, 2023

On the generated documentation website there is this GROUP BY PACKAGE checkbox. It's a bit funny UI.

What about instead of a single Index in the navigation bar (top right), there will be two items instead Modules and Packages?

@f-f f-f transferred this issue from purescript/purescript Oct 8, 2023
@f-f
Copy link
Member

f-f commented Oct 8, 2023

I moved this issue into Spago, as this is part of the Halogen app that we add on top of the generated docs. Sources is here and PRs are most welcome 🙂

@f-f
Copy link
Member

f-f commented Oct 8, 2023

I don't have an opinion on the proposed change as of now, I think I'd need to see it visualised

@f-f f-f added the help wanted label Oct 8, 2023
@flip111
Copy link
Contributor Author

flip111 commented Oct 8, 2023

image

@CharlesTaylor7
Copy link
Collaborator

CharlesTaylor7 commented Oct 8, 2023

I agree the layout is a bit funky. For now it could be adapted to just be the list of modules. The grouping is not actually by package, but just into 3 groups: "local package", "builtins", and "everything else". I don't find those broad groupings very useful.

Screen Shot 2023-10-08 at 4 53 12 PM

@f-f
Copy link
Member

f-f commented Oct 9, 2023

IIRC previously it would actually group by package?
I think having it always grouped by package would be the most useful - sometimes I look for the package, sometimes I look for the module. We should load the page with the list of packages, and expand to the list of modules when clicking on an arrow next to it. Maybe have an "expand all" button too.

@flip111
Copy link
Contributor Author

flip111 commented Oct 9, 2023

We should load the page with the list of packages, and expand to the list of modules when clicking on an arrow next to it. Maybe have an "expand all" button too.

Great idea 👍

@f-f
Copy link
Member

f-f commented Oct 10, 2023

This is very close to what the previous Spago/docs-search did. I think the "group by package" feature broke in the migration, because it was more useful then - this picture is generated from the aff repo with Spago 0.21.0 and PureScript 0.14.9:

image

We'd keep a similar vibe, but with an arrow next to the package that lets you expand to the list of modules. Right now that heppens when you click on a package, but we should instead redirect to the readme of the package, just like in pursuit.

We'd also take away the checkbox for grouping by package because we'd always group by package like this, and add an "Expand/contract all" button to expand all the module lists in the packages.

@CharlesTaylor7
Copy link
Collaborator

This is very close to what the previous Spago/docs-search did. I think the "group by package" feature broke in the migration, because it was more useful then

I'm glad you brought this up. I did some sleuthing last night, and got it to split by packages again. I'll followup in the PR thread, with details.

We'd keep a similar vibe, but with an arrow next to the package that lets you expand to the list of modules.
...
We'd also take away the checkbox for grouping by package because we'd always group by package like this, and add an "Expand/contract all" button to expand all the module lists in the packages.

These are good changes. 👍

Right now that heppens when you click on a package, but we should instead redirect to the readme of the package, just like in pursuit.

Are we likely to have local copies of readmes?
I know npm publish always includes README.md, does spago publish do this too?

I ask, because I wanna keep spago docs as a feature that doesn't require an internet connection. If I'm online I'm usually reaching for Pursuit, instead.

@f-f
Copy link
Member

f-f commented Oct 10, 2023

Are we likely to have local copies of readmes?

We are. This is not yet a thing (not sure if we even have an issue for this), but we would like to enforce the presence of a README for Registry packages, so that we can embed them in the archives and Pursuit doesn't have to fetch them from somewhere else, but can access them offline.

Adding a "package page" would get us one step closer to "Pursuit in PureScript" as well 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants