Commit Graph

260 Commits

Author SHA1 Message Date
Cristian Dean 1dba761b40 [Next] Add auto redirect when there is a single enabled auth integration (#2422)
* Add auto redirect when there is a single enabled auth integration

* fix: small syntax cleanup
2019-07-29 16:35:19 +00:00
Wyatt Johnson 4f640826de fix: ensure that number is whole (#2416) 2019-07-25 00:38:46 +00:00
Wyatt Johnson b1732f8a00 feat: initial implementation (#2409) 2019-07-23 17:20:40 +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 bc0b0d0339 [next] Email/Password Improvements (#2400)
* feat: improved some password/email fields

- All secret fields are now "hidden" by default
- All email fields now have autocomplete/spellcheck disabled with
  correct typings

* feat: add additional email validation
2019-07-12 21:07:14 +00:00
Wyatt Johnson f95b705585 feat: added toxic labels (#2396) 2019-07-12 20:41:34 +00:00
Wyatt Johnson b5b9cb7e2f feat: support static uri's with paths (#2399) 2019-07-12 19:11:11 +00:00
Nick Funk 0b20542f05 [CORL-233] Create a user drawer with comment streams (#2395)
* Create preliminary user history drawer with user fragment

CORL-233

* Set font size for the user details to match spec at 16 px

CORL-233

* Update username font style/size, add horizontal rule for user history drawer

CORL-233

* Set user detail min width to align the copy buttons in user history drawer

CORL-233

* Set min width of the user history drawer to match spec

CORL-233

* Remove min width for detail area and card to allow responsive sizing

Allows the copy buttons to sit just to the right of the user
details text.

CORL-233

* Update snapshots to handle clickable username in moderation comment cards

CORL-233

* Create initial pagination of all comments in user history drawer

Shows all comments with a rubbish "load more" button as we haven't
decided if we want to do a load more button or infinite scrolling
solution.

Flex layout helps it create a scroll bar when needed to traverse through
the comment stream.

CORL-233

* Create preliminary user history drawer with user fragment

CORL-233

* Set font size for the user details to match spec at 16 px

CORL-233

* Update username font style/size, add horizontal rule for user history drawer

CORL-233

* Set user detail min width to align the copy buttons in user history drawer

CORL-233

* Set min width of the user history drawer to match spec

CORL-233

* Remove min width for detail area and card to allow responsive sizing

Allows the copy buttons to sit just to the right of the user
details text.

CORL-233

* Update snapshots to handle clickable username in moderation comment cards

CORL-233

* Let the user history drawer fill full height of page

CORL-233

* Add a close button to the user history drawer

CORL-233

* Preliminarily get all and rejected comments showing in the user drawer

CORL-233

* Create preliminary user history drawer with user fragment

CORL-233

* Set font size for the user details to match spec at 16 px

CORL-233

* Update username font style/size, add horizontal rule for user history drawer

CORL-233

* Set user detail min width to align the copy buttons in user history drawer

CORL-233

* Set min width of the user history drawer to match spec

CORL-233

* Remove min width for detail area and card to allow responsive sizing

Allows the copy buttons to sit just to the right of the user
details text.

CORL-233

* Update snapshots to handle clickable username in moderation comment cards

CORL-233

* Let the user history drawer fill full height of page

CORL-233

* Add a close button to the user history drawer

CORL-233

* Set the user history drawer to fill full height of window

CORL-233

* Convert ModerateCardContainer to a FunctionComponent

CORL-233

* Show spinner while all comments are loading in user history drawer

CORL-233

* Style tabs within the user history drawer to be secondary

CORL-233

* Center load more button in the comments for the user history drawer

CORL-233

* Fix scroll bars on nested flexboxes in the user history drawer

CORL-233

* Tweak styling for the user history drawer comments section

Add margins where necessary.
Style the Load More button to match the comment feed elsewhere.

CORL-233

* Fix background of copy buttons to match the user history drawer

CORL-233

* Preliminarily get rejected comments showing in the user history tabs

Still need to consolidate any duplication between the all and rejected
comments containers/queries, but this works correctly as is.

CORL-233

* Show hover and active background color on moderate card usernames

CORL-233

* Hide load more buttons on comment streams when no comments available

CORL-233

* Handle when no comments are available in user history drawer streams

CORL-233

* Actually show all comments in the user history all comments tab

Previously was filtering out rejected and other pre-mod
status-ed comments.

CORL-233

* Style the user history drawer cards to match the spec

CORL-233

* Add localizations around user history drawer tabs

CORL-233

* Allow a mini mode for moderate cards that are shown in the user drawer

CORL-233

* Style user drawer comment tabs to match the spec

CORL-233

* Update snapshots to account for mini moderate cards

Updates the fact that a separator on regular sized cards
now has an additional class name to turn on the divider's
visible border.

CORL-233

* Add user drawer to the queue instead of childed to the moderate card

Prevents the user drawer from prematurely closing when we approve
all items in the moderate queue.

CORL-233

* Update snapshots to account for user drawer on queues

CORL-233

* Set mini and username defaults more cleanly on ModerateCardContainer

CORL-233

* Rename usernameClicked to onUsernameClicked

CORL-233

* Use callback on loadMore calls within user drawer queries

CORL-233

* Localize the no comment text for the user drawer comment streams

CORL-233

* Localize the user not found callout in the user drawer comment streams

CORL-233

* Remove superfluous curly braces

CORL-233

* Extract user history drawer internals into a distinct query component

CORL-233

* Move comments conditional below useCallback initializations

CORL-233

* feat: fixed consistency issues

* Use a concrete tab type on user drawer comment stream tabs

CORL-233

* Use <hr/> instead of <HorizontalRule>

CORL-233

* Clarify logic for showing horizontal rule after comments in user drawer

CORL-233

* Remover bottom border on user drawer tab bar

CORL-233
2019-07-10 10:59:28 -06:00
Wyatt Johnson 9e55ea66fa [next] Websocket Keep Alive (#2394)
* feat: added keepalive config

* fix: format

* fix: adjusted client timeout default

* Update server.ts
2019-07-09 16:27:58 +00:00
Wyatt Johnson e7745a85aa [CORL-416] Disable Live Updates (#2391)
* feat: initial implementation

* fix: docs
2019-07-05 23:10:19 +00:00
Wyatt Johnson da1fa9c9fc [CORL-437] SSO Token Documentation + Updates (#2390)
* feat: updated README, added more SSO functionality

* fix: lint

* fix: lint

* fix: lint

* fix: typos
2019-07-05 21:49:41 +00:00
Wyatt Johnson 0754ceb803 fix: allowed banned/suspended users to view their ignored users (#2387) 2019-07-04 22:11:51 +00:00
Vinh 414a4c2a42 [CORL-421, CORL-415] Live Comments on Stream (#2379)
* feat: support comment replies

* feat: comment created

* feat: live update top level comments

* feat: live updates on the stream embed

* fix: tests

* chore: refactor FadeInTransition

* fix: add missing translation and a live update bug

* fix: graqphql

* feat: improve loading experiene :-)

* fix: live comment bugs

* chore: adapt translation

* feat: stop live updates when story is closed or commenting is disabled

* test: add tests for stream live updates

* fix: remove forgotten piece of code

* fix: tests
2019-06-28 23:20:10 +00:00
Wyatt Johnson 51b142035e [CORL-183] Invite Users (#2349)
* feat: initial UI impl

* feat: attach react devtools hook in development

* feat: working mutations

* feat: polished the invite modal with mutation

Co-authored-by: Vinh <vinh@wikiwi.io>

* feat: added check

* feat: improve the invite server impl

* feat: admin invite interface improvements

* fix: update tests

* feat: moved invite UI to admin

* fix: include email enabled as condition for invite

* feat: added admin tests

* feat: added tests for invite complete flow

* fix: review
2019-06-28 22:51:42 +00:00
Wyatt Johnson 76033118e5 [CORl-278] Perspective Model (#2337)
* feat: support switching the perspective model

* feat: support changing the model on admin

* fix: linting

* fix: removed defaulted value
2019-06-28 22:10:32 +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
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
Nick Funk 0e247ba383 [CORL-163] Add feature button to moderation cards (#2367)
* Preliminarily add a feature button to the moderate card

Pulls the tags for a comment and checks if any or of type "Featured".
Naively compares the tag code with the string "Featured".
Shows a featured button, but is missing localization for the text.

CORL-163

* Use GQLTag definitions from schema to compute whether comment is featured

CORL-163

* Add functionality to feature/unfeature comments in the moderation area

Hooks up the feature button to two mutations for featuring and
unfeaturing comments on moderation comment cards.

CORL-163

* Add localizations for the feature button on the moderation card

CORL-163

* Fix moderate card snapshot banned and suspect word lists

CORL-163

* Fix issue with feature buttons never showing "Featured" text

Localization on parent of the button was causing an override
in the naming of the feature button text. Removed parent
localization and let the child show the localized text values.

CORL-163

* Update moderate card snapshots with feature button

CORL-163

* Update moderate fixtures and snapshots to handle feature button

Add tags section to fixture data.
Add feature button to moderate snapshots.

CORL-163

* Set a default for feature button's localized text

CORL-163

* Add test to verify feature button is available on moderation cards

CORL-163

* Add tests to verify featured comments show featured button state in moderation

Verify that when a featured comment shows in single moderation view,
that the comment shows appropriate featured button state.

CORL-163

* Update feature button styles to use design tokens

CORL-163

* Replace true | false prop definition with boolean type

CORL-163

* Remove un-necessary beforeEach history location in feature.spec.tsx

CORL-163

* Organize styling for feature button

Move float:right with the rest of the layout options.

CORL-163

* Update the feature comment mutation moderate side to update queues

CORL-163

* Update queue counts when a comment is approved via featuring

CORL-163
2019-06-20 23:11:02 +02:00
Wyatt Johnson 9d1f03115f [CORL-381] Featured Comments (#2335)
* feat: initial serverside featuring support

* Update schema.graphql

* feat: add feature comment to moderation dropdown

* feat: feature comments on the stream embed

* fix: tests

* fix: optimize loading and fix tests

* feat: hide featured tab when empty

* feat: introduced flattening

* fix: snapshots

* fix: spacing

* feat: added a dark variant to popover

* feat: add featured comments tooltip

* fix: better tests

* feat: added tag counts

* chore: changed string to enum

* fix: removed unused translation

* fix: changed schema for String -> TAG

* feat: split comments -> comments, featuredComments

* fix: adapt client to new endpoints

* feat: use featured comment counts

* test: featured count handling

* fix: snapshots and optimistically approve comment during feature

* fix: remove unnecessary assertion

* feat: approve featured comments

* fix: make optimistic update less reliant on existing data
2019-06-14 16:27:25 +00:00
Nick Funk 662f5ce314 [CORL-409] Prevent users from ignoring staff members (#2355)
* Throw error if user tries to ignore a staff member

Throws a UserCannotBeIgnoredError if a user tries to ignore
a user who is a staff member. A staff member in this case is
considered anyone who has a role of staff, moderator, or admin.

CORL-409

* Prevent users from ignoring staff in the user info popover

Creates the staff roles in a constant next to the user model.
Uses this to add a computed property to the user resolver.

CORL-409

* Remove unnecessary async declaration from userIsStaff helper function

CORL-409

* Specify ignoreable on users in client test fixtures

Allows the tests to pass for the required computed property
of ignoreable that is computed by whether a user is a staff
member or not.

CORL-409

* Update more fixtures with ignoreable property on mocked users/commenters

CORL-409

* Consolidate ignore-able calculation into re-usable helper methods

Re-use the logic for whether a role is a staff member to
clearly define when a user is ignore-able or not across the
business logic.

CORL-409

* Set the ignoreable optimisticResponse on comment mutations

We have set the ignoreable value in the graphQL schema, so now
the optimisticResponses are looking for a default value to use
until the data result arrives. Put to false since the ignoreable
value is set on our author, we likely don't want to ignore ourselves.

CORL-409
2019-06-13 17:24:50 +00:00
Wyatt Johnson d30ced8142 fix: sort by replies (#2351) 2019-06-08 02:10:26 +02:00
Wyatt Johnson ed4e5fa2a8 [CORL-399] Hide Non-Visible Comments (#2344)
* feat: added support for hiding non-visible comments

* fix: updated copy

* feat: refined style
2019-06-06 22:24:02 +00:00
Kiwi 2cff4572cf [CORL-394] Pre-Mod Link feature wouldn't capture suspect and other flags (#2342)
* fix: move detect premod links further down the moderation phases

* chore: version bump
2019-06-06 19:09:23 +00:00
Kiwi 8cfced464b chore: rename accept comment to approve comment (#2341) 2019-06-06 18:58:11 +00:00
Cristian Dean 39d7540987 [next] Add pt-BR translation (#2338)
* Add pt-BR translation

* Add pt-BR translation on server
2019-06-05 18:04:07 +02:00
Wyatt Johnson 1cf2f61bfb [CORL-388] Health Check (#2336)
* feat: added prelim health-check endpoint

* Update health.ts

* Update health.ts

* fix: lint
2019-05-31 23:20:00 +00:00
Wyatt Johnson 132ffdb2dc [next] Ancestors (#2333)
* feat: simplified ancestor management

* fix: removed old comment
2019-05-31 23:02:43 +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
Cristian Dean 7beab6419e [next] Add redis_options config (#2323)
* [next] Add redis_options config

* fix: updated docs, camelcased arg, used native merge

* fix: improved CI issues
2019-05-27 19:07:56 +00:00
Kiwi e7151806ea fix: nunjuck formatting error (#2322) 2019-05-23 01:57:09 +02:00
Kiwi dce60c5eab [CORL-349] Show banned user info (#2319)
* feat: stream banned state ui

* fix: button color

* fix: banned permissions

* test: add tests and hide edit

* fix: show reaction button and adapt snapshots

* fix: snapshot
2019-05-23 01:48:10 +02:00
Kiwi 8618ef0b96 [CORL-380] Duplicate Email Error (#2320)
* fix: throw duplicate email error during signup

* fix: Coral.Coral.* -> Coral.*

* fix: tests
2019-05-22 22:07:07 +02:00
Kiwi 6da97c57d7 [CORL-314] Rename to Coral (#2318)
* chore: rename talk to coral

* fix: lint and unit tests

* fix: snapshot
2019-05-22 21:32:24 +02:00
Wyatt Johnson 3ba10fd15f [CORL-224] Flag Details (#2293)
* feat: flag details

* fix: review

* feat: implement flag details in admin

* test: test flag details
2019-05-15 18:50:47 +02:00
Kiwi 898bc0de06 feat: allow explicitly disabling client routes (#2311) 2019-05-15 01:27:34 +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
Wyatt Johnson 9972253056 feat: removed pulling displayName from facebook/google (#2301) 2019-05-07 22:34:31 +00:00
Wyatt Johnson 2b878b224b fix: double logout will not result in failures (#2300) 2019-05-07 22:23:57 +00: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
Wyatt Johnson 205e6fcd08 [next] Reaction Sort (#2260)
* feat: stream sort description to use reaction conf

* feat: use full custom translation string for the sort label
2019-04-23 20:50:02 +00:00
Kiwi a92dcd6224 [next] Bugfixes (#2272)
* feat: suspending, banning, now propogation

* feat: new mutation api with hooks support

* [CORL-343] Center Spinner in Stream

* [CORL-344] Fix moderation card styling

* [CORL-338] Fix permalink reply bug

* [CORL-337] Fix community guidelines box width

* [CORL-341] Toggle reply form view when clicking on reply

* test: add tests

* [CORL-333] Fix bug: removing message box icon; [CORL-336] Fix bug: allow resetting custom css
2019-04-23 20:29:58 +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 b63c00f26f [next] Auth (#2257)
* feat: improved auth features + performance

* fix: auth check logic

* fix: tests
2019-04-15 19:46:55 +02: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 d217fedf9c [CORL-171] Comment Tags (#2248)
* feat: staff badge

* feat: added tag support on the server

* feat: use tags

* fix: server tests
2019-03-29 22:29:17 +00:00
Kiwi 618646e71c [CORL-138] Stories (#2242)
* feat: implement stories

* test: add feature test

* fix: id name

* fix: improve word breaks, column widths

* fix: snapshots

* feat: add min width to status dropdown button

* fix: polishing
2019-03-22 23:13:05 +00:00