-
Notifications
You must be signed in to change notification settings - Fork 218
Linking to external types - docgen #549
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
Conversation
… and insert links to external library documentation.
hiranya911
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly good. Just a few suggestions to improve on.
…console log, JSDOM is now imported with one line, and Map of types and links is now created from a JSON file, Still need to resolve a couple of Hiranya's comments.
…ons into em-docgen-types
…' rather than 'read file'. JSON file is now simpler. Script only replaces fully qualified names rather than aliases in document.
| */ | ||
| function addTypeAliasLinks(data) { | ||
| const htmlDom = new JSDOM(data); | ||
| const fileTags = htmlDom.window.document.querySelectorAll(".tsd-signature-type"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not immediately clear why we're selecting .tsd-signature-type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add a comment here explaining why this tag, so that the next contributor knows the context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding what I think Erik was doing -- just picking an ID to iterate through that would always be associated with potential external types in TypeDoc.
|
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
1 similar comment
|
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
joehan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks fine to me, and after looking thru the staging site, the choice of .tsd-signature-type seems appropriate. However, in the description, it says that DocumentSnapshot should now be hyperlinked on the staged site, and I don't see that. Has this code just been unstaged in the past few months?

Checked with Hiranya offline; all has been address afaict.
|
@googlebot I fixed it. |
|
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) ℹ️ Googlers: Go here for more info. |
1 similar comment
|
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) ℹ️ Googlers: Go here for more info. |
|
Overriding the CLA bot here, as we have a CLA from the commit author from a different email, and the commits causing the check to fail are from github. |
This is the first iteration of my solution to linking to external library types for the Firebase Functions Reference documentation.
tsd-signature-type.In these staged files, there are now links to
UserInfo,UserRecord, andDocumentSnapshottypes: