-
Notifications
You must be signed in to change notification settings - Fork 58
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
UIP-1953 Sync changes from OverReact source #40
Conversation
RavenNumber of Findings: 0 |
05ce9de
to
341e680
Compare
140912a
to
08ce78d
Compare
Current coverage is 97.42% (diff: 97.37%)@@ master #40 diff @@
==========================================
Files 27 28 +1
Lines 1286 1316 +30
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 1253 1282 +29
- Misses 33 34 +1
Partials 0 0
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some formatting/docs stuff that seems to have regressed, otherwise looks great!
throw new PropError.required(prop.key, prop.errorMessage); | ||
}); | ||
throw new PropError.required(prop.key, prop.errorMessage); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#nit looks like this was fixed in over_react after the code diverged
@@ -195,11 +203,11 @@ abstract class UiComponent<TProps extends UiProps> extends react.Component { | |||
// ---------------------------------------------------------------------- | |||
} | |||
|
|||
/// The basis for a stateful over_react component. | |||
/// /// The basis for a stateful over_react component. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#nit looks like this was fixed in over_react after the code diverged
/// | ||
/// Includes support for strongly-typed props and state and utilities for prop and CSS classname forwarding. | ||
/// | ||
/// Extends [react.Component]. | ||
/// Extends [react.Component] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#nit looks like this was fixed in over_react after the code diverged
@@ -232,7 +240,6 @@ abstract class UiStatefulComponent<TProps extends UiProps, TState extends UiStat | |||
set unwrappedState(Map value) => super.state = value; | |||
|
|||
/// Returns a typed state object backed by the specified [stateMap]. | |||
/// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#nit looks like this was fixed in over_react after the code diverged
/// Cancellation will be handled automatically by [componentWillUnmount]. | ||
/// Register a [subscription] that should be canceled when the component | ||
/// unmounts. Cancellation will be handled automatically by | ||
/// [componentWillUnmount]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like the version of this file was more up to date in over_react (i.e., these changes should be discarded)
@@ -0,0 +1,16 @@ | |||
library document_event_helper; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure this should be added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 - this remains in ui_core, so there's no reason to have it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are things that were part of ui_core that we didn't bring over, and this is one of them.
It's part of the public API maintain, so we shouldn't add it unless there IS a reason to have it here, IMO.
@@ -0,0 +1,14 @@ | |||
library over_react.js_util; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure this should be added
@@ -21,7 +21,6 @@ import 'dart:html'; | |||
import 'package:over_react/over_react.dart'; | |||
import 'package:over_react/src/util/css_value_util.dart'; | |||
import 'package:react/react_dom.dart' as react_dom; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#Nit there should be a space here
@@ -13,7 +13,6 @@ | |||
// limitations under the License. | |||
|
|||
library over_react.test_mode; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#nit there should be a space here
@@ -50,7 +50,7 @@ main() { | |||
}); | |||
}); | |||
|
|||
group('generates prop getters/setters, when there is a custom key namespace, with', () { | |||
group('generates prop getters/setters, when there is a custom key namespace, with', () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#nit Is this indentation right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with my first pass. Just noticed a few things.
/// | ||
/// Overridden for strong typing. | ||
@override | ||
_RefTypedef get ref => super.ref; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we removed these redeclaration of ref
s when we added the typing to react-dart.
/// | ||
/// Deprecated: Simply call `isMounted` on the [ReactComponent] instead. | ||
@Deprecated('2.0.0') | ||
bool isMounted(ReactComponent instance) => instance.isMounted(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this needs to be added
@@ -20,7 +20,7 @@ class TestHandlerPrecedenceComponent extends FluxUiComponent<TestHandlerPreceden | |||
@override | |||
getStoreHandlers() => {props.store.store1: increment}; | |||
|
|||
increment(Store store) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this had to be typed for strong mode.
@@ -16,7 +16,7 @@ class TestStoreHandlersComponent extends FluxUiComponent<TestStoreHandlersProps> | |||
@override | |||
getStoreHandlers() => {props.store: increment}; | |||
|
|||
increment(Store store) { | |||
increment(_) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not have been changed
@@ -7,7 +7,7 @@ UiFactory<TestStoreHandlersProps> TestStoreHandlers; | |||
class TestStoreHandlersProps extends FluxUiProps<TestActions, TestStore> {} | |||
|
|||
@Component() | |||
class TestStoreHandlersComponent extends FluxUiComponent<TestStoreHandlersProps> { | |||
class TestStoreHandlersComponent extends FluxUiComponent { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not have been changed (You should see errors in your analysis server view @clairesarsam-wf - do you not?)
@@ -7,7 +7,7 @@ UiFactory<TestHandlerPrecedenceProps> TestHandlerPrecedence; | |||
class TestHandlerPrecedenceProps extends FluxUiProps<TestActions, TestStores> {} | |||
|
|||
@Component() | |||
class TestHandlerPrecedenceComponent extends FluxUiComponent<TestHandlerPrecedenceProps> { | |||
class TestHandlerPrecedenceComponent extends FluxUiComponent { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not have been changed
@@ -81,7 +81,7 @@ main() { | |||
}); | |||
}); | |||
|
|||
group('@StateMixin()', () { | |||
group('@StateMixin()', () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not have been changed.
@@ -112,7 +112,7 @@ main() { | |||
}); | |||
}); | |||
|
|||
group('generates state getters/setters, when there is a custom key namespace, with', () { | |||
group('generates state getters/setters, when there is a custom key namespace, with', () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not have been changed
); | ||
}); | ||
|
||
test('unless `passThroughUnsupportedUnits` is true', () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this parameter is intentional - shouldn't this test remain?
); | ||
}); | ||
|
||
test('unless `passThroughUnsupportedUnits` is true', () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this parameter is intentional - shouldn't this test remain?
69f67dd
to
8fb0ba0
Compare
Revert formatting/content changes that shouldn't have been merged in
@jacehensley-wf @aaronlademann-wf @greglittlefield-wf Feedback has been addressed - all warnings/infos are gone on dart 1.21.0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one small thing, otherwise looks great.
@@ -92,7 +92,7 @@ main() { | |||
test('a single child is passed in', () { | |||
var child = 'Only child'; | |||
var renderedNode = renderAndGetDom(Dom.div()(child)); | |||
List<Text> children = renderedNode.childNodes.where((node) => node.nodeType != Node.COMMENT_NODE).toList(); | |||
List<Text> children = renderedNode.childNodes.where((node) => node.nodeType != Node.COMMENT_NODE).toList(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation is off here.
@jacehensley-wf Feedback addressed |
+1 |
+1 |
+1 |
QA Resource Approval: +10
Merging |
Ultimate problem:
When
OverReact
was split out from its original project, updates continued to be made to the original source at the same time updates were being made to theOverReact
project.How it was fixed:
Merge the updates made in the original project with the updates made in the
OverReact
project.Testing suggestions:
OverReact
.Potential areas of regression:
OverReact
since it was originally split out should still be present.Please review @greglittlefield-wf @aaronlademann-wf @jacehensley-wf @joelleibow-wf