Commit Graph

3 Commits

Author SHA1 Message Date
Leonard Kim 486e8e35d9 ref: move all prop type declaration to flow
For the most part the changes are taking the "static propTypes" declaration off
of components and declaring them as Flow types. Sometimes to support flow some
method signatures had to be added. There are some exceptions in which more had
to be done to tame the beast:
- AbstractVideoTrack: put in additional truthy checks for videoTrack.
- Video: add truthy checks for the _videoElement ref.
- shouldRenderVideoTrack function: Some component could pass null for the
  videoTrack argument and Flow wanted that called out explicitly.
- DisplayName: Add a truthy check for the input ref before acting on it.
- NumbersList: Move array checks inline for Flow to comprehend array methods
  could be called. Add type checks in the Object.entries loop as the value is
  assumed to be a mixed type by Flow.
- AbstractToolbarButton: add additional truthy check for passed in type.
2018-11-07 17:38:10 +01:00
Lyubo Marinov d1e5e6b93b Coding style: consistency, jsdocs
These modification are not necessarily directly related to the
containing PR, I merely saw them while reviewing the containing PR.
2017-11-27 17:45:17 -06:00
Saúl Ibarra Corretgé 38629b437d feat(overlays): refactor logic for selecting current overlay
Do the selection in mapStateToProps so the container itself doesn't need to
receive all the props that each overlay needs.

Each overlay is responsible for fetching their own props and for providing a
"needsDisplay" static method wich will be called with the full redux state and
should return true if the overlay needs displaying.

Also eliminate duplicated state keeping: the connection and conference error
states can be fetched from their respective base features.
2017-11-27 17:45:11 -06:00