Skip to content
This repository was archived by the owner on May 20, 2023. It is now read-only.

Commit 2f9b64a

Browse files
authored
Merge pull request #304 from dart-lang/github-sync
GitHub sync
2 parents 3ef0f20 + 5c97f14 commit 2f9b64a

File tree

222 files changed

+2301
-1893
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

222 files changed

+2301
-1893
lines changed

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
1+
## 0.9.0-beta+2
2+
3+
> NOTE: This code is considered production quality, but depends on angular:
4+
> 5.0.0-beta+2 (5.0.0-beta+2 is used in production Google apps).
5+
6+
### Breaking Changes
7+
* Remove `SelectableChangeNotifier` and deprecate `SelectableWithComposition`
8+
with the intention to remove. They are widely unused, complicated the
9+
implementations, and unsound in Dart 2.
10+
11+
#### Material Dialog
12+
* Fix bug where a disposable could be added to its disposer after it had already
13+
been destroyed.
14+
15+
#### Material Icon
16+
* Add aria label and use them for trailing/leading icons of Material Input.
17+
18+
#### Material Popup
19+
* Change `<main>` html tag to a `<div>`. HTML5 states there should only be one
20+
main tag per application.
21+
22+
### Other Updates
23+
#### Miscellaneous
24+
* Add `is{Selectable|Disabled|Hidden}In()`, `getOptionIn()` and, `filterWhere()`
25+
as static helpers to `Selectable`.
26+
* Add a lookup method for finding the closest Material Color name based on any
27+
input color.
28+
29+
#### Dart 2 Updates
30+
* Fixes for Dart 2 compile-time and runtime errors.
31+
* Applicaion of `dartfmt --fix`.
32+
133
## 0.9.0-beta+1
234

335
> NOTE: This code is considered production quality, but depends on angular:

lib/angular_components.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ export 'utils/async/async.dart';
220220

221221
/// A convenience list of all Directives exposed by this package.
222222
@Deprecated('List the directives used by your app for smaller code size.')
223-
const List<dynamic> materialDirectives = const [
223+
const List<dynamic> materialDirectives = [
224224
AutoDismissDirective,
225225
AutoFocusDirective,
226226
ButtonDirective,
@@ -324,6 +324,6 @@ const List<dynamic> materialDirectives = const [
324324
];
325325

326326
/// A convenience list of all providers exposed by this package.
327-
const List<dynamic> materialProviders = const [
327+
const List<dynamic> materialProviders = [
328328
datepickerBindings,
329329
];

lib/annotations/rtl_annotation.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import 'package:angular/angular.dart';
1212
/// This is used to only read the DOM once for an app to determine if the app
1313
/// itself is RTL. Only use this for components whose RTL is not independant
1414
/// of the application as a whole.
15-
const rtlToken = const OpaqueToken('isRtl');
15+
const rtlToken = OpaqueToken('isRtl');
1616

1717
const rtlProvider =
18-
const Provider(rtlToken, useFactory: determineRtl, deps: const [Document]);
18+
Provider(rtlToken, useFactory: determineRtl, deps: [Document]);
1919

2020
@Injectable()
2121
bool determineRtl(Document document) =>

lib/app_layout/material_drawer_base.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import 'package:angular_components/content/deferred_content_aware.dart';
99

1010
// When deferred content should be removed. Needs to be longer than the longest
1111
// animation.
12-
const animationDuration = const Duration(milliseconds: 500);
12+
const animationDuration = Duration(milliseconds: 500);
1313

1414
class MaterialDrawerBase implements DeferredContentAware, OnInit {
1515
MaterialDrawerBase({bool visible = true}) : _visible = visible;
@@ -26,7 +26,7 @@ class MaterialDrawerBase implements DeferredContentAware, OnInit {
2626

2727
if (!_visible) {
2828
// Wait until after the animation to remove the content
29-
new Timer(animationDuration, () {
29+
Timer(animationDuration, () {
3030
// Make sure we are still not visible in case the drawer was toggled
3131
// quickly before the animation was done.
3232
if (!_visible) _visibleChange.add(_visible);
@@ -37,7 +37,7 @@ class MaterialDrawerBase implements DeferredContentAware, OnInit {
3737
}
3838
}
3939

40-
final _visibleChange = new StreamController<bool>.broadcast(sync: true);
40+
final _visibleChange = StreamController<bool>.broadcast(sync: true);
4141

4242
/// Event fired when the visibility of the drawer changes.
4343
///

lib/app_layout/material_persistent_drawer.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import 'material_drawer_base.dart';
1616
@Directive(
1717
selector: 'material-drawer[persistent]',
1818
exportAs: 'drawer',
19-
providers: const [
20-
const Provider(DeferredContentAware,
19+
providers: [
20+
Provider(DeferredContentAware,
2121
useExisting: MaterialPersistentDrawerDirective),
2222
],
2323
visibility: Visibility.all, // Injected by child elements.

lib/app_layout/material_stackable_drawer.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ import 'package:angular_components/content/deferred_content_aware.dart';
1414
/// Works with deferred content.
1515
@Component(
1616
selector: 'material-drawer[stackable]',
17-
providers: const [
18-
const Provider(DeferredContentAware,
17+
providers: [
18+
Provider(DeferredContentAware,
1919
useExisting: MaterialStackableDrawerComponent),
2020
],
2121
templateUrl: 'material_stackable_drawer.html',
22-
styleUrls: const ['material_stackable_drawer.scss.css'],
22+
styleUrls: ['material_stackable_drawer.scss.css'],
2323
visibility: Visibility.all, // Injected by child elements.
2424
)
2525
class MaterialStackableDrawerComponent

lib/app_layout/material_temporary_drawer.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ import 'material_drawer_base.dart';
1313
@Component(
1414
selector: 'material-drawer[temporary]',
1515
exportAs: 'drawer',
16-
providers: const [
17-
const Provider(DeferredContentAware,
16+
providers: [
17+
Provider(DeferredContentAware,
1818
useExisting: MaterialTemporaryDrawerComponent),
1919
],
2020
templateUrl: 'material_temporary_drawer.html',
21-
styleUrls: const ['material_temporary_drawer.scss.css'],
21+
styleUrls: ['material_temporary_drawer.scss.css'],
2222
changeDetection: ChangeDetectionStrategy.OnPush,
2323
visibility: Visibility.all, // Injected by child elements.
2424
)

lib/builder.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ import 'package:build/build.dart';
66
import 'package:sass_builder/sass_builder.dart';
77

88
Builder scssBuilder(BuilderOptions options) =>
9-
new SassBuilder(outputExtension: '.scss.css');
9+
SassBuilder(outputExtension: '.scss.css');

lib/button_decorator/button_decorator.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class ButtonDirective extends RootFocusable
3131
@Output()
3232
Stream<UIEvent> get trigger => _trigger.stream;
3333

34-
final _trigger = new StreamController<UIEvent>.broadcast(sync: true);
34+
final _trigger = StreamController<UIEvent>.broadcast(sync: true);
3535

3636
String _hostTabIndex;
3737
String _role;

lib/content/deferred_content.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import 'deferred_content_aware.dart';
2020
selector: '[deferredContent]',
2121
)
2222
class DeferredContentDirective implements OnDestroy {
23-
final _disposer = new Disposer.oneShot();
24-
final _placeholder = new DivElement();
23+
final _disposer = Disposer.oneShot();
24+
final _placeholder = DivElement();
2525

2626
ViewContainerRef _viewContainer;
2727
EmbeddedViewRef _viewRef;
@@ -101,7 +101,7 @@ class DeferredContentDirective implements OnDestroy {
101101
class CachingDeferredContentDirective implements OnDestroy {
102102
ViewContainerRef _viewContainer;
103103
TemplateRef _template;
104-
final _disposer = new Disposer.oneShot();
104+
final _disposer = Disposer.oneShot();
105105
ViewRef _view;
106106

107107
// Keep around the current state.

0 commit comments

Comments
 (0)