diff --git a/client/coral-admin/src/components/UserDetailComment.js b/client/coral-admin/src/components/UserDetailComment.js index ba185a9df..ea898822a 100644 --- a/client/coral-admin/src/components/UserDetailComment.js +++ b/client/coral-admin/src/components/UserDetailComment.js @@ -94,7 +94,7 @@ class UserDetailComment extends React.Component { 'talk-admin-user-detail-comment' )} queryData={queryData} - slotSize={1} + size={1} defaultComponent={CommentFormatter} {...formatterSettings} /> diff --git a/client/coral-admin/src/routes/Moderation/components/Comment.js b/client/coral-admin/src/routes/Moderation/components/Comment.js index f865908b2..3fb3debf5 100644 --- a/client/coral-admin/src/routes/Moderation/components/Comment.js +++ b/client/coral-admin/src/routes/Moderation/components/Comment.js @@ -138,7 +138,7 @@ class Comment extends React.Component { className={cn(styles.commentContent, 'talk-admin-comment')} clearHeightCache={clearHeightCache} queryData={queryData} - slotSize={1} + size={1} defaultComponent={CommentFormatter} {...formatterSettings} /> diff --git a/client/coral-embed-stream/src/tabs/stream/components/Comment.js b/client/coral-embed-stream/src/tabs/stream/components/Comment.js index c495b54f9..dd465fed4 100644 --- a/client/coral-embed-stream/src/tabs/stream/components/Comment.js +++ b/client/coral-embed-stream/src/tabs/stream/components/Comment.js @@ -667,7 +667,7 @@ export default class Comment extends React.Component { defaultComponent={CommentContent} {...slotProps} queryData={queryData} - slotSize={1} + size={1} /> )} diff --git a/client/coral-framework/components/Slot.js b/client/coral-framework/components/Slot.js index 952844ed0..73f6f1bb0 100644 --- a/client/coral-framework/components/Slot.js +++ b/client/coral-framework/components/Slot.js @@ -38,7 +38,7 @@ class Slot extends React.Component { 'inline', 'className', 'reduxState', - 'slotSize', + 'size', 'defaultComponent', 'queryData', 'childFactory', @@ -47,7 +47,7 @@ class Slot extends React.Component { } getChildren(props = this.props) { - const { slotSize = 0 } = props; + const { size = 0 } = props; const { plugins } = this.context; return plugins.getSlotElements( @@ -55,7 +55,7 @@ class Slot extends React.Component { props.reduxState, this.getSlotProps(props), props.queryData, - { slotSize } + { size } ); } @@ -116,7 +116,7 @@ Slot.propTypes = { /** * Specifies the number of children that can fill the slot. */ - slotSize: PropTypes.number, + size: PropTypes.number, /** * You may specify the component to use as the root wrapper. diff --git a/client/coral-framework/services/plugins.js b/client/coral-framework/services/plugins.js index 222cc1b42..d797e0e3e 100644 --- a/client/coral-framework/services/plugins.js +++ b/client/coral-framework/services/plugins.js @@ -99,7 +99,7 @@ class PluginsService { */ getSlotElements(slot, reduxState, props = {}, queryData = {}, options = {}) { const pluginConfig = get(reduxState, 'config.plugin_config') || emptyConfig; - const { slotSize = 0 } = options; + const { size = 0 } = options; const isDisabled = component => { if ( @@ -136,15 +136,15 @@ class PluginsService { .map(o => o.module.slots[slot]) ); - if (slotSize > 0 && slots.length > slotSize) { + if (size > 0 && slots.length > size) { console.warn( - `Slot[${slot}] supports a maximum of ${slotSize} plugins providing slots, got ${ + `Slot[${slot}] supports a maximum of ${size} plugins providing slots, got ${ slots.length - }, will only use the first ${slotSize}` + }, will only use the first ${size}` ); } - return (slotSize > 0 ? slots.slice(0, slotSize) : slots) + return (size > 0 ? slots.slice(0, size) : slots) .map((component, i) => ({ component, disabled: isDisabled(component), diff --git a/plugins/talk-plugin-member-since/client/index.js b/plugins/talk-plugin-member-since/client/index.js index 2091e4805..fe0b5b14b 100644 --- a/plugins/talk-plugin-member-since/client/index.js +++ b/plugins/talk-plugin-member-since/client/index.js @@ -24,7 +24,7 @@ export default { createComment: { comment: { user: { - created_at: new Date(), + created_at: new Date().toISOString(), __typename: 'User', }, __typename: 'Comment',