clearer api - wip debug tools

This commit is contained in:
okbel
2018-03-12 09:17:30 -03:00
parent 0b9ba9a0e3
commit e713b39846
3 changed files with 7 additions and 5 deletions
@@ -465,7 +465,7 @@ const mapStateToProps = state => ({
activeStreamTab: state.stream.activeTab,
previousStreamTab: state.stream.previousTab,
commentClassNames: state.stream.commentClassNames,
pluginConfig: state.config.plugin_config,
pluginConfig: state.config.plugins_config,
sortOrder: state.stream.sortOrder,
sortBy: state.stream.sortBy,
});
+4 -2
View File
@@ -84,7 +84,8 @@ class PluginsService {
* query datas are only passed to the component if it is defined in `component.fragments`.
*/
getSlotComponentProps(component, reduxState, props, queryData) {
const pluginConfig = get(reduxState, 'config.plugin_config') || emptyConfig;
const pluginConfig =
get(reduxState, 'config.plugins_config') || emptyConfig;
return {
...props,
config: pluginConfig,
@@ -98,7 +99,8 @@ class PluginsService {
* Returns React Elements for given slot.
*/
getSlotElements(slot, reduxState, props = {}, queryData = {}, options = {}) {
const pluginConfig = get(reduxState, 'config.plugin_config') || emptyConfig;
const pluginConfig =
get(reduxState, 'config.plugins_config') || emptyConfig;
const { slotSize = 0 } = options;
const isDisabled = component => {
+2 -2
View File
@@ -42,7 +42,7 @@
* });
* },
*/
plugin_config: {
plugins_config: {
/**
* You can disable rendering slot components of a plugin by doing:
*
@@ -51,7 +51,7 @@
* },
*/
test: 'data',
debug: false
debug: true
}
})
"></script>