elm / elm-lang.org

Server and client code for the Elm website.
http://elm-lang.org/
BSD 3-Clause "New" or "Revised" License
1.99k stars 365 forks source link

It should be easy to go from elm-lang.org -> packages.elm-lang.org and back #351

Closed eeue56 closed 9 years ago

eeue56 commented 9 years ago

At the moment, moving between elm-lang.org and packages.elm-lang.org is a bit of a pain - at the moment a user has to navigate to elm-lang.org/docs, then click on community packages. Once you're on packages.elm-lang.org, there doesn't seem to be a way to get back to elm-lang.org.

I would suggest changing it so that the icon in the topleft corner always takes you back to elm-lang.org. There should may be another icon in that bar that links to packages, or in the nav bar of elm-lang.org

jvoigtlaender commented 9 years ago

See https://github.com/elm-lang/package.elm-lang.org/pull/10.

evancz commented 9 years ago

@jvoigtlaender's issue encodes this request, so let's follow along there.

I will point out though that the current setup is pretty standard as far as I can tell. Here is the Rust site. Try to get to their package site from there. Here is the package site. Try to get to the language site from there.

I think you'll see this in a bunch of languages.

So I guess the question is, what is your workflow that this would be good? I expect typical users of the package site will just be looking at it. And that typical users of the Elm site would have docs open in a separate tab.

I also think that having the icon link to a totally different site is pretty much never done on the internet today. "top left icon" means go to the root of this domain. I think we'd get the reverse of this issue as soon as we did it. "That's not what it's supposed to do!"

Knowing the elm site is for beginners, do we really want a top level link that dumps them in package docs? Full of types and assumptions of basic Elm familiarity? I don't think so (which is why it's not that way).

If this logic is wrong, I'd be curious to see another language where the main site and package site work as described here or in @jvoigtlaender's pull request.

I've never actually written this down, but it makes me pretty sure the current way is the best way. I'm going to close this one, but we can continue discussion here if necessary. If my assessment is correct, we can close that PR as well.

eeue56 commented 9 years ago

The use case here was jumping between the documentation outlined for syntax and structure on elm-lang.org and the core methods on package.elm-lang.org. An example of this is looking at the Signal examples from http://elm-lang.org/guide/architecture.

I'm not disagreeing that the separate of packages and elm-lang doesn't make sense - given your example of beginners not needing package.elm-lang.org for learning is a good one. But I'd like to counter that with the use case of someone trying to look at the built-in (core) methods while also learning the syntax. For this they will always need package.elm-lang.org to be open. Perhaps what is needed is for the core documentation to exist under elm-lang, not just package.elm-lang.org?

Python seems to have taken a similar route, but python.org is separated from learning or references at all, because that's all on docs.python.org. The Python docs for packages shows built in methods and types and noted at the top. which is separate from the language reference - but it is possible to get back to python.org, and all the documentation is contained within a subdomain separate from the main language site.

Golang has everything under a single domain, documentations and packages combined. You are able to jump to packages from anywhere on the language reference. This is the example I had in mind when I was thinking about this - it's easy to look at what a function does, then jump back to reading effective Go.

I think the Python model is superior for someone starting out with a language from scratch, but the Golang model is better for someone who already knows how to program. Perhaps this change isn't needed in this case then.