Skip to content
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

feat(FEC-10076): add support for dynamic injection #538

Merged
merged 8 commits into from
Aug 19, 2020
Merged

Conversation

yairans
Copy link
Contributor

@yairans yairans commented Aug 18, 2020

Description of the Changes

  • UIManager Exposes addComponent api which actually deligates to PlayerAreaProvider._addNewComponentAndUpdateListeners method (using Render-Props technique)
  • Remove empty array condition for removal flow
  • Extract Fragment children since add and remove the component behaves worried when children wrapped by a Fragment

CheckLists

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • test are passing in local environment
  • Travis tests are passing (or test results are not worse than on master branch :))
  • Docs have been updated

* @returns {Function} - Removal function
* @memberof UIManager
*/
addComponent: (component: KPUIComponent) => Function;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would consider two things - not related to each other

  1. provide a noop method as a fallback () => { return () => {} }. relevant also for line 181
  2. expose a public method for the PlayerAreaProvider instead of passing the method to the upper component and use ref to invoke that method

both not mandatory but might be more solid

Copy link
Contributor Author

@yairans yairans Aug 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. done
  2. I tried this option. it's doesn't work since the ref points the withLogger wrapper

esakal
esakal previously approved these changes Aug 19, 2020
Copy link

@esakal esakal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approving as your code seems fine. just check my comment above for possible improvements

esakal
esakal previously approved these changes Aug 19, 2020
OrenMe
OrenMe previously approved these changes Aug 19, 2020
yairans added a commit to kaltura/kaltura-player-js that referenced this pull request Aug 19, 2020
@yairans yairans dismissed stale reviews from OrenMe and esakal via 22b5999 August 19, 2020 12:44
@yairans yairans merged commit f180721 into master Aug 19, 2020
@yairans yairans deleted the FEC-10076 branch August 19, 2020 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants