[CORL 212] Implement CharCount Restriction feature (#2204)

* feat: adhere to char count settings for posting top level comments

* fix: remove bidi characters during test

* test: add feature tests for charCount

* test: update snapshots

* test: add feature test for updating settings

* feat: use red color and warn icon (from review)

* feat: Implement charCount for reply

* feat: charCount for edit comment

* test: update snapshots
This commit is contained in:
Kiwi
2019-03-04 22:49:04 +01:00
committed by GitHub
parent 60f5b7e3c0
commit 625809b42c
61 changed files with 1488 additions and 607 deletions
@@ -0,0 +1,31 @@
import { graphql } from "react-relay";
import { Environment } from "relay-runtime";
import { createFetchContainer, fetchQuery } from "talk-framework/lib/relay";
import { RefreshSettingsQuery as QueryTypes } from "talk-stream/__generated__/RefreshSettingsQuery.graphql";
const query = graphql`
query RefreshSettingsQuery {
settings {
...StreamContainer_settings
}
}
`;
function fetch(environment: Environment) {
return fetchQuery<QueryTypes["response"]["settings"]>(
environment,
query,
{},
{ force: true }
);
}
export const withRefreshSettingsFetch = createFetchContainer(
"refreshSettings",
fetch
);
export type RefreshSettingsFetch = () => Promise<
QueryTypes["response"]["settings"]
>;