denoland / dotland

[Archived] deno.land website
https://deno.land
MIT License
957 stars 626 forks source link

Must view source to get to directory view and README.md #2379

Closed KyleJune closed 2 years ago

KyleJune commented 2 years ago

I wanted to look at the tests for binary_heap.ts. When I went to https://deno.land/std@0.152.0/collections it redirected me to https://deno.land/std@0.152.0/collections/mod.ts. The test files and the files starting with underscore do not show up on the left hand side of the documentation view. If you try clicking the link for the collections directory, it will just redirect to the documentation page for mod.ts file again. To view the collections directory, you have to first click to view code, then click on collections.

https://user-images.githubusercontent.com/3241653/184559755-100797b8-ab2b-4e4d-9e5a-6fb386743c60.mp4

crowlKats commented 2 years ago

Regarding readme denoland/website_feedback#21

well, what do you want in a directory in the docview? the sidepanel already shows the directory structure of the current directory. for a traditional directory listing, you need to be in codeview

KyleJune commented 2 years ago

The collections being a clickable link made me think it would take me to the directory view that would show me all the files. I was trying to get to view the test files when I clicked on collections. It was confusing that it just kept redirecting me to the mod.ts view.

The collections link at the top would be less confusing if it didn't just redirect back to the mod.ts file. Alternatively a button could be added to the top next to the code view button that says something like "View full directory".

The code view button in the top right isn't obvious. It would be nice if when viewing a file it said "View source" and when viewing a directory it said "View all".

kitsonk commented 2 years ago

In part we want to de-emphasise just listing the files in a repo... GitHub does a much better job of that. A "directory listing of every file in a directory" is sort of legacy behaviour. We provide a link to the repo at the top of every page, and that is more effective way of browsing a repo.

Consider things like:

None of them just provide a file listing of just the files. They all extract data and provide a more "documentation" view based on the underlying code.

I know that is a change in behaviour, but we need to move beyond just a poor version of GitHub for deno.land/x.

Given that context, I don't think we want to make it too obvious that you can get a "legacy" directory listing (or if we do, we plop them back in GitHub/source repo at the right spot). Preserving the code view is useful for generating links to the source code as well as allowing linking from stack traces, but that should be navigated to, IMO, from locations within the documentation view (like on docs.rs or pkg.go.dev).

KyleJune commented 2 years ago

I didn't realize the old directory screen is legacy. I'll close this then since the behavior I was seeking was the legacy behavior that Deno is moving away from. I'll just remember to go to GitHub instead if I want to browse all the files in a directory.