Commit Graph

208 Commits

Author SHA1 Message Date
Vinh 3bfcc509d2 [CORL-678] Transition to eslint (#2634)
* chore: setup eslint

* chore: tslint checks with types & check for import order

* chore: complete eslint transition

* fix: tests

* fix: linting after rebase, faster lint for lint-staged

* chore: remove line

* fix: lint rules

* feat: add a11y linter and fix errors

* fix: tests
2019-10-15 22:56:38 +00:00
Tessa Thornton 33487be0ce [CORL-469] keyboard shortcuts (#2588)
* make comments selectable in queue

* manage focus

* switching focus works

* keyboard navigation sort of works

* scroll into view

* prev, next, approve, reject

* shortcuts for queue switching

* ban modal?

* focus search bar with ctrl f

* keyboards shortcuts modal

* zen mode

* single comment view

* ban users from moderate cards

* clean up ts and lints

* update snaps

* add strings

* update smaps

* remove single comment view shortcut

* add single comment view to moderation queue

* clean up types

* fix deps for useEffect/useCallback hooks

* feat: added toggable help
2019-10-03 23:22:24 +00:00
Tessa Thornton a5c3e94751 [CORL-544] use react helmet to add favicon declarations to head (#2595)
* use react helmet to add favicon declarations to head

* rename adminHead to head

* fix: case
2019-09-25 20:22:32 +00:00
Wyatt Johnson 5c1eb57d3e chore: cleaned up package.json (#2591) 2019-09-24 19:54:05 +00:00
Wyatt Johnson 7b5b260a18 chore: version bump (#2589) 2019-09-24 18:08:05 +00:00
Vinh 4e4986fc03 fix: some form fields are not nullable (#2577) 2019-09-23 21:36:24 +00:00
dependabot[bot] 47834a82bb chore(deps): bump lodash.merge from 4.6.1 to 4.6.2 (#2549)
Bumps [lodash.merge](https://github.com/lodash/lodash) from 4.6.1 to 4.6.2.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2019-09-10 16:14:30 +00:00
dependabot[bot] a8976a2141 chore(deps): bump lodash.template from 4.4.0 to 4.5.0 (#2548)
Bumps [lodash.template](https://github.com/lodash/lodash) from 4.4.0 to 4.5.0.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.4.0...4.5.0)

Signed-off-by: dependabot[bot] <support@github.com>
2019-09-10 15:57:40 +00:00
dependabot[bot] 718bd2758f chore(deps-dev): bump lodash-es from 4.17.11 to 4.17.14 (#2547)
Bumps [lodash-es](https://github.com/lodash/lodash) from 4.17.11 to 4.17.14.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.14)

Signed-off-by: dependabot[bot] <support@github.com>
2019-09-10 15:46:26 +00:00
Kim Gardner 721b2e7d67 [CORL-527] English copy tweaks (#2546)
* English copy tweaks

* fix: unit tests

* Use reactions to be more general

* fix: snapshots
2019-09-10 20:55:34 +07:00
Tessa Thornton f84c3e4a60 [CORL-595] move notification settings update button (#2538)
* move notification settings update button

* move settings save button

* fix: version bump in package lock file
2019-09-10 08:13:14 +00:00
Kim Gardner 15d41f1ae8 Typo fixes and bump Coral version to 5.0.0 (#2528)
* Typo fixes and bump package version

* fix: tests
2019-09-05 17:15:40 -04:00
Wyatt Johnson efea0e8e1c [CORL-498, CORL-495, CORL-539, CORL-496, CORL-494] Email Notifications Support & Framework (#2498)
* chore: renamed old templates

* feat: initial notifications support

* feat: email enhancements

* fix: linting

* feat: initial digesting beheviour

* feat: added notification configuration

* feat: added unsubscribe routes

* fix: fixed failing snapshots/tests bc random ids

* feat: adjusted the save beheviour, added tests

* feat: added tests

* feat: added staff replies

* feat: renamed E-Mail to Email

* feat: enhanced cron processing

* fix: linting + updating tests

* feat: enhanced cron context

* fix: added staff replies back in
2019-09-05 07:02:26 +00:00
Nick Funk 46f0d08cf7 [CORL-236] Allow user to delete their account (#2495)
* Create preliminary account deletion program flow

Does not validate password as of yet.
Does not submit a mutation to begin deletion scheduling.

CORL-236

* Create preliminary account deletion confirmation form and schema mutation

Hooks up validation and error handling to confirm the user's
password during account deletion.

Scheduling the account deletion is not implemented yet.

CORL-236

* Update requestAccountDeletion to set the user's scheduled deletion date

CORL-236

* Create preliminary cron job for scheduled account deletions

CORL-236

* Show tombstoned comments when the user has deleted their account and comments

CORL-236

* Pull in client locales for date formatting on account deletion steps

CORL-236

* Update more areas due to comment revision being nullable

CORL-236

* Allow users to cancel their account deletion request

CORL-236

* Show account deletion callout at the top of the profile stream tab

CORL-236

* Further comments and edge case handling for deleted comments site wide

CORL-236

* Show account deletion callout in the comments stream tab

CORL-236

* Send out emails during relevant account deletion events

- Confirm deletion requested
- Cancellation of deletion request
- Account deletion completed

CORL-236

* Unset emails when deleting user accounts instead of setting to null

Fixes email index collision error from setting multiple emails to null.

CORL-236

* Show organization email in account deletion steps

CORL-236

* Mark comments as deleted so that we can properly tombstone them in the stream

CORL-236

* Fix improper templating for account deletion completed emails

Sub organization name in where previously we were using the account username.

CORL-236

* Disable user drawer and display deleted flag on users in community

CORL-236

* Check for author before passing inReplyTo in ModerateCardContainer

Sometimes null when user is deleted.

CORL-236

* Tombstone moderate cards when the underlying comment is deleted

CORL-236

* Re-add deleted field to CommentContainer fragment

CORL-236

* Disable commenting or replying when user is scheduled for deletion

CORL-236

* Add snapshot tests around deletion states for comment cards and forms

CORL-236

* Add tests around the account deletion steps

CORL-236

* Set account deletion to run every 30 minutes

CORL-236

* Rename DELETION authorization to PENDING_DELETION

CORL-236

* Change log message for when account deletion tasks finds no more users to delete

CORL-236

* Update snapshots to handle proper deleted flag for scheduled deleting users

CORL-236

* Fix import ordering on various files to match coding standards

CORL-236

* Specify tenantID when querying for user during deletion

CORL-236

* Add back missing clientMutationId on cancelAccountDeletion mutation

CORL-236

* Use $unset to clear the scheduledDeletionDate

CORL-236

* Simplify create of scheduledAccountDeletion CRON function

CORL-236

* Rename and organize scheduledTask creation logic

- Rename startCronJobs to startScheduledTasks
- Return an object of named ScheduledTask items instead of an array of tasks

CORL-236

* Add comment about returning updated user when clearing scheduledDeletionDate

CORL-236

* Remove unnecessary array around tenant.locale in dateTime formatter

CORL-236

* Remove unnecessary non-null enforcement on tenant.id

CORL-236

* Remove string templated React element content

CORL-236

* Move english translated validation error to correct language file

CORL-236

* Simplify rendering of DeletionRequestCallout when deletionDate isn't available

CORL-236

* Use ternary expression instead of multiple {bool && (...)} checks

CORL-236

* Use classes object with line child style to style the step bar

CORL-236

* Update StepBar so that children of Step nodes can be undefined

Allows us to not have to insert empty placeholder strings/elements when
we want to have an empty step node.

CORL-236

* Remove use of luxon from account deletion request callouts for now

We need to decide if the extra 15KB from luxon is worth it in our bundles
before making this change.

CORL-236

* Remove unnecessary embed/deleteAccount endpoint

CORL-236

* Move DeleteAccountModal contents into a separate component

Cleans up the state management when user closes the modal and we
need the modal steps to restart.

CORL-236

* Remove localization around delete account button icon

CORL-236

* Use inline `collection(mongo)` in clearing and setting deletion date

CORL-236

* Simplify form state validation on account deletion confirm page

CORL-236

* Add todo to iterate over tenants in account deletion

CORL-236

* Remove punctuation and add context to logger messages during account deletion

CORL-236

* Break out mongo collection initialization into a shared object

Also adds a try catch error handling around the scheduled deletion
operations. Prevents errors from taking the server down.

CORL-236

* Add TODO to extract out a common formatter for date times

CORL-236

* Update translations for account deletion details

CORL-236

* Update translations for account deletion completion page

CORL-236

* During scheduled deletion, when locking deletion date, return modified user

CORL-236

* Remove un-necessary fragment container around deletion steps component

CORL-236

* Move preventSubmit outside of render function on ConfirmPage

CORL-236

* Convert collections into object of Mongo db collection initializers

Allows us to only initialize the collections we need with our
Mongo instance.

CORL-236

* Remove un-necessary lambda wrapping around collections initializer functions

CORL-236
2019-09-03 16:38:43 -06:00
Kim Gardner 8dae0feb52 Updates version number (#2488)
* Updates version number

* fix: updated version in package-lock.json
2019-08-20 12:47:30 -04:00
Tessa Thornton ee93267d97 [CORL-220] Change email address (#2461)
* change email form

* add update email mutation

* validate new email addresses

* add email verification callout

* add translation strings

* fix submit button logic

* rename model methods

* style email verifcation box

* resend email verificatoin button

* show success message on email resend

* update user profile email

* fix duplicate import

* add change email spec

* fix profile spacing

* update snapshots

* update snaps

* add preventSubmit function to email change component

* update business logic for profile updating

* update logic for when users can update email or username

* check for less specific duplicate email error

* prevent sso-only users from editing email

* only allow email and username edit if enabeld in local profile

* use generic server error for cannot update profile

* remove merge conflict

* fix tests

* extract logic to get auth integrations

* fix merge error
2019-08-20 12:28:14 -04:00
Vinh 43b6a2cdcd [CORL-149] Persisted Queries (#2445)
* feat: enable persisted queries on the client

* fix: use `id` inside websocket message

* feat: initial server support for PQ

* feat: deeper server support

* feat: abstracted persisted query replacing logic
2019-08-15 21:03:32 +00:00
Wyatt Johnson e76fddd13c [next] Added trust proxy configuration (#2471)
* feat: added trust proxy configuration

* chore: version bump
2019-08-13 15:41:50 -04:00
Wyatt Johnson 7900b02c40 fix: moved url-regex to deps not devDeps (#2463) 2019-08-12 16:36:46 -04:00
Wyatt Johnson 86bba73919 [CORL-513] Permitted Domain Fixes (#2455)
* fix: adjusted allowed domains configuration

* fix: removed unused logic around allowed domains prefixing

* fix: removed unused localizations

* fix: fixed signup flow
2019-08-12 18:02:15 +00:00
Nick Funk e3f24811fc [CORL-235] Allow a user to download their comment history (#2449)
* Create preliminary UI for requesting a user's comment history

CORL-235

* Create preliminary download handler

CORL-235

* Create preliminary CSV exporter for downloading user's comments

CORL-235

* Create preliminary download comments flow with email and landing page

User can download their comments after requesting via an email.
Does not include limiters preventing users from spamming the download flow.

CORL-235

* Style the download comments landing page to match the spec

CORL-235

* Update the profile download comments to respect 14 day download limit

CORL-235

* Hook up request limiter on the comment download end points.

CORL-235

* Create sorry dialogue for when the download comments link is invalid/expired

CORL-235

* Create loading spinner for comment download landing page

CORL-235

* Create an optimistic updater for requesting a comment download

CORL-235

* Add localization for download comments landing page's sorry text

CORL-235

* Adjust downloaded comment format and contents

- Format the date to match tenant local
- Format dates to be using numeric values with date and time
- Add comment URL to exported CSV record

CORL-235

* Rename `createCSV` to `createExportedContent` in the download handler

CORL-235

* Make comment download callout full width and left justified

CORL-235

* Update stream snapshots to account for the download comments changes

CORL-235

* Update snapshots to correspond to download comments changes

CORL-235

* Add date filter to the comment download

Will filter by date of the issued token to only include comments before
that time.

CORL-235

* Clean up the layout of the list items in the download comments landing page

CORL-235

* fix: localization fixes

* fix: formatting

* fix: download file enhancements

* fix: addressed download request loophole

* Update snapshots to address button changes on download comments landing page

CORL-235

* Simplify download comment landing page components

CORL-235

* Remove max-width calc's on account main layout and set them in child views

Sets the max-width settings on the download route since it's custom
set on all the othere routes (email and password).

CORL-235

* Bump npm version in package.json

CORL-235
2019-08-09 21:17:24 +00:00
Wyatt Johnson 4c65d43954 [CORL-404] Recent Comment History (#2354)
* feat: initial support for auto pre-moderation

* chore: refactor collection access

* fix: linting

* fix: rebasing issue

* fix: exported helpers

* feat: added extensions, lintd

* fix: rebase fix

* feat: renamed automaticPreModeration to recentCommentHistory

* feat: initial implementation of admin config

* feat: support recent history markers

* feat: rename visible to published

* feat: reworked history drawer

* chore: extracted tooltip

* feat: implemented user drawer

* fix: fixed translation key

* fix: resolved issue with NaN
2019-08-08 18:18:18 +00:00
Vinh 3f307002e2 [CORL-391] Fix jankiness when opening reply box of last comment in Stream (#2447)
* feat: add useResizeObserver hook

* fix: stream jumps when clicking on the last reply button when scrolled to the bottom

* chore: use resize observer in auth popup and simplify resize handling

* fix: snapshots and remove resize observer from stream

* fix: focus unmounted rte
2019-08-07 15:26:30 -04:00
Wyatt Johnson 0c5cdc9f3c [next] Version Bump + Docs Update (#2428)
* chore: version bump, updated email docs

* chore: updated package-lock.json
2019-07-29 18:02:47 +00:00
Wyatt Johnson 14e225e26f [CORL-435] Stable CSS Classes (#2414)
* feat: fixed import issue with react

* feat: initial impl

* fix: review
2019-07-26 22:43:42 +00:00
Wyatt Johnson d312d380ae [CORL-436] Embed Code (#2398)
* feat: initial implementation

* fix: moved embed configuration to advanced

* feat: added copy button to embed code

* fix: removing unused line
2019-07-12 22:35:09 +00:00
Wyatt Johnson 6fe7d56836 [next] Bump to 5.0.0-beta.4 (#2386)
* chore: version bump

* chore: bump resource class
2019-07-02 22:51:43 +00:00
Wyatt Johnson e72b15c505 [next] Cookie Support (#2339)
* feat: added cookie support to coral

* feat: adapt client to use cookies

* fix: safari input styles

* fix: lint

* fix: linting

* fix: support clearing cookies properly, oauth

* feat: support cookies for websocket upgrade requests

* fix: lint

* fix: tests
2019-06-25 21:48:58 +02:00
Wyatt Johnson 3576b6a943 chore: bumped version (#2375) 2019-06-21 23:04:52 +00:00
Vinh 413f3e2f1e [CORL-166] Live Updates on Mod Queues (#2368)
* feat: client implementation of subscriptions and modqueue live counts

* fix: unit tests

* feat: live status update in moderation

* feat: live update of new comments in moderation

* chore: View New instead of View More

* feat: fade in transition for new comments

* chore: turn websocket proxy back on

* feat: initial server impl

* fix: make it work :-)

* fix: add box shadow

* chore: make test subscriptions only support 1 top level field following the spec

* fix: linting

* feat: support clientID

* fix: linting

* feat: support commentStatusUpdated subscription

* fix: disabled styles for approve and reject button

* feat: show moderated by system and update flags

* feat: support metrics recording on websocket connections

* fix: handle when same comment enters but leaves again
2019-06-21 17:01:07 +00:00
Cristian Dean 05f9daec2e Update mongodb and mongodb-core libs (#2366) 2019-06-19 16:06:38 +00:00
Vinh 812649153e chore+fix: upgrade jest + fix flaky renderStream test! (#2350) 2019-06-07 23:44:08 +00:00
Vinh 5b64d3d14b [next] Fix warnings and errors that appear during test (#2348)
* fix: handle react act errors

* fix: fixed deprecated reporter option
2019-06-07 22:01:57 +00:00
Vinh d4b99a2a57 [CORL-420] Upgrade Relay (#2346)
* chore: upgrade Relay

* fix: fix errors

* fix: snapshot

* fix: relay prefix

* fix: fragment spec error
2019-06-07 21:42:26 +00:00
Wyatt Johnson 6bd3e093b3 [CORL-157] Ignore Users (#2328)
* feat: added server impl of ignore user

* feat: added development error wrapping

* feat: Add arror to popover

* fix: dependencies

* fix:  server locals watch paths

* feat: AuthorPopover & Member Since

* chore: refactor stream file organization

* feat: ignore user

* fix: file case

* feat: add support for useLocal hook!

* test: test ignored users
2019-05-31 22:41:20 +00:00
Wyatt Johnson 1302ea1918 [CORL-147] Lazy Story Creation + Proxy (#2302)
* feat: added toggle for lazy stories and proxy

* feat: improve story loading logic
2019-05-31 22:28:40 +00:00
Wyatt Johnson 4ce7512c4b fix: replace npm-run-all with patched version (#2332) 2019-05-29 16:53:22 +00:00
Kiwi 3ea696fcc8 [CORL-339] Allow comment draft when not logged in (#2315)
* feat: allow user to draft a comment before logging in

* test: snapshot

* fix: lint

* chore: upgrade rte

* fix: snapshots
2019-05-20 18:14:09 +02:00
Kiwi ab466510f3 fix: use custom webpackHotDevClient with debounced reload and filter unwanted warnings (#2314) 2019-05-15 20:33:39 +02:00
Kiwi 1794086683 [CORL-360] Embrace CSS Variables (#2312)
* fix: docz bug

* feat: implement css variables

* fix: adapt docz

* fix: webpack config

* fix: add ui l10n bundle to tests
2019-05-15 01:21:07 +02:00
Wyatt Johnson d4b8e5ef70 [CORL-281] Metrics (#2298)
* feat: iunitial metrics implementation

* fix: graphql endpoint was throwing errors.

* feat: add metrics env variables to readme
2019-05-10 00:26:24 +02:00
Wyatt Johnson df57b4eb17 [next] Email (#2261)
* feat: suspending, banning, now propogation

* feat: added email rendering + localization support

* fix: fix related to lib

* refactor: moved juicer to queue task

* refactor: cleanup of job processor

* refactor: improved error messaging around failed email

* feat: initial forgot passwor impl

* fix: fixed rebase errors

* feat: send back Content-Language header with requests

* feat: added ban email

* feat: implemented forgotten password API

* fix: linting

* feat: support more emails

* fix: promise patches

* feat: initial confirm email API

* feat: added rate limiting

* feat: added URL support

* feat: added email docs

* fix: updated docs

* chore: documentation review

* fix: fixed build bug

* feat: implement forgot password in auth popup

* test: add tests + fixes

* chore: rename StatelessComponent to FunctionComponent

* fix: types and test fixes

* chore: upgrade deps

* fix: THANK YOU TESTS FOR SAVING MY A**

* chore: reorder imports

* chore: remove obsolete !

* feat: implement accounts bundle

* refactor: review suggestion

* fix: rebase upgrade error

* fix: rebase bug

* feat: reset password link support

* test: add tests for account password reset page

* fix: remove redirect uri

* fix: revert local state changes
2019-05-09 22:54:56 +02:00
Kiwi 945bd7f2b0 [CORL-367] Speedup scripts & better server development and debugging (#2306)
* feat: speedup scripts & make server development faster

* feat: fix server debugging + allow attaching to a running node process

* feat: make npm run during watch less chatty
2019-05-09 22:08:12 +02:00
Kiwi ea6f42c256 [CORL-305] Speed up build process and upgrade dependencies (#2304)
* feat: speed up build process, upgrade majority of dependencies

* feat: allow specifying max cores

* chore: add some comments
2019-05-07 20:22:19 +02:00
Kiwi ab938985e4 [CORL-294] Moderate a single story + quick search (#2286)
* feat: allow passing a `storyID` to `Query.moderationQueues`

* feat: moderate by story

* feat: implement search story combobox

* feat: add translations

* fix: tests

* fix: duplicate id

* fix: rename file

* chore: add more comments

* fix: add missing translation

* review: use query parameter "q" instead of url path

* chore: move placeholder logic inside, maybe this makes it clearer :-D
2019-04-26 14:23:46 +00:00
Wyatt Johnson a91de05af9 fix: modified uri parsing for mongodb (#2282) 2019-04-25 15:16:36 +00:00
Kiwi 5150cdf60e [CORL-331] Better tests with types (#2270)
* feat: suspending, banning, now propogation

* feat: new mutation api with hooks support

* feat: better types in tests and refactor

* fix: lint
2019-04-23 19:46:14 +00:00
Wyatt Johnson dbbc1af42e [CORL-155] User Suspending and Banning (#2247)
* feat: suspending, banning, now propogation

* feat: adapting to `now`

* feat: support auth for suspension/banned

* feat: added trace-id to requests

* feat: new mutation api with hooks support

* feat: added user status filtering, current field

* feat: Implement filter by status, adapt to new USER_STATUS type, add lookup helper <3

* fix: typo

* fix: tests

* chore: rename banned status to ban status

* test: feature test + lots of test helper improvements e.g. types

* fix: add translation to ban user modal

* fix: translation

* fix: test
2019-04-22 22:57:32 +00:00
Wyatt Johnson 08e8e61e88 [next] Search (#2251)
* feat: added text indexes, query param to edges

* fix: cleaned up, added createdAt index

* fix: improved indexing support

* feat: integrate search into community and stories

* feat: adorn with search button

* test: add tests
2019-04-02 18:09:15 +02:00
Kiwi 5e90f028a9 feat: Modal support (#2252) 2019-04-02 01:14:27 +02:00