-
Notifications
You must be signed in to change notification settings - Fork 18k
x/pkgsite: subdirectories are missing for nested modules #38596
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
Comments
Thanks for the feedback! The reason storage is not listed there is because cloud.google.com/go/storage is a nested module: This means that it is not a subdirectory of cloud.google.com/go. When you download cloud.google.com/go via proxy.golang.org (https://proxy.golang.org/cloud.google.com/go/@v/v0.56.0.zip), you will notice that it is not there. We understand that this is confusing from a UI perspective and plan to address it in the upcoming round of design changes. /cc @fflewddur @Joanne881107 |
Thanks for the explanation, @julieqiu. I see that the old documentation is actually misleading in this case. I wonder if it would help if the UI were explicit about packages and nested modules instead of using "subdirectories" to describe these things. I don’t know if "nested" is a formal class of modules, but it would help clarify what you get when installing a module (packages) vs. what you need to install separately (modules that may share part of the same path). |
Change https://golang.org/cl/253742 mentions this issue: |
Hey there! We’re planning to add nested modules to the bottom of the subdirectories page. For example, https://pkg.go.dev/cloud.google.com/go?tab=subdirectories will show: |
Change https://golang.org/cl/254018 mentions this issue: |
Change https://golang.org/cl/254019 mentions this issue: |
This change creates a function in the DataSource interface that retrieves the nested modules as ModuleInfos given a path to a directory. Note that proxydatasource is included since it is required to fill the datasource interface but only returns an empty slice since we are not implementing the functionality there. This change also adds a scanModuleInfo helper function for scanning ModuleInfo from the db. Updates golang/go#38596 Change-Id: I02f25aad2640a0828e58d622d1c8661e6a303b84 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/253742 Reviewed-by: Julie Qiu <julie@golang.org>
This change adds NestedModules to the directory struct in order to later render the data in the subdirectories page of a package. We also modify the createDirectory function to take in a nestedModules parameter. Updates golang/go#38596 Change-Id: I9bcfc1f2aa37ac0b03b5def4b237473310690af6 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/254018 Reviewed-by: Jonathan Amsterdam <jba@google.com> Reviewed-by: Julie Qiu <julie@golang.org>
…ectories page This change adds the HTML and CSS changes for the subdirectories template to include nested modules in the table with a modules badge. This includes adding a --light-blue CSS variable to reflect the blue background of the modules badge. This change also deletes the _directories.tmpl helper template so that iterating through the packages and nested modules in the HTML table is a lot clearer. before/after images: https://photos.app.goo.gl/2reDtNHxThVnDMiL9 Updates golang/go#38596 Change-Id: Id1dad1ba3a28881a203bf90afe1d5372ede2317c Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/254019 Reviewed-by: Julie Qiu <julie@golang.org> Reviewed-by: Jonathan Amsterdam <jba@google.com> Reviewed-by: Jamal Carvalho <jamal@golang.org>
The issue is now closed because the feature is slowly being rolled out now! 👍 |
Thanks for the improvements! |
What is the URL of the page with the issue?
https://pkg.go.dev/cloud.google.com/go?tab=subdirectories
What is your user agent?
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.113 Safari/537.36
Screenshot
What did you expect to see?
I was looking for a link to the storage package. This is listed on the godoc.org as a subdirectory.
I don't see a link to the same under the subdirectories tab from pkg.go.dev.
What did you see instead?
The list of subdirectories does not include storage.
The text was updated successfully, but these errors were encountered: