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

dart:html interfaces which should be Lists #2713

Closed
DartBot opened this issue Apr 24, 2012 · 19 comments
Closed

dart:html interfaces which should be Lists #2713

DartBot opened this issue Apr 24, 2012 · 19 comments
Assignees
Labels
type-enhancement A request for a change that isn't a bug web-libraries Issues impacting dart:html, etc., libraries
Milestone

Comments

@DartBot
Copy link

DartBot commented Apr 24, 2012

This issue was originally filed by @seaneagan


The following dart:html interfaces could either be replaced by or at least extend List:

AnimationList
ClientRectList
CSSRuleList
CSSValueList
DataTransferItemList
DOMMimeTypeArray
DOMSettableTokenList
DOMTokenList
FileList
FilteredElementList
HTMLCollection
HTMLAllCollection
HTMLOptionsCollection
MediaStreamList
MediaStreamTrack
MediaStreamTrackList
SpeechGrammarList
SpeechInputResultList
SpeechRecognitionResultList
SQLResultSetRowList
StyleSheetList
SVGAnimatedLengthList
SVGAnimatedNumberList
SVGAnimatedTransformList
SVGElementInstanceList
SVGLengthList
SVGNumberList
SVGPathSegList
SVGPointList
SVGStringList
TextTrackCueList
TextTrackList
TimeRanges
TouchList

Many of them are immutable, in which cases extending an immutable version of List (issue #236) would be optimal.

@madsager
Copy link
Contributor

Added Area-DOM, Triaged labels.

@DartBot
Copy link
Author

DartBot commented Apr 26, 2012

This comment was originally written by @seaneagan


A couple more:

DomPluginArray
EntryArray
EntryArraySync

@DartBot
Copy link
Author

DartBot commented Apr 27, 2012

This comment was originally written by @seaneagan


a few more:

SpeechRecognitionResult
DomPlugin

@peter-ahe-google
Copy link
Contributor

Issue #2972 has been merged into this issue.

@DartBot
Copy link
Author

DartBot commented May 9, 2012

This comment was originally written by imjason...@gmail.com


Some of these seem like they may be easy to fix (e.g., FileList -> List<File>)

If someone's willing to shepherd me through the process, I'd be happy to try sending patches for some of these.

@sethladd
Copy link
Contributor

sethladd commented May 9, 2012

cc @jacob314.
Removed Type-Defect label.
Added Type-Enhancement label.

@sethladd
Copy link
Contributor

sethladd commented May 9, 2012

Hi Jason,

We have a contributing guide at http://code.google.com/p/dart/wiki/Contributing and a helpful blog post here: http://phylotic.blogspot.com/2012/05/im-contributor-and-so-can-you.html

Be sure to sign the http://code.google.com/legal/individual-cla-v1.0.html which is a super simple online form.

Once you have that signed and the project checked out, we can help you with next steps. Let's move the conversation to the mailing list (https://groups.google.com/a/dartlang.org/forum/#!forum/misc) for further discussion.

Thanks!

@sethladd
Copy link
Contributor

sethladd commented May 9, 2012

cc @vsmenon.
cc @rakudrama.

@jmesserly
Copy link

I was just bitten by this too (in my case, CSSRuleList).

@vsmenon
Copy link
Member

vsmenon commented Jul 16, 2012

Added this to the M1 milestone.

@iposva-google
Copy link
Contributor

Removed Area-DOM label.
Added Area-HTML label.

@efortuna
Copy link
Contributor

Set owner to @efortuna.
Added Started label.

@efortuna
Copy link
Contributor

Fixed in revision 12939.


Added Fixed label.

@efortuna
Copy link
Contributor

A little more information on this bug. All of the interfaces that behave exactly like lists were converted to List<Foo> and the FooList type was removed. For types that behave like lists but have other methods, we keep the FooList type, but they implement List.

@efortuna
Copy link
Contributor

Marked this as blocking #5499.

@sethladd
Copy link
Contributor

Thanks!

@peter-ahe-google
Copy link
Contributor

Awesome!

@efortuna
Copy link
Contributor

Issue #2174 has been merged into this issue.

@DartBot
Copy link
Author

DartBot commented Mar 19, 2013

This comment was originally written by @seaneagan


Since dart:html is being looked at heavily now, just wanted to mention that there are still quite a few which either:

* don't implement List

  • don't have extra methods beyond List
  • have extra methods, but maybe it makes more sense to place them elsewhere

dart:html

DataTransferItemList
MediaList
DomSettableTokenList
DomTokenList
DomStringList
FileList
NodeList
SourceBufferList
SpeechGrammarList
TextTrackCueList
TextTrackList
DomMimeTypeArray
DomPluginArray
SpeechRecognitionResult
HtmlCollection, HtmlOptionsCollection, HtmlAllCollection, HtmlFormControlsCollection
  - has "namedItem" getter which could be moved to a static method which takes a List<Node> and a name
RadioNodeList, HtmlFormControlsCollection.itemName
  - could be replaced by a RadioGroup concept (probably outside dart:html)
TimeRanges
  - could just be a List<Interval<num>> see issue #3661

dart:svg

LengthList
NumberList
PathSegList
PointList
StringList
TransformList
  - has "consolidate" and "createSvgTransformFromMatrix" which could be constructors on dart:svg.Transform instead

@DartBot DartBot added Type-Enhancement web-libraries Issues impacting dart:html, etc., libraries labels Mar 19, 2013
@DartBot DartBot added this to the M1 milestone Mar 19, 2013
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed type-enhancement labels Mar 1, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug web-libraries Issues impacting dart:html, etc., libraries
Projects
None yet
Development

No branches or pull requests

9 participants