-
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-2629 getDartComponent warning for ReactElements #105
UIP-2629 getDartComponent warning for ReactElements #105
Conversation
RavenNumber of Findings: 0 |
d88ddc2
to
473b043
Compare
lib/src/util/react_wrappers.dart
Outdated
@@ -280,6 +280,43 @@ react.Component getDartComponent(/* [1] */ instance) { | |||
return null; | |||
} | |||
|
|||
// Split out into a separate function since the DDC doesn't support |
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.
Booo
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 actually isn't needed now that I understand the issue more. See dart-lang/sdk#30426
+1 |
sharedInputGetSelectionStartTest(type); | ||
}, testOn: 'js && !chrome'); | ||
sharedInputGetSelectionStartTest(type, shouldReturnNull: false); | ||
}, testOn: '!(blink || firefox)'); |
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 is working
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.
Ugh, it's because coverage doesn't include the platform: Workiva/dart_dev#200. I'll apply a fix for that
Codecov Report
@@ Coverage Diff @@
## master #105 +/- ##
==========================================
+ Coverage 94.36% 94.37% +0.02%
==========================================
Files 31 31
Lines 1540 1543 +3
==========================================
+ Hits 1453 1456 +3
Misses 87 87 |
+1 |
QA +10
Merging. |
Ultimate problem:
The soon to be released react-dart 4.0 will no longer support retrieving Dart components via
getDartComponent
fromReactElements
(pre-mounted VDOM instances) in order to avoid memory leaks.We should have a warning in place for when this occurs so that consumers will:
How it was fixed:
getDartComponent
Boy-scouted:
Testing suggestions:
Verify that tests pass in all platforms:
ddev test -p content-shell
ddev test -p dartium
ddev test -p chrome
ddev test -p firefox
getActiveElement
test in masterddev test -p chrome --web-compiler=dartdevc test/*_test.dart -x no-ddc
getActiveElement
test in masterObjectDisposedException
test in masterPotential areas of regression:
getDartComponent
setSelectionRange/
getSelectionRange`