Commit Graph

1079 Commits

Author SHA1 Message Date
Wyatt Johnson 4e548e8fbf fix: addresses issue with creating stories (#2442) 2019-08-02 17:02:47 -04:00
Tessa Thornton fdc6afec42 prevent zooming on filter select (#2434) 2019-08-02 16:55:13 -04:00
Wyatt Johnson 836a2267bf [CORL-445] Change Password (#2426)
* fix: reversed `new-password` autocomplete option

* feat: initial implementation

* fix: localization and testing

* fix: updated snapshot
2019-08-01 22:08:14 +00:00
Wyatt Johnson 290ceee8e9 chore: form standardization (#2425) 2019-08-01 21:59:05 +00:00
Wyatt Johnson 1c5c82286e [CORL-474] Harmonize SSO User ID's (#2440)
* feat: harmonized user id's

* fix: doctoc
2019-08-01 17:30:33 -04:00
Tessa Thornton 3d9c94d36a [CORL-456] add empty state for comment history (#2432)
* add empty state for comment history

* localize strings

* fix string casing
2019-08-01 17:18:12 -04:00
Wyatt Johnson 3a8e4e6429 [next] User Creation Improvements (#2438)
* feat: added user insert improvements

* fix: added redirect filter support

* fix: addressed some bugs with sign in
v5.0.0-beta.5
2019-07-31 13:01:10 -04:00
Tessa Thornton 7a8a9f425a fix dismiss button being cut off in pre-mod notice (#2433) 2019-07-31 11:12:25 -04:00
Cristian Dean b108faed5e Fix logout action when no local authentication provider (#2435) 2019-07-30 23:39:30 +00:00
Wyatt Johnson 7b7cec5258 feat: switch to comments tab if on featured (#2437) 2019-07-30 18:48:52 -04:00
Wyatt Johnson 8e130aa5d4 fix: fixed bug with token generation and verification (#2427) 2019-07-29 23:01:57 +00:00
Nick Funk c069bbe923 [CORL-234] Show user's account history in the user drawer (#2415)
* Create unit tests around the user drawer

CORL-443

* Update comment fixture generation to include reason metadata, action counts

CORL-443

* Add a user status drop down to the user history drawer

CORL-227

* Refactor UserHistoryDrawer tabs and queries for consistency

CORL-234

* Create and empty account history tab in the user drawer

CORL-234

* Create preliminary account history tab queries

Massages the suspension and ban history together into a usable format.
Sorts the ban and suspension history by date, ascending.
Ready to process the history data into components to make up the future
table records.

CORL-234

* Style the user drawer account history records into table format

CORL-234

* Fix typo in admin localization around banned text

CORL-234

* Update suspension record to support templated insertion of timespan

CORL-234

* Create localized parsing of suspension times for account history

CORL-234

* Handle errors when loading the user drawer account history

CORL-234

* Adjust margins of tab content relative to the tab controls

CORL-234

* Extract suspension record time calculations out of component

CORL-234

* Handle when a user has no account history

CORL-234

* Adjust line height to prevent cutting off usernames in community table

CORL-234

* Override hover behaviour for user drawer account history rows

CORL-234

* Adjust default column widths in user drawer - account history

CORL-234

* Use react node type instead of any for component substitution

CORL-234

* Rename TabType to UserTabs

CORL-234

* Use nullable type instead of strict typing using OR's

CORL-234

* Set UserStatusChangeContainer fullWidth default to false

CORL-234

* Combine timed suspension localization into one Localized element

CORL-234

* fix: useMemo on history bar

* Rename UserHistoryDrawerAccountHistory to UserDrawerAccountHistory

Cleans up the agglutination's on these file names.

Probably means we should rename UserHistoryDrawer... to
UserDrawer... everywhere. Will get to that later.

CORL-234

* Reorder imports to match alphabetization preferences

CORL-234

* feat: simplication to action table

* feat: visual tweaks

* chore: added notes for deprecating
2019-07-29 22:54:53 +00:00
Nick Funk 06a3e4e0a7 User drawer details tweaks (#2423)
* Add alternative text titles to the user drawer icons

* Tweak padding on user status popover

* Add default alt text for user drawer icons
2019-07-29 22:45:12 +00: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
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 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 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
Cristian Dean fc464bd7c9 Fix pt-BR translations (#2410) 2019-07-23 00:27:49 +01:00
Nick Funk eabf1b28a2 [CORL-227] Add user status actions to the user history drawer (#2407)
* Create unit tests around the user drawer

CORL-443

* Update comment fixture generation to include reason metadata, action counts

CORL-443

* Move testRenderer construction outside of act() operations

CORL-443

* Add a user status drop down to the user history drawer

CORL-227

* Update snapshots to handle status change dropdown full width styling

In other areas we want to override the full width: 100% styling of the
status change drop down. By default, we turn it on. This added a class
to the element that needs to be updated in the snapshots.

CORL-227

* Ignore the user history drawer tests for the time being

Getting an Invariant Violation: Unable to find node on an unmounted component.
when the UserStatusChangeContainer is present on the UserHistoryDrawerQuery.

CORL-227

* Align the user drawer status label and button text

CORL-227

* Update community tests to handle removal of dot icon from user status

CORL-227
2019-07-22 10:57:33 -06:00
Wyatt Johnson 0c97ba0f4a [CORL-450] Embed Code copy (#2411)
* fix: adjusted copy in embed code

* fix: adjusted translation message API

* fix: fixed tests
2019-07-19 15:55:29 +00:00
Nick Funk d73bdc7eec [CORL-443] Add user drawer to the community section of the moderation area (#2401)
* Move the user history drawer into shared location that all admin routes access

CORL-443

* Move the moderate card to the shared components for admin

CORL-443

* Add a user drawer to the community area of the admin section

CORL-443

* Touch up missing tabs in UserRow.css

CORL-443

* Create unit tests around the user drawer

CORL-443

* Move toxicity label to new shared component location to fix rebase

CORL-443

* Update comment fixture generation to include reason metadata, action counts

CORL-443

* Rename userDrawerID to userDrawerUserID

CORL-443

* Clean up imports on user drawer unit tests

CORL-443

* Add coral-test to the jest config paths

CORL-443

* Add todo around creating predictable date times for test fixtures

CORL-443

* Move testRenderer construction outside of act() operations

CORL-443
2019-07-16 14:53:55 -06:00
Wyatt Johnson bdb57aef7f feat: default to the featured tab when available (#2402) 2019-07-16 16:32:33 +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
v5.0.0-beta.4
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 9a191b44ba [CORL-276] Sitewide Pre-Moderation (#2392)
* feat: initial implementation

* chore: docs update

* fix: lint

* fix: naming
2019-07-05 23:18: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
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 633998307d Revert "[CORL-382] Allow moderators to ban a commenter from the comment stream (#2378)" (#2384)
This reverts commit e77103d872.
2019-07-02 21:59:18 +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
Nick Funk e77103d872 [CORL-382] Allow moderators to ban a commenter from the comment stream (#2378)
* Add a ban user action to the stream moderation drop down

CORL-382

* Show banned stated for user in stream moderation drop down

If the user is actively banned, the ban user option will be
disabled and show a status of "banned".

CORL-382

* Create utility for generating random stories, comments, and users

CORL-382

* Add ban and suspension values to baseUser in fixtures

CORL-382

* Updated banned.spec.tsx to use new test utilities for generating fixture data

CORL-382

* Prevent users from being able to ban themselves in the moderation dropdown

CORL-382

* Kill optimistic response errors for comment mutations

Set the author.status.current to an empty array so it stops
complaining about it being unused.

CORL-382

* Rename util in tests to helpers/fixture.ts

CORL-382

* Remove unused import from CreateCommentReplyMutation.ts

CORL-382

* Put back the optimistic ban responses into comment mutations

The warnings spewing out during tests are false, for further
detail please see: https://github.com/facebook/relay/pull/2760

CORL-382

* Denormalize generated stories and comments

CORL-382

* Clean up import ordering in ModerationActionsContainer.tsx

CORL-382

* Inject appropriate scoped items into callbacks for moderation dropdown

CORL-382

* Set optimistic response author status from known viewer status

CORL-382
2019-06-28 23:10:09 +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
Wyatt Johnson 3576b6a943 chore: bumped version (#2375) v5.0.0-beta.3 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
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
Vinh 4ab8b09be1 [next] byText search should look into React Fragments (#2372)
* fix: byText search should look into React fragments

* chore: better comments

* chore: typo
2019-06-19 21:19:03 +02:00
Cristian Dean 05f9daec2e Update mongodb and mongodb-core libs (#2366) 2019-06-19 16:06:38 +00:00
Nick Funk 972f4b702d [CORL-409] Add tests around ignore button visibility on user popover cards (#2364)
* Add tests around ignore button visibility on user popover cards

Staff member -> ignore should not be present
Regular commenter -> ignore button should be present

CORL-409

* chore: simplify fixture

* chore: normalize naming in test and use type instead of any
2019-06-14 21:14:41 +02:00
Vinh 3cd7bf655e chore: remove obsolete test code (#2363) 2019-06-14 17:17:30 +00: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
Wyatt Johnson f8cf34e34d feat: added email confirmation UI (#2358) 2019-06-13 23:37:51 +02:00
Diego Chavão 5311681333 [next] Fix skew tolerance to token expiration. (#2356) 2019-06-13 20:30:09 +02:00