From 58a0bfae4d9f93b6d4d49773b6e51e704b734036 Mon Sep 17 00:00:00 2001 From: Alexander Marks Date: Mon, 12 Jun 2017 19:32:26 -0700 Subject: [PATCH 1/9] Forward base-href property to iron-doc-viewer. --- iron-component-page.html | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/iron-component-page.html b/iron-component-page.html index bd1c5ff..a86f014 100644 --- a/iron-component-page.html +++ b/iron-component-page.html @@ -97,6 +97,7 @@ @@ -116,6 +117,15 @@ observer: '_descriptorUrlChanged' }, + /** + * By default all routing is performed using the URL fragment + * (e.g. `docs.html#/elements/my-element`). If your server supports + * it and you would like to use the real URL path instead (e.g. + * `/docs/elements/my-element`), set this to the base path where the + * page is mounted (e.g. `/` or `/docs/`). + */ + baseHref: String, + _loading: Boolean, _error: Object, From a7c67b4a794ebb81417f36fe5d3e6fe828740bff Mon Sep 17 00:00:00 2001 From: Alexander Marks Date: Mon, 12 Jun 2017 21:46:24 -0700 Subject: [PATCH 2/9] Default to analysis.json URL. --- iron-component-page.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/iron-component-page.html b/iron-component-page.html index a86f014..fda5c42 100644 --- a/iron-component-page.html +++ b/iron-component-page.html @@ -112,8 +112,12 @@ is: 'iron-component-page', properties: { + /** + * URL of the Polymer Analyzer descriptor to fetch and display. + */ descriptorUrl: { type: String, + value: 'analysis.json', observer: '_descriptorUrlChanged' }, From c58af7221741b8c75f80c8fb6fb744d99f88fb34 Mon Sep 17 00:00:00 2001 From: Alexander Marks Date: Mon, 12 Jun 2017 22:09:10 -0700 Subject: [PATCH 3/9] Remove inert default view code. --- iron-component-page.html | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/iron-component-page.html b/iron-component-page.html index fda5c42..a740e4c 100644 --- a/iron-component-page.html +++ b/iron-component-page.html @@ -166,25 +166,6 @@ this._changing = true; this._descriptor = _flatten(descriptor); this._changing = false; - - return; - - var behaviors = descriptor.metadata - && descriptor.metadata.polymer - && descriptor.metadata.polymer.behaviors; - - if ((descriptor.namespaces || []).length) { - this._path = '/namespaces/' + descriptor.namespaces[0].name; - } else if ((descriptor.elements || []).length) { - var element = descriptor.elements; - this._path = '/elements/' + (element.tagname || element.name); - } else if ((behaviors || []).length) { - this._path = '/behaviors/' + behaviors[0].name; - } else if ((descriptor.mixins || []).length) { - this._path = '/mixins/' + descriptor.mixins[0].name; - } else if ((descriptor.classes || []).length) { - this._path = '/classes/' + descriptor.classes[0].name; - } }, _titleChanged(title) { From fe0eab9c8fdadbaded8e9a1a41628914a5d24e5b Mon Sep 17 00:00:00 2001 From: Alexander Marks Date: Mon, 12 Jun 2017 22:15:34 -0700 Subject: [PATCH 4/9] Don't show hamburger unless in narrow layout. --- iron-component-page.html | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/iron-component-page.html b/iron-component-page.html index a740e4c..5744e03 100644 --- a/iron-component-page.html +++ b/iron-component-page.html @@ -26,8 +26,12 @@