Giter Site home page Giter Site logo

api.dart.dev's People

Contributors

alan-knight avatar amouravski avatar athomas avatar efortuna avatar franklinyow avatar jacob314 avatar jcollins-g avatar jonasfj avatar keertip avatar kevmoo avatar mit-mit avatar mkustermann avatar sethladd avatar sigmundch avatar sortie avatar terrylucas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

api.dart.dev's Issues

Keyboard shortcuts for search

Up and down arrow don’t work in search. Hitting enter doesn’t work either. Also I think it’s missing ctrl+3 (cmd+3 on mac) shortcut for focusing on search box.
(feature request) search box + keyboard events: after you search and the completion shows some good results, it would be great if I could navigate to a query result using the keyboard. For example, use the up and down keys to highlight an option, and hit enter to select it.

Add a Search URL

The search box is backed by JS magic and I don't ever see it hit a URL to do the searching.
I'd like to add a search engine shortcut to chrome but I'd need to be able to build a query URL and I can't find a way to do that.

Multiple color schemes...

Would be nice to be able to switch to a "dark" mode without using plugins. Small stylish example:

body {
  background: #202020;
  color: #d0d0d0;
}

.sidebar {
  background: #606060;
}

.sidebar a {
  color: rgb(182, 182, 182);
}

section.summary h2,
.signature,
dd {
  color: rgb(190, 190, 190);  
}

code {
  background: #404040;
}

stack trace from server: http://api.dartlang.org/docs/releases

local variable 'path' referenced before assignment
Traceback (most recent call last):
  File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1511, in __call__
    rv = self.handle_exception(request, response, e)
  File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1505, in __call__
    rv = self.router.dispatch(request, response)
  File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1253, in default_dispatcher
    return route.handler_adapter(request, response)
  File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1077, in __call__
    return handler.dispatch()
  File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 547, in dispatch
    return self.handle_exception(e, self.app.debug)
  File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 545, in dispatch
    return method(*args, **kwargs)
  File "/base/data/home/apps/s~dartlang-api/releases-test.364427003867948283/scripts/redirector.py", line 80, in get
    path = self.resolve_doc_path()
  File "/base/data/home/apps/s~dartlang-api/releases-test.364427003867948283/scripts/redirector.py", line 75, in resolve_doc_path
    if path.endswith('/'):
UnboundLocalError: local variable 'path' referenced before assignment

Traceback (most recent call last):
  File "/python27_runtime/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 223, in Handle
    result = handler(dict(self._environ), self._StartResponse)
  File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1519, in __call__
    response = self._internal_error(e)
  File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1511, in __call__
    rv = self.handle_exception(request, response, e)
  File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1505, in __call__
    rv = self.router.dispatch(request, response)
  File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1253, in default_dispatcher
    return route.handler_adapter(request, response)
  File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1077, in __call__
    return handler.dispatch()
  File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 547, in dispatch
    return self.handle_exception(e, self.app.debug)
  File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 545, in dispatch
    return method(*args, **kwargs)
  File "/base/data/home/apps/s~dartlang-api/releases-test.364427003867948283/scripts/redirector.py", line 80, in get
    path = self.resolve_doc_path()
  File "/base/data/home/apps/s~dartlang-api/releases-test.364427003867948283/scripts/redirector.py", line 75, in resolve_doc_path
    if path.endswith('/'):
UnboundLocalError: local variable 'path' referenced before assignment

"Properties" link is broken

Clicking on the "Properties", "Constructors", "Methods", etc. links in the right-hand side grey box doesn't do anything.

Make version-agnostic URLs the default

[Copied from https://github.com/dart-lang/dartdoc/issues/1074.]

People are constantly linking to, say, https://api.dartlang.org/1.12.1/dart-core/Object-class.html when they should instead be linking to https://api.dartlang.org/stable/dart-core/Object-class.html (or maybe a shorter URL like https://api.dartlang.org/dart-core/Object-class.html).

We should make it easier to get a good permalink. This could be combined, somehow, with showing the current version and a way of switching to the stable/dev version of the docs.

Personally, I'd rather have the displayed URL be generic (https://api.dartlang.org/dart-core/Object-class.html) unless you choose a particular version.

An (extreme) example of this is in the AngularJS docs:

image

The docs for angular.bind are in https://docs.angularjs.org/api/ng/function/angular.bind. A dropdown at the upper left shows which build the docs reflect. If you want another build, you can choose it from the dropdown. For example, if you use v1.4.8, then the URL switches to https://code.angularjs.org/1.4.8/docs/api/ng/function/angular.bind. (It's difficult to get back to the real "latest", so ... not a perfect solution.)

To repeat: We should make it easy for people to do the right thing, which I believe is linking to the latest stable version of the docs. We should make it possible to link to other docs, with minimal effort on the linker's part.

[Feature] Add history

One thing I really love with ExtJs API docs is that each new doc page is opened in a new tab.

That way you can esaily switch between 2/3 classes without having to reload them. That something that is quite often use during develoment.

Would you consider adding this feature ?

Exception thrown on legacy URL

Try going to https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/dart-async.Zone

I see:

global name 'self' is not defined
Traceback (most recent call last):
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1511, in __call__
    rv = self.handle_exception(request, response, e)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1505, in __call__
    rv = self.router.dispatch(request, response)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1253, in default_dispatcher
    return route.handler_adapter(request, response)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1077, in __call__
    return handler.dispatch()
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 547, in dispatch
    return self.handle_exception(e, self.app.debug)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 545, in dispatch
    return method(*args, **kwargs)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 652, in get
    uri = func(self, *args, **kwargs)
  File "/base/data/home/apps/s~dartlang-api/even-moar-redirects.386919581618495439/scripts/redirector.py", line 292, in redir_name
    self.error(404)
NameError: global name 'self' is not defined

Traceback (most recent call last):
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 267, in Handle
    result = handler(dict(self._environ), self._StartResponse)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1519, in __call__
    response = self._internal_error(e)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1511, in __call__
    rv = self.handle_exception(request, response, e)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1505, in __call__
    rv = self.router.dispatch(request, response)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1253, in default_dispatcher
    return route.handler_adapter(request, response)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1077, in __call__
    return handler.dispatch()
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 547, in dispatch
    return self.handle_exception(e, self.app.debug)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 545, in dispatch
    return method(*args, **kwargs)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 652, in get
    uri = func(self, *args, **kwargs)
  File "/base/data/home/apps/s~dartlang-api/even-moar-redirects.386919581618495439/scripts/redirector.py", line 292, in redir_name
    self.error(404)
NameError: global name 'self' is not defined

Deleting old docs

Hi,

We can delete the old build number docs, if not already deleted.

minor UI nit: extra pixel line?

I just noticed a minor thing in the UI on my chromebook. THis only shows up when the window is maximized vertically.

I can see a line, practically just a 1px width, between the top-banner and the sub-banner. Here is a screenshot:

screenshot 2015-11-17 at 9 29 50 am

Then, when scrolling down and you make the subbanner disappear, the pixel line is visible on the top, above the top-banner. See for example that in this screenshot some of the letters are visible behind the banner (between the grey bookmarks bar and the Dart SDK banner:

screenshot 2015-11-17 at 9 30 01 am

Version information: Google Chrome 46.0.2490.82 (Official Build) (64-bit)

Page is empty

When going to the address http://api.dartlang.org (redirects to https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/home) the page only displays the text: Dart API Documentation.

Similar, when going to https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/dart:html.Element displays: Dart API Documentation for dart:html.Element.

This behavior has been observed in Google Chrome (Version 43.0.2357.125 (64-bit)) on Ubuntu 15.04 and Google Chrome (Version 43.0.2357.124 m) on Windows 8.

Update favicon

If you look at dart.dev, you can see that it has the new, less green logo. I think this site should use that new logo, too.

Screenshot_20200122-161811

HttpRequest catchError parameter type and error message

In the API docs for HttpRequest (https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/dart:html.HttpRequest) is example and it has catchError part with parameter type "Error".

When I run the code and there is error (I am testing catchError part), I get:
"Exception: Uncaught Error: type '_XMLHttpRequestProgressEvent' is not a subtype of type 'Error' of 'error'."

Because the type of parameter is not "Error" but "_XMLHttpRequestProgressEvent".
The type "Error" should be removed from the example.

And also print(error.toString()); outputs as "Instance of '_XMLHttpRequestProgressEvent'"
Better would be to have there for example: print(error.target.responseText);

Display specific versions

Is there a way to display the docs for a different version (except for the LATEST) of the SDK in the browser?

Alternativ: is there a URL template to load index.json/library_list.json for selected versions?

Support Google Analytics

If you haven't already, please wire in Google Analytics to listen to the events like "display class", etc. You can treat those as Page Views. We can use events for other things like "opened a description for a method". This is really important, we shouldn't launch without analytics wired in. I'm happy to help you with this, too, but it'll take some JS interop (bloats the code size) or some creative uses of postMessage().
-Seth

Make it easy to switch between stable/beta/dev/be docs

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.