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

Would like to link to a different doc page #34

Open
morethanreal opened this issue May 26, 2015 · 8 comments
Open

Would like to link to a different doc page #34

morethanreal opened this issue May 26, 2015 · 8 comments

Comments

@morethanreal
Copy link

I would like to refer to a the docs for a different element (potentially in the same repository) from a doc page.

@atotic atotic self-assigned this May 26, 2015
@atotic
Copy link
Contributor

atotic commented May 26, 2015

Me too!

@atotic atotic assigned mbleigh and unassigned atotic May 27, 2015
@mbleigh
Copy link
Contributor

mbleigh commented May 27, 2015

Is there a reason not to just use full markdown links?

On Wed, May 27, 2015, 9:32 AM Aleksandar Totic notifications@github.com
wrote:

Assigned #34
#34 to @mbleigh
https://github.com/mbleigh.


Reply to this email directly or view it on GitHub
#34 (comment)
.

@atotic
Copy link
Contributor

atotic commented May 27, 2015

How do we refer to docs for a different element? Will there be a canonical
url somewhere on polymer-project? Even then, there are multiple
versions.....

On Wed, May 27, 2015 at 9:55 AM, Michael Bleigh notifications@github.com
wrote:

Is there a reason not to just use full markdown links?

On Wed, May 27, 2015, 9:32 AM Aleksandar Totic notifications@github.com
wrote:

Assigned #34
#34 to
@mbleigh
https://github.com/mbleigh.


Reply to this email directly or view it on GitHub
<
#34 (comment)

.


Reply to this email directly or view it on GitHub
#34 (comment)
.

@mbleigh
Copy link
Contributor

mbleigh commented May 27, 2015

Yes, there will be canonical urls. I think versioning is something to worry
about down the road

On Wed, May 27, 2015, 11:01 AM Aleksandar Totic notifications@github.com
wrote:

How do we refer to docs for a different element? Will there be a canonical
url somewhere on polymer-project? Even then, there are multiple
versions.....

On Wed, May 27, 2015 at 9:55 AM, Michael Bleigh notifications@github.com
wrote:

Is there a reason not to just use full markdown links?

On Wed, May 27, 2015, 9:32 AM Aleksandar Totic <notifications@github.com

wrote:

Assigned #34
#34 to
@mbleigh
https://github.com/mbleigh.


Reply to this email directly or view it on GitHub
<

#34 (comment)

.


Reply to this email directly or view it on GitHub
<
#34 (comment)

.


Reply to this email directly or view it on GitHub
#34 (comment)
.

@arthurevans
Copy link
Contributor

See also #9. I think the correct solution from a tool point of view is to allow the author to link to ArbitraryElement with some specific syntax, like ArbitraryElement or
{@link ArbitraryElement} and have hydrolysis/a doc merger script/some other tool resolve those links when you generate a batch of docs.

@mbleigh mbleigh removed their assignment Jul 17, 2015
@notwaldorf
Copy link
Contributor

I think this already works with markdown, both with absolute and relative paths (to the current element). See https://github.com/PolymerElements/iron-icon/blob/master/iron-icon.html#L55 for an example.

@arthurevans
Copy link
Contributor

This kinda works now, but it works more or less by accident. It works because in the catalog, each element has a path like elements/foo-element... Provided that the element is the main element in a package. (You can't, for example, link to [paper-textarea](paper-textarea) and have it work, because the URL for that is elements/paper-input?active=paper-textarea.

You can embed the catalog-specific URL in your doc, but then you can't serve it statically, where the URL will be something like:

my-elements.html#iron-icons

And if you want to link to a specific property on a specific element, getouttatown.

So, my napkin-sketch of how this could work:

  1. hydrolysis resolves {@link iron-input} or {@link iron-input#property-type} to a reference to a particular element or member and inserts (something) in the markup.

Or:

1a. We insert the (something) directly in the markup, in the form of, say, a special URL:

  [iron-input](api:iron-input)
  1. iron-doc-viewer intercepts anchor clicks for api: URLs and fires an event.

  2. iron-component-page or the router of choice receives that event, translates it to the URL scheme in use, and navigates to it.

@arthurevans arthurevans reopened this Jan 27, 2016
@arthurevans
Copy link
Contributor

I'm fine with this being a low priority for now but I do think we need to solve it eventually. Probably blocked by: PolymerElements/iron-component-page#57

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

No branches or pull requests

6 participants