• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

facebook / react / 12656
86%

Build:
DEFAULT BRANCH: master
Ran 06 Sep 2016 05:07PM UTC
Jobs 1
Files 226
Run time 11s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
12656

Pull #7667

travis-ci

web-flow
Type SimpleEventPlugin and TapEventPlugin

- Fills in the 'any' holes that were left in DispatchConfig type and the
  type annotations in EventPluginRegistry.
- Adds polymorphic PluginModule type and related types
- Uses hack to support indexable properties on 'Touch' type in
  TapEventPlugin

The issue in TapEventPlugin is that the code is accessing one of four
possible properties on the 'Touch' type native event using the bracket
accessor. Classes in Flow don't support using the bracket accessor,
unless you use a declaration and the syntax `[key: Type]: Type`.[1] The
downside of using that here is that we create a global type, which we
may not need in other files.

[1]: https://github.com/facebook/flow/issues/1323

Other options:
- Use looser typing or a '@FixMe' comment and open an issue with Flow to
  support indexing on regular classes.
- Rewrite TapEventPlugin to not use the bracket accessor on 'Touch'. I
  thought the current implementation was elegant and didn't want to
  change it. But we could do something like this:
```
 if (nativeEvent.pageX || nativeEvent.pageY) {
   return axis.page === 'pageX' ? nativeEvent.pageX : nativeEvent.pageY;
 } else {
   var clientAxis = axis.client === 'clientX' ? nativeEvent.clientX : nativeEvent.clientY;
   return nativeEvent[axis.client] + ViewportMetrics[axis.envScroll];
 }
```
Pull Request #7667: Flow type event plugins

15 of 15 new or added lines in 4 files covered. (100.0%)

7461 of 8557 relevant lines covered (87.19%)

3233.68 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
100.0
src/renderers/shared/stack/event/EventPluginRegistry.js
2
100.0
src/renderers/shared/stack/event/ReactSyntheticEventType.js

Uncovered Existing Lines

Lines Coverage ∆ File
2
100.0
src/renderers/dom/client/eventPlugins/TapEventPlugin.js
Jobs
ID Job ID Ran Files Coverage
2 12656.2 (TEST_TYPE=test) 06 Sep 2016 05:07PM UTC 0
87.19
Travis Job 12656.2
Source Files on build 12656
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #12656
  • Pull Request #7667
  • PR Base - master (#12655)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc