diff --git a/Dockerfile.onbuild b/Dockerfile.onbuild index ac88bd509..3b05ec90b 100644 --- a/Dockerfile.onbuild +++ b/Dockerfile.onbuild @@ -4,6 +4,7 @@ FROM coralproject/talk:latest ONBUILD ARG TALK_ADDTL_COMMENTS_ON_LOAD_MORE=10 ONBUILD ARG TALK_ASSET_COMMENTS_LOAD_DEPTH=10 ONBUILD ARG TALK_REPLY_COMMENTS_LOAD_DEPTH=3 +ONBUILD ARG TALK_ADDTL_REPLIES_ON_LOAD_MORE=999999 ONBUILD ARG TALK_THREADING_LEVEL=3 ONBUILD ARG TALK_DEFAULT_STREAM_TAB=all ONBUILD ARG TALK_DISABLE_EMBED_POLYFILL=FALSE diff --git a/client/coral-embed-stream/src/constants/stream.js b/client/coral-embed-stream/src/constants/stream.js index 64d4e64d3..3de1453cb 100644 --- a/client/coral-embed-stream/src/constants/stream.js +++ b/client/coral-embed-stream/src/constants/stream.js @@ -5,6 +5,9 @@ const prefix = 'TALK_EMBED_STREAM'; export const ADDTL_COMMENTS_ON_LOAD_MORE = parseInt( defaultTo(process.env.TALK_ADDTL_COMMENTS_ON_LOAD_MORE, '10') ); +export const ADDTL_REPLIES_ON_LOAD_MORE = parseInt( + defaultTo(process.env.TALK_ADDTL_REPLIES_ON_LOAD_MORE, '999999') +); export const ASSET_COMMENTS_LOAD_DEPTH = parseInt( defaultTo(process.env.TALK_ASSET_COMMENTS_LOAD_DEPTH, '10') ); diff --git a/client/coral-embed-stream/src/tabs/stream/containers/Stream.js b/client/coral-embed-stream/src/tabs/stream/containers/Stream.js index a379e6dbd..4390797f9 100644 --- a/client/coral-embed-stream/src/tabs/stream/containers/Stream.js +++ b/client/coral-embed-stream/src/tabs/stream/containers/Stream.js @@ -6,6 +6,7 @@ import { bindActionCreators } from 'redux'; import { ADDTL_COMMENTS_ON_LOAD_MORE, ASSET_COMMENTS_LOAD_DEPTH, + ADDTL_REPLIES_ON_LOAD_MORE, THREADING_LEVEL, } from '../../../constants/stream'; import { @@ -152,7 +153,9 @@ class StreamContainer extends React.Component { return this.props.data.fetchMore({ query: LOAD_MORE_QUERY, variables: { - limit: parent_id ? 999999 : ADDTL_COMMENTS_ON_LOAD_MORE, + limit: parent_id + ? ADDTL_REPLIES_ON_LOAD_MORE + : ADDTL_COMMENTS_ON_LOAD_MORE, cursor: comment.replies.endCursor, parent_id, asset_id: this.props.asset.id, diff --git a/docs/source/02-02-advanced-configuration.md b/docs/source/02-02-advanced-configuration.md index 1a60ac98b..0c70fad91 100644 --- a/docs/source/02-02-advanced-configuration.md +++ b/docs/source/02-02-advanced-configuration.md @@ -593,3 +593,13 @@ can be used to set an authorization header, or change the user agent. (Default ## TALK_SCRAPER_PROXY_URL Sets a specific HTTP/S proxy to be used by the Asset Scraper using [https-proxy-agent](https://www.npmjs.com/package/https-proxy-agent). (Default `null`) + +## TALK_ADDTL_REPLIES_ON_LOAD_MORE + +This is a **Build Variable** and must be consumed during build. If using the +[Docker-onbuild](/talk/installation-from-docker/#onbuild) +image you can specify it with `--build-arg TALK_ADDTL_REPLIES_ON_LOAD_MORE=3`. + +Specifies the number of replies to load for a comment when clicking "Load More". +It is defaulted quite high to sort of support "loading the rest of the replies". +(Default `999999`) diff --git a/webpack.config.js b/webpack.config.js index e23aa1e2a..322ad8317 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -169,6 +169,7 @@ const config = { TALK_THREADING_LEVEL: '3', TALK_ADDTL_COMMENTS_ON_LOAD_MORE: '10', TALK_ASSET_COMMENTS_LOAD_DEPTH: '10', + TALK_ADDTL_REPLIES_ON_LOAD_MORE: '999999', TALK_REPLY_COMMENTS_LOAD_DEPTH: '3', TALK_DEFAULT_STREAM_TAB: 'all', TALK_DEFAULT_LANG: 'en',