Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Issue 11636011: Web components based app to view dart docs. Still has rough edges. (Closed)

Created:
8 years ago by Jacob
Modified:
7 years, 11 months ago
CC:
reviews_dartlang.org
Base URL:
https://github.com/dart-lang/dart-api-app.git@master
Visibility:
Public.

Description

Web components based app to view dart docs. Still has rough edges. Please review the entire file contents rather than the diff. The previous version is just a checkpoint I accidentally pushed to master to avoid losing work if my local machine died. Committed: https://github.com/dart-lang/dart-api-app/commit/e411036

Patch Set 1 #

Total comments: 120

Patch Set 2 : Code review fixes #

Total comments: 3

Patch Set 3 : More code review fixes #

Patch Set 4 : more fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+517 lines, -641 lines) Patch
M client/web/ast.dart View 1 2 27 chunks +243 lines, -212 lines 0 comments Download
M client/web/doc_link.html View 1 2 chunks +12 lines, -144 lines 0 comments Download
A + client/web/element_summary.html View 1 2 6 chunks +46 lines, -47 lines 0 comments Download
M client/web/index.html View 1 2 6 chunks +55 lines, -53 lines 0 comments Download
M client/web/markdown.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M client/web/model.dart View 1 2 12 chunks +95 lines, -62 lines 0 comments Download
M client/web/resources.dart View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M client/web/src/markdown/ast.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M client/web/src/markdown/block_parser.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M client/web/src/markdown/html_renderer.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M client/web/src/markdown/inline_parser.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
D client/web/static/class.png View 0 chunks +-1 lines, --1 lines 0 comments Download
A client/web/static/constructor.png View 0 chunks +-1 lines, --1 lines 0 comments Download
M client/web/static/field_private.png View 0 chunks +-1 lines, --1 lines 0 comments Download
M client/web/static/field_public.png View 0 chunks +-1 lines, --1 lines 0 comments Download
A client/web/static/getter.png View 0 chunks +-1 lines, --1 lines 0 comments Download
A client/web/static/inherit.png View 0 chunks +-1 lines, --1 lines 0 comments Download
D client/web/static/interface.png View 0 chunks +-1 lines, --1 lines 0 comments Download
M client/web/static/method_private.png View 0 chunks +-1 lines, --1 lines 0 comments Download
M client/web/static/method_public.png View 0 chunks +-1 lines, --1 lines 0 comments Download
A client/web/static/setter.png View 0 chunks +-1 lines, --1 lines 0 comments Download
A client/web/static/static.png View 0 chunks +-1 lines, --1 lines 0 comments Download
M client/web/static/styles.css View 8 chunks +67 lines, -129 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Jacob
8 years ago (2012-12-19 06:35:21 UTC) #1
Andrei Mouravski
Quick note. https://chromiumcodereview.appspot.com/11636011/diff/1/client/web/static/styles.css File client/web/static/styles.css (right): https://chromiumcodereview.appspot.com/11636011/diff/1/client/web/static/styles.css#newcode66 client/web/static/styles.css:66: pre, code { Please add: padding: 0; ...
8 years ago (2012-12-19 17:04:44 UTC) #2
Siggi Cherem (dart-lang)
The app is looking really cool. https://chromiumcodereview.appspot.com/11636011/diff/1/client/web/ast.dart File client/web/ast.dart (right): https://chromiumcodereview.appspot.com/11636011/diff/1/client/web/ast.dart#newcode1 client/web/ast.dart:1: library ast; + ...
8 years ago (2012-12-19 19:47:33 UTC) #3
Jacob
Replied to all comments https://codereview.chromium.org/11636011/diff/1/client/web/ast.dart File client/web/ast.dart (right): https://codereview.chromium.org/11636011/diff/1/client/web/ast.dart#newcode1 client/web/ast.dart:1: library ast; On 2012/12/19 19:47:33, ...
7 years, 11 months ago (2013-01-02 19:54:58 UTC) #4
Siggi Cherem (dart-lang)
lgtm https://codereview.chromium.org/11636011/diff/1/client/web/ast.dart File client/web/ast.dart (right): https://codereview.chromium.org/11636011/diff/1/client/web/ast.dart#newcode496 client/web/ast.dart:496: addSuperclasses(clazz) { On 2013/01/02 19:54:58, Jacob wrote: > ...
7 years, 11 months ago (2013-01-02 21:40:55 UTC) #5
Jacob
7 years, 11 months ago (2013-01-03 00:09:33 UTC) #6
Also filed bug
http://code.google.com/p/dart/issues/detail?id=7665
due to an odd dartvm error when a method cascade is used in code of the form
return foo ? bar : baz..foobar();

https://codereview.chromium.org/11636011/diff/1/client/web/ast.dart
File client/web/ast.dart (right):

https://codereview.chromium.org/11636011/diff/1/client/web/ast.dart#newcode496
client/web/ast.dart:496: addSuperclasses(clazz) {
On 2013/01/02 21:40:55, Siggi Cherem (dart-lang) wrote:
> On 2013/01/02 19:54:58, Jacob wrote:
> > On 2012/12/19 19:47:33, Siggi Cherem (dart-lang) wrote:
> > > nit: consider adding here the type parameter and removing it from line
498?
> > 
> > i don't follow.
> 
> In line 498 (now line 402) you seem to have a downcast, but it doesn't seem
> necessary. You can simply do:
> 
> var superclassElement = loopupReferenceId(...);
> 
> I was initially thinking that if you wanted additional type information, we
> could put the type annotation in the argument of this function, like this:
> 
> addSuperclasses(ClassElement clazz) {
>   ...
> }
just removed the ClassElement and changed it to a var. I can't remember why I
wanted a type there.

https://codereview.chromium.org/11636011/diff/1/client/web/ast.dart#newcode499
client/web/ast.dart:499: lookupReferenceId(clazz.superclass.refId);
Lets chat about this offline.
On 2013/01/02 21:40:55, Siggi Cherem (dart-lang) wrote:
> On 2013/01/02 19:54:58, Jacob wrote:
> > I don't think the times when references are resolved are performance
> > bottlenecks.  
> > In addition, keep in mind that it is very important for this to not occur at
> > deserialization time as all the libraries where the references are from may
> not
> > be available until those libs are later resolved.  The next big data model
CL
> > change for this code is to only load library definitions as required.
> > On 2012/12/19 19:47:33, Siggi Cherem (dart-lang) wrote:
> > > one thing I was wondering is whether Reference could hold a pointer to the
> > > resolved Element once it's resolved.
> > > 
> > > The idea is that when deserializing you could use a map to associate
> > > referenceids to Reference objects, so there is a single Reference object
> with
> > a
> > > particular refid.
> > > 
> > > Once you have a Reference object, you only would need to do a
> > lookupReferenceId
> > > once on it, and you would be done.
> > 
> 
> We can wait and see later how this would work after the next model changes. My
> suggestion was not so much about performance though, but about abstraction. It
> might be easier to chat in person about it, but I think it would be a nice
model
> to work with if we reference objects were unique. You would still allow
> reference objects with unresolved elements (when a library is not loaded, for
> example), but then the reference objects will be easier to work with than
using
> only the string reference ids.

https://codereview.chromium.org/11636011/diff/1/client/web/ast.dart#newcode575
client/web/ast.dart:575: abstract class MethodElementBase extends Element {
Went with MethodLikeElement.
ClassMemberElement is inaccurate due to top level methods.

On 2012/12/19 19:47:33, Siggi Cherem (dart-lang) wrote:
> consider renaming this class? some ideas:
> * ClassMemberElement
> * CallableElement
> * MethodLikeElement

https://codereview.chromium.org/11636011/diff/1/client/web/model.dart
File client/web/model.dart (right):

https://codereview.chromium.org/11636011/diff/1/client/web/model.dart#newcode176
client/web/model.dart:176: html.window.on.popState.add((e) {
On 2013/01/02 21:40:55, Siggi Cherem (dart-lang) wrote:
> On 2012/12/19 19:47:33, Siggi Cherem (dart-lang) wrote:
> > in our todomvc sample we had to listen for both popState and hashChange to
> > ensure thigns work in IE9 and Opera 12. 
> > 
> > See http://code.google.com/p/dart/issues/detail?id=5483
> 
> you might have missed this comment...

I did... done :)

https://codereview.chromium.org/11636011/diff/13001/client/web/ast.dart
File client/web/ast.dart (right):

https://codereview.chromium.org/11636011/diff/13001/client/web/ast.dart#newcode1
client/web/ast.dart:1: // Copyright (c) 2012, the Dart project authors.  Please
see the AUTHORS file
On 2013/01/02 21:40:55, Siggi Cherem (dart-lang) wrote:
> 2013 =)

noooo! that's what i get for taking too long to commit this cl. :)

Powered by Google App Engine
This is Rietveld 408576698