Commit Graph

1441 Commits

Author SHA1 Message Date
Tessa Thornton 8966dad344 [CORL-1016] Admin Dashboard (#2942)
* count things in redis

* add rest routes for daily comment totals

* add route for new commenters

* retrieve hourly totals for new commenters and comments

* add rate limiting

* add routes and components for dashboard

* add top stories component

* add activity charts

* clean up rest responses

* style dashboard components

* make dashboard site-aware

* change new commenters to new signups

* generate new signups by day chart

* update status pie chart

* update status pie chart

* allow site selection in dashboard

* cache daily signups

* count user bans in redis

* clean up route and method names

* clean up comment statuses chart and change from pie to bar

* fix package lock

* make daily counts time zone aware

* count rejected comments

* clean up today counts

* count comments from site

* store hourly keys in utc

* show daily user signups

* move siteID from params to query params

* add average line for daily comments chart

* make average comments count hourly

* show percent values for rejected comments

* style dashboard

* simplify dashboard rest routes

* style today totals and top stories

* style signup and comment activity chart

* add site selector to nav

* feat: redis/mongo refactor

* fix: some small tweaks

- Added comments to magic numbers
- Added errors for missing input
- Consolidated promise resolutions

* Revert "add site selector to nav"

This reverts commit 1c2b1dee34fb2742b04932079fd45f7f3de98418.

* show first site dashboard by default

* style dashboard site switcher

* updte snapshot

* add dashboard 118n keys

* udpate comment activiyt chart with legend and tooltip

* implement refresh button and loading states

* change colours of charts for today

* adjust today values spacing

* remove unused package

* don't pass redis into oauth strat

* remove unused package

* Revert "remove unused package"

This reverts commit 5b7c83a072604810ce7097865655e9ef8114d9e0.

* fix merge conflicts

* Fix icons bug on smaller screens

* resolve merge conflict

Co-authored-by: Wyatt Johnson <me@wyattjoh.ca>
2020-06-12 10:39:28 -04:00
Wyatt Johnson 4179306cd0 fix: fixed naming of config (#2980) 2020-06-12 05:22:23 +00:00
dependabot[bot] 2c0153047e chore(deps): bump graphql-playground-html from 1.6.13 to 1.6.22 (#2984)
Bumps [graphql-playground-html](https://github.com/graphcool/graphql-playground) from 1.6.13 to 1.6.22.
- [Release notes](https://github.com/graphcool/graphql-playground/releases)
- [Commits](https://github.com/graphcool/graphql-playground/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-11 22:28:43 +00:00
Wyatt Johnson 21cd47f6ed [CORL-1077] Rudderstack Integration (#2987)
* feat: added rudderstack support with events

- Added events for
  - Comment Moderated
  - Comment Created
  - Story Created
  - Comment Reaction Created
  - User Flagged Comment

* fix: added logging to event tracking
2020-06-11 22:10:52 +00:00
Nick Funk 2f03b788a4 [CORL-1121] Remove username validation when updated by admin (#2986)
* Use SSO validation for updateUserUsername

CORL-1121

* Remove validation on admin-only user rename

We don't need to validate the user-name as
only admin's will be using this mutator. If
they're updating things incorrectly, that's
up to them to manage with this flow.

CORL-1121
2020-06-10 19:36:56 -04:00
Wyatt Johnson c19f4a35ca Merge branch 'release/6.2' 2020-06-08 17:31:32 -06:00
Wyatt Johnson 0fa27ae41b chore: bump version v6.2.1 2020-06-08 17:30:39 -06:00
Wyatt Johnson 0065875f12 fix: ensure access token is null not undefined (#2981) 2020-06-08 23:28:07 +00:00
dependabot[bot] b39af1f7e6 chore(deps): bump websocket-extensions from 0.1.3 to 0.1.4 (#2979)
Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/faye/websocket-extensions-node/releases)
- [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-08 14:42:47 -06:00
Tessa Thornton a949d7e881 [CORL 1031] Story actions (#2975)
* add story actions dropdown with rescrape button

* move open/close story mutation to story actions dropdown

* remove unused props

* fix tests
2020-06-08 14:14:22 -06:00
Wyatt Johnson eee909f05b feat: removed throng and cluster support (#2961) 2020-06-08 13:47:23 -06:00
Vinh 72e1b249b1 [CORL-1029] Better HTML Support (#2956)
* feat: Improve html handling, integrate new @coralproject/rte

* chore: refactor and add comments

* chore: remove obsolete line

* chore: rename `inputId` to `inputID`

* chore: upgrade @coralproject/rte

* fix: update snapshots

* chore: apply review suggestions

* fix: snapshot / tests

* fix: merge issues

* [CORL-1056] Configurable RTE (#2967)

* fix: merge issues

* feat: Configure RTE

* test: add tests

* chore: just a comment

* chore: remove unused translations
2020-06-08 13:24:38 -06:00
Wyatt Johnson ba08447d5e [CORL-1090] Sections Alpha (#2973)
* feat: added section filtering support

* fix: addressed issues around filtering sections

* fix: fixed issue with section filter
v6.2.0
2020-06-04 13:32:04 +02:00
Wyatt Johnson 92c72f7041 fix: replace insert with push for slack channels (#2965)
Co-authored-by: Kim Gardner <kgardnr@gmail.com>
2020-06-01 21:23:15 +00:00
Wyatt Johnson 08a9788bcc fix: fixed error with method bindings on strategies (#2971)
- moved request bindings to after the cache handler

Co-authored-by: Kim Gardner <kgardnr@gmail.com>
2020-06-01 17:10:42 -04:00
Vinh 3e0241b523 feat: add SignedOutEvent (#2968)
Co-authored-by: Wyatt Johnson <wyattjoh@gmail.com>
2020-06-01 14:11:45 -04:00
Vinh fe8cb90a1c [CORL-1086] Support bodyClassName in embed (#2969)
* feat: support embed config `bodyClassName`

* chore: add comment
2020-05-21 22:27:27 +00:00
Wyatt Johnson 74366bec55 [CORL-1046] Slack Helper Text Fix (#2959)
* fix: moved helper text

* chore: version bump

* chore: update description to match github
2020-05-15 18:28:15 +00:00
Wyatt Johnson ed92f4916d [CORL-810] Custom Moderation Phases (#2901)
* feat: initial implementation

* feat: renamed fields from mutations

* fix: more renaming to streamline {Key,Secret}->SigningSecret

* feat: introduced WrappedInternalError

* feat: enhanced extern payload, more fetch options

- Added tenant.{id,domain} to extern payload
- Added site.id to the extern payload
- Added response size limit to fetch
- Added new SCRAPE_MAX_RESPONSE_SIZE env var for managing the size of
  responses for scraping

* fix: fixed bug with scrape invocation

* feat: added more queries + mutations

- Added Query.externalModerationPhase
- Added Mutation.createExternalModerationPhase
- Added Mutation.updateExternalModerationPhase
- Added Mutation.enableExternalModerationPhase
- Added Mutation.disableExternalModerationPhase
- Added Mutation.deleteExternalModerationPhase
- Added Mutation.rotateExternalModerationPhaseSigningSecret

* feat: added secret management

* fix: linting

* fix: merge conflict fix

* feat: added UI

* fix: linting

* fix: linting

* fix: updated snapshots

* fix: improved docs

* fix: improved docs

* fix: added locales

* review: improve naming

* review: some review changes

- Switched /moderation/phase to /moderation/phases
- Fixed scrolling
- Fixed redirection

* fix: added scroll timeout for webhooks
2020-05-14 19:20:35 +00:00
Wyatt Johnson ceb96dba75 [CORL-1048] Cookie Deprecation (#2944)
* feat: dropped cookie support due to ITP issues

* feat: added improved accessToken handling

* fix: linting

* fix: removed variadic part of JWT

* fix: bump long-settimeout version

* review: removed management classes

* fix: updated snaps

* review: renamed based on review

* review: removed guard clauses around errors surrounding auth
2020-05-13 22:39:22 +00:00
Wyatt Johnson f73597d7d1 [CORL-1013] Count Reset (#2960)
* feat: added reset option for count.js

* fix: adjust reset beheviour

* fix: switched to bundlesize2

* fix: added flag to enable github checks

Co-authored-by: Vinh <vinh@vinh.tech>
2020-05-13 16:47:45 +00:00
Vinh 79e0da2c2f fix: bug when posting a comment without ever openened the AllCommentsTab first (#2963) 2020-05-13 17:31:15 +02:00
Wyatt Johnson 1f69bb2f14 [CORL-1075] Metrics Cleanup (#2955)
* feat: added support for metrics on another port

* fix: handle cluster better

* fix: linting
2020-05-11 21:01:53 +00:00
Wyatt Johnson d0ab2ef8c5 feat: support auto-pause live updates (#2947)
Co-authored-by: Vinh <vinh@vinh.tech>
2020-05-07 16:21:37 +00:00
Wyatt Johnson 1624787004 i18n Validator (#2953)
* feat: added validate script and docs

* fix: added link
2020-05-07 16:07:07 +00:00
Hector Nieva 8ea88f9b96 Add flag deleted with value "true" to comments of deleted users (#2952)
* [Fix] Add deleted as true to comments of deleted users

* fix: revert deleted = true

Co-authored-by: hector.melo <hector.melo@corp.globo.com>
Co-authored-by: Wyatt Johnson <me@wyattjoh.ca>
Co-authored-by: Wyatt Johnson <wyattjoh@gmail.com>
2020-05-07 15:46:04 +00:00
Cristian Dean 45873398dd Update pt-BR translation (#2949)
Co-authored-by: Wyatt Johnson <wyattjoh@gmail.com>
2020-05-05 22:07:46 +00:00
Vinh 739d5b6611 fix: always show details on moderation card (#2946) 2020-05-04 11:53:37 -04:00
Kim Gardner 192c3486af [CORL-1050] Add Perspective toxicity support for fr and pt (#2940)
* Add support for fr and pt

* fix: added some more docs

Co-authored-by: Wyatt Johnson <me@wyattjoh.ca>
2020-04-24 12:01:44 -06:00
Wyatt Johnson 0e9621c499 fix: Added linting rule to disable use of object prototypes (#2939) 2020-04-17 17:12:36 +00:00
Vinh 5b92f7e968 [CORL-1014] Style comments based on number of reactions (#2930)
* feat: add ability to style comments based on number of reactions

* feat: add coral-indent class

* fix: tests

* fix: snapshots
2020-04-15 18:28:07 +02:00
Vinh c9a0ab8848 [CORL-878] Upgrade dependencies (#2867)
* chore: upgrade fluent

* chore: upgrade metascraper

* chore: upgrade akismet-api

* chore: upgrade apollo-server-express

* chore: upgrade archiver

* chore: upgrade bull

* chore: upgrade express, cheerio, content-security-policy-builder

* chore: upgrade convict

* chore: upgrade cors, cron

* chore: upgrade csv-stringify

* chore: upgrade dompurify

* chore: upgrade dotenv

* chore: upgrade express-static-gzip

* chore: upgrade fs-extra

* chore: upgrade graphql-js

* chore: upgrade graphql packages

* chore: upgrade html-minifier

* chore: upgrade html-to-text

* chore: upgrade ioredis

* chore: upgrade joi

* chore: upgrade jsdom

* chore: upgrade jsonwebtoken

* chore: upgrade juice

* chore: upgrade jwks-rsa ad linkifyjs

* chore: upgrade lodash

* chore: upgrade luxon

* chore: upgrade metascraper

* chore: upgrade mongodb

* chore: upgrade ms

* chore: upgrade node and node-fetch types

* chore: upgrade nodemailer nunjucks and typescript-eslint

* chore: Upgrade passport

* upgrade: prom-client react-helmet source-map-support stack-utils

* chore: upgrade uuid

* chore: upgrade @babel packages

* chore: upgrade types

* chore: upgrade autoprefixer

* chore: upgrade jest

* chore: upgrade ts-jest

* chore: remove linkify.d.ts

* chore: upgrade bowser

* chore: case-sensitive-paths-webpack-plugin

* chore: upgrade classnames

* chore: upgrade commander

* chore: upgrade comment-json

* chore: upgrade cross-spawn compression-webpack-plugin del

* chore: upgrade build and watch related dependencies

* chore: upgrade css-vars-ponyfill

* chore: upgrade eslint and css-vars-ponyfill

* chore: upgrade enzyme and eventemitter2

* fix: form bug

* chore: upgrade farce

* chore: upgrade final form

* chore: upgrade react-popper

* chore: upgrade flat and fork-ts-checker-webpack-plugin

* chore: upgrade husky and gulp related, intersection observer

* chore: upgrade lint-staged

* chore: upgrade marked, loader-utils, mini-css-extract-plugin

* chore: upgrade postcss-nested, proxy-polyfill, pstree.remy

* chore: upgrade prettier

* chore: fix prettier changes, upgrade react

* chore: mute createFactory deprecated message

* chore: upgrade react-copy-to-clipbard, react-axe, react-dom, react-test-renderer, react-timeago

* chore: upgrade react-transistion-group, react-responsive

* chore: upgrade types

* chore: upgrade react-dev-utils, react-error-overlay regenerator-runtime

* chore: upgrade types, sinon, sockjs-client, strip-ansi

* chore: upgrade types, fonts

* chore: upgrade nunjucks, ts-node, typescript-snapshot-plugin, wait-for-expect

* chore: upgrade eslint packages

* chore: upgrade fluent, types

* chore: upgrade jsdom dep

* chore: upgrade mongo

* chore: upgrade deps

* chore: upgrade typescript, recompose

* chore: upgrade prettier

* chore: remove obsolete prettier config

* chore: upgrade jsdom types

* chore: upgrade typescript-eslint

* chore: upgrad deps

* chore: upgrade deps

* chore: upgrade relay related modules

* chore: upgrade docz WIP

* chore: upgrade docz

* chore: add guard

* chore: remove obsolete line

* chore: comment

* chore: refactors

* fix: hook count change error
2020-04-15 18:15:31 +02:00
Wyatt Johnson e180cf87d7 fix: added more details to slack config (#2937) v6.1.0 2020-04-14 22:28:14 +00:00
Kim Gardner de976a5397 Additional Dutch translations (#2936)
* Fix typo

* Add new NL translations
2020-04-14 22:18:34 +00:00
Wyatt Johnson 257830a6c5 [CORL-1035] Moderated By Bug (#2935)
* fix: improved moderated by component

* fix: uncommented line
2020-04-14 21:55:40 +00:00
Tessa Thornton 518056f382 [CORL-1033] don't show view conversation link if callback is not defined (#2934)
* don't show view conversation link if callback is not defined

* remove unnecessary callback
2020-04-13 17:39:17 +00:00
Tessa Thornton 84936ca35c fix error thrown attempting to remove announcements (#2933) 2020-04-13 16:09:33 +00:00
Wyatt Johnson 4194b08a12 [CORL-1002] Queue Improvements (#2931)
* fix: improved count handler for stories not found

* feat: removed performance-now

* feat: cleaned up processors, exposed counts

* feat: increased verb of schd jobs

* fix: removed dead code
2020-04-10 16:15:09 +00:00
Wyatt Johnson 98e6a3ccc7 chore: bump version 6.1.0 (#2932)
Co-authored-by: Kim Gardner <kgardnr@gmail.com>
2020-04-10 15:25:01 +00:00
Kim Gardner 64f5171ff2 [CORL-1003] Add Markdown link to configure page & revert some French translations (#2928)
* french corrections

* Add translations

* Updated FR translations

* More FR fixes

Co-authored-by: Gilles FRANCOIS <gilles@sopress.net>
2020-04-10 10:37:11 -04:00
Wyatt Johnson 6711f09a79 [CORL-1001] Wordlist Fixes (#2920)
* fix: improve wordlist highlighting and perf

* fix: updated tests

* fix: implmeneted new regexp lib/patterns

* fix: improve comment body css

* fix: take into account the tree shaking is disabled

See: https://github.com/webpack/webpack/issues/7094

Co-authored-by: Chi Vinh Le <vinh@vinh.tech>
Co-authored-by: Kim Gardner <kgardnr@gmail.com>
2020-04-06 15:04:05 -04:00
Wyatt Johnson 8966a8201b fix: removed crossorigin attribute on custom css tags (#2919)
Co-authored-by: Kim Gardner <kgardnr@gmail.com>
2020-04-03 17:58:52 -04:00
Tessa Thornton 7fc0e2e489 [CORL-974] Add more classnames (#2913)
* wired css

* add more classnames to hook into

* update snaps

* update more snaps

Co-authored-by: Kim Gardner <kgardnr@gmail.com>
2020-04-03 15:54:17 -04:00
Cristian Dean 7c3c510bbc Add tenantDomain to StoryCreatedEventPayload (#2899)
* Add tenantID and siteID to StoryCreatedEventPayload

* fix: added tenantID to payload

* Remove tenantID from StoryCreatedCoralEvent

* Add tenantDomain to webhook schema

* fix: small comment fixes

Co-authored-by: Wyatt Johnson <me@wyattjoh.ca>
2020-04-02 21:39:58 +00:00
Wyatt Johnson 94ece10284 [CORL-996] Force SSL Configuration (#2917)
* fix: added new FORCE_SSL config, reverted production SSL handling

* fix: added another test to handle purify testing
2020-03-30 20:35:18 +00:00
Hector Nieva ef01f427de Update PT-BR translations after release 6 (#2915)
Co-authored-by: hector.melo <hector.melo@corp.globo.com>
Co-authored-by: Kim Gardner <kgardnr@gmail.com>
2020-03-30 16:12:34 -04:00
Tessa Thornton 5db096942a remove 'mailto:' prefix from links (#2914)
Co-authored-by: Kim Gardner <kgardnr@gmail.com>
2020-03-27 14:09:42 -04:00
Tessa Thornton 4645ed4cd7 [CORL-943] Send test emails (#2882)
* add smtp test email

* disable button if email not enabled

* add error handling

* internationalize strings

* sort imports
2020-03-27 11:46:53 -04:00
Tessa Thornton 7fd524cd6a [CORL-924/CORL-923] show all comments or staff comments in slack (#2872)
* add allcomments option to slack config

* create separate class for hadnling slack event publishing

* add strings

Co-authored-by: Wyatt Johnson <wyattjoh@gmail.com>
Co-authored-by: Kim Gardner <kgardnr@gmail.com>
2020-03-26 21:21:09 -04:00
Wyatt Johnson 3cb5d0ff9f [CORL-970] CircleCI Version Bump (#2893)
* feat: bump config version

* fix: removed old version tag

Co-authored-by: Kim Gardner <kgardnr@gmail.com>
2020-03-26 21:04:44 -04:00