PolymerElements / iron-component-page

A reusable landing page for elements
36 stars 32 forks source link

Add hash deep linking support #71

Closed ebidel closed 8 years ago

ebidel commented 8 years ago

R: @arthurevans @garlicnation @cdata @rictic

Should be merged with https://github.com/PolymerElements/iron-doc-viewer/pull/68

ebidel commented 8 years ago

PTAL

ebidel commented 8 years ago

PTAL. This impl works with native shadow dom and shady dom.

I couldn't think of a cleaner way, but open to suggestions. One tricky thing that we needed to support is both linkable headers and properties/methods. Some of those elements are in iron-doc-viewer's shadow dom and show are in iron-doc-property's shadow dom. /deep/ is really the only option here. If the browser support native sd, they should also support this in qs()

arthurevans commented 8 years ago

What context could I test this in? Does it work with the element catalog, or core API docs?

ebidel commented 8 years ago

Check this patch out and the latest of iron-doc-viewer side by side. Then hit one of their index.html pages. I didn't test it with the element catalog, but it should work since that app uses these components. The one thing you'll probably want that isn't supported atm is being able to deep link into different sections of core api docs (e.g. the select dropdown for Polymer.Base/dom-repeat/etc). These PRs wont select the correct dropdown.

ebidel commented 8 years ago

I thought /deep/ was sticking around for imperative/querySelector usage...or until there was a replacement?

blasten commented 8 years ago

@ebidel is it? I didn't know. Then we could probably check for Polymer.Settings.useNativeShadow before using /deep/ wdyt?

ebidel commented 8 years ago

Done. PTAL

blasten commented 8 years ago

@ebidel LGTM