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

x/pkgsite: subdirectories are missing for nested modules #38596

Closed
tschaub opened this issue Apr 22, 2020 · 8 comments
Closed

x/pkgsite: subdirectories are missing for nested modules #38596

tschaub opened this issue Apr 22, 2020 · 8 comments

Comments

@tschaub
Copy link

@tschaub tschaub commented Apr 22, 2020

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

image

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.

image

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.

@gopherbot gopherbot added this to the Unreleased milestone Apr 22, 2020
@gopherbot gopherbot added the pkgsite label Apr 22, 2020
@julieqiu
Copy link
Contributor

@julieqiu julieqiu commented Apr 22, 2020

Thanks for the feedback! The reason storage is not listed there is because cloud.google.com/go/storage is a nested module:
https://github.com/googleapis/google-cloud-go/blob/v0.56.0/storage/go.mod

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

@julieqiu julieqiu changed the title go.dev: Missing subdirectories pkg.go.dev: subdirectories are missing for nested modules Apr 22, 2020
@tschaub
Copy link
Author

@tschaub tschaub commented Apr 23, 2020

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).

@julieqiu julieqiu changed the title pkg.go.dev: subdirectories are missing for nested modules x/pkgsite: subdirectories are missing for nested modules Jun 15, 2020
@gopherbot
Copy link

@gopherbot gopherbot commented Sep 9, 2020

Change https://golang.org/cl/253742 mentions this issue: internal: create GetNestedModules function in DataSource

@AceroM
Copy link

@AceroM AceroM commented Sep 10, 2020

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:
image

@gopherbot
Copy link

@gopherbot gopherbot commented Sep 10, 2020

Change https://golang.org/cl/254018 mentions this issue: internal/frontend: add NestedModules field to Directory struct

@julieqiu julieqiu removed the UX label Sep 10, 2020
@gopherbot
Copy link

@gopherbot gopherbot commented Sep 10, 2020

Change https://golang.org/cl/254019 mentions this issue: content/static: add HTML/CSS changes for nested modules in the subdirectories page

gopherbot pushed a commit to golang/pkgsite that referenced this issue Sep 11, 2020
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>
gopherbot pushed a commit to golang/pkgsite that referenced this issue Sep 11, 2020
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>
gopherbot pushed a commit to golang/pkgsite that referenced this issue Sep 11, 2020
…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>
@AceroM AceroM closed this Sep 15, 2020
@AceroM
Copy link

@AceroM AceroM commented Sep 15, 2020

The issue is now closed because the feature is slowly being rolled out now! 👍

@tschaub
Copy link
Author

@tschaub tschaub commented Sep 17, 2020

Thanks for the improvements!

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

Successfully merging a pull request may close this issue.

None yet
4 participants