-
Notifications
You must be signed in to change notification settings - Fork 15
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
FEC-8696 ui components #399
Conversation
…e injected component from the player preact tree
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.
@OrenMe the code is ready. I removed the part we discussed about containers for video/preset interactivity. I will add it to the side panel PRs.
Note, there are 9 occurrences of // TODO Sakal - Oren...
please address each
@@ -20,23 +20,20 @@ const mapStateToProps = state => ({ | |||
config: state.config.components.vrStereo | |||
}); | |||
|
|||
const COMPONENT_NAME = 'vrStereo'; |
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.
move file to vr-stereo.js
and also dir name
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.
need to fix the shouldRender
method to get the component config by the new COMPONENT_NAME attribute as per our change of the disaplyName
attribute - this might be a bug
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.
also, all component names start with capital, so please align, same for volume component
/** | ||
* should render component | ||
* @param {*} props - component props | ||
* @returns {boolean} - whether to render the component | ||
* @static | ||
*/ | ||
static shouldRender(props: any): boolean { | ||
const componentConfig = props.config.components[this.displayName]; | ||
const componentConfig = props.config.components['watermark']; |
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.
change this and add to convention doc for exposing config containers
const componentConfig = props.config.components['watermark']; | |
const componentConfig = props.config.components[COMPONENT_NAME.toLowerCase()]; |
need to change in other places too where this applies
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.
following our discussion won't do
@@ -20,23 +20,20 @@ const mapStateToProps = state => ({ | |||
config: state.config.components.vrStereo | |||
}); | |||
|
|||
const COMPONENT_NAME = 'vrStereo'; |
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.
need to fix the shouldRender
method to get the component config by the new COMPONENT_NAME attribute as per our change of the disaplyName
attribute - this might be a bug
@@ -20,23 +20,20 @@ const mapStateToProps = state => ({ | |||
config: state.config.components.vrStereo | |||
}); | |||
|
|||
const COMPONENT_NAME = 'vrStereo'; |
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.
also, all component names start with capital, so please align, same for volume component
src/components/volume/volume.js
Outdated
@@ -23,38 +23,40 @@ const mapStateToProps = state => ({ | |||
isMobile: state.shell.isMobile | |||
}); | |||
|
|||
const COMPONENT_NAME = 'volume'; |
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.
also, all component names start with capital, so please align, same for vrStereo 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.
done
allow adding/changing discrete components in UI related PRs: kaltura/playkit-js-ui#399 kaltura/kaltura-player-js#264
add ui components provided by plugins into the configuration object related PRs: kaltura/playkit-js#387 kaltura/playkit-js-ui#399
Description of the Changes
allow adding/changing discrete components in UI
related PRs:
kaltura/playkit-js#387
kaltura/kaltura-player-js#264
Missing implementations
CheckLists
This change is