Open kwalrath opened 6 years ago
If we have a banner, it could be similar to what we have on www.dartlang.org:
This reference describes Dart 1.[version]. For the Dart 2 API reference, see api.dartlang.org/dev.
@jcollins-g do you know how to do this?
@kwalrath
I'm not an expert on the requisite HTML/CSS-fu to do this in a nice-looking way, but I think I could come up with something to programmatically insert whatever we come up with into the documentation.
We just have to hand-edit this file and upload it to storage
https://storage.googleapis.com/dartlang-api-docs/gen-dartdocs/stable/1.24.3/index.html
@keertip has upload rights. Just need to update the file and ask her nicely to upload it 😃
I'll work on the HTML/CSS and then we can talk about how to get that code in there.
Excellent
On Thu, Apr 26, 2018 at 9:48 AM Kathy Walrath notifications@github.com wrote:
I'll work on the HTML/CSS and then we can talk about how to get that code in there.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dart-lang/api.dartlang.org/issues/69#issuecomment-384711106, or mute the thread https://github.com/notifications/unsubscribe-auth/AABCijm4ZGJ-uVXQxKRJemHIIrhL9Lidks5tsfpBgaJpZM4TimDY .
How about this:
LGTM
On Thu, Apr 26, 2018 at 10:10 AM Kathy Walrath notifications@github.com wrote:
How about this:
[image: image] https://user-images.githubusercontent.com/2164483/39320760-f9f71c30-4939-11e8-8dcc-ec1195251605.png
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dart-lang/api.dartlang.org/issues/69#issuecomment-384717875, or mute the thread https://github.com/notifications/unsubscribe-auth/AABCijv2rLu8MM-5QBUBWBlevqiOB27nks5tsf90gaJpZM4TimDY .
The new text in index.html is the first <p>
element in the following <section>
:
<section class="desc markdown">
<p style="background: #e2f4fd; padding: 20px">
This documentation covers <b>Dart 1.24.</b>
For the <b>Dart 2</b> API reference, see
<b><a href="https://api.dartlang.org/dev">api.dartlang.org/dev</a>.</b>
</p>
<p>Welcome to the Dart API reference documentation, covering the official Dart API
We have the simple fix up. It'd be nice to implement a real switcher, but that isn't as urgent.
Now that we have even more channels, we should make it easy to switch between the stable, dev, beta, & be docs. I recently had to tell someone about the be docs: https://github.com/dart-lang/site-www/issues/2518#issuecomment-692835818.
Adding a 404 (#19, from 2013!) would be part of this work.
We need an easy way for api.dartlang.org users to switch from the stable channel to the dev channel.
A simple way to do this would be to somehow stick a link on the homepage to https://api.dartlang.org/dev.
A more complex way to do this would be to have a version switcher on every page that tries to take you to the equivalent page in whichever version you select: stable or dev or be.
The sooner the better, since dartlang.org is already on Dart 2. (dartlang.org does take you to the dev version of API docs, but that doesn't help people who type in api.dartlang.org.)
I'll be happy to help with the words, but I couldn't figure out how to implement it myself.
/cc @kevmoo