Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

docs(api/dart): avoid duplicate entries and fix breadcrumbs #1945

Merged

Conversation

chalin
Copy link
Contributor

@chalin chalin commented Jul 21, 2016

Currently two entries are generated for top-level library members like classes, and the main API page for these members has no-so-useful breadcrumbs. E.g., the main API page for PipeMetadata has breadcrumb: angular2 > angular2 > PipeMetadata, vs. the proper breadcrumb angular2 > angular2.core > PipeMetadata that appears on the second copy of the API page entry.

TLDR; within the angular2 package there is a top-level catch-all library of the same name the exports most of the contained libraries. This results in duplicate API page entries (one for angular2.foo and one for angular2.some_sub_lib_id.foo). Furthermore, all internal page links to foo go to angualr2.foo so we loose breadcrumb information. This commit fixes the issue by hiding the top-level angular2 library definition only for the purpose of running dartdoc.

@chalin
Copy link
Contributor Author

chalin commented Jul 21, 2016

@kwalrath @wardbell @Foxandxss : ready for review.

I also did a minor cleanup, removing superfluous parentheses in the language regex.

@chalin
Copy link
Contributor Author

chalin commented Jul 21, 2016

Travis doc build is green. The failure is due to the e2e toh-6 flake.

@kwalrath
Copy link
Contributor

kwalrath commented Jul 21, 2016

The doc builds, but I don't see a difference in the output, compared to what's on angular.io. What should I look at/for?

@chalin
Copy link
Contributor Author

chalin commented Jul 21, 2016

Visit, say, Pipes, and then follow the PipeMetadata link in the Inheritance section. On ng.io it will bring up a page in dartdoc format. With this fix, it is in ng.io format.

@kwalrath
Copy link
Contributor

kwalrath commented Jul 21, 2016

Ah, OK. So those files are still being generated, but they aren't being linked to. Good. (Or at least better, if still not perfect.)

E.g., locally, I can still see http://localhost:8080/docs/dart/latest/api/angular2/PipeMetadata-class.html, but I guess it isn't linked to?

@chalin
Copy link
Contributor Author

chalin commented Jul 27, 2016

Yes.

Anything else to do before this is merged?

Currently two entries are generated for top-level library members like classes, and the main API page for these members has no-so-useful breadcrumbs. E.g., the main API page for `PipeMetadata` has breadcrumb: `angular2 > angular2 > PipeMetadata`, vs. the proper breadcrumb `angular2 > angular2.core > PipeMetadata` that appears on the second copy of the API page entry.

TLDR; within the `angular2` package there is a top-level catch-all library of the same name the exports most of the contained libraries. This results in duplicate API page entries (one for `angular2.foo` and one for `angular2.some_sub_lib_id.foo`). Furthermore, all internal page links to `foo` go to `angualr2.foo` so we loose breadcrumb information. This commit fixes the issue by hiding the top-level `angular2` library definition only for the purpose of running dartdoc.
@chalin chalin force-pushed the chalin-dart-api-avoid-duplicates-0721 branch from 0abb8a4 to f4b82a9 Compare July 29, 2016 22:09
@kwalrath
Copy link
Contributor

kwalrath commented Aug 1, 2016

@wardbell or @Foxandxss does the code look good to you?

@kwalrath kwalrath merged commit bf3e107 into angular:master Aug 1, 2016
@kwalrath kwalrath deleted the chalin-dart-api-avoid-duplicates-0721 branch August 1, 2016 21:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants