Commit Graph

684 Commits

Author SHA1 Message Date
Tessa Thornton 7809cd3d68 [CORL-476] Add badges to user from SSO token (#2470)
* fix: bug in lookup not checking object properly before accessing

* fix: Recursive types not handling optional arrays

* add user badges component

* create user badges from sso token

* update badges type

* revert src/core/client/embed/index.html

* remove duplicated line

* add user badges component

* create user badges from sso token

* revert src/core/client/embed/index.html

* remove duplicated line

* fix types

* fix tests and snaps

* add user badges to user drawer

* update snaps

* update readme

* [CORL-476] add user role from SSO token (#2475)

* add role from token

* use joi to validate role values

Co-Authored-By: Wyatt Johnson <wyattjoh@gmail.com>

* simplify sso.role validation

* add test for invalid role in sso token
2019-08-20 13:15:59 -04:00
Tessa Thornton add5224338 [CORL-504] Configure reaction language (#2490)
* add reaction config to settings

* fix reaction preview styles

* update snaps and fixtures

* add i18n strings

* update spec

* ensure dynamic value shows in reaction config preview
2019-08-20 13:03:25 -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
Tessa Thornton 3baf4e96f5 prevent improper sort menu styling on ios (#2468) 2019-08-20 11:37:09 -04:00
Wyatt Johnson 8d91bd7dd1 fix: corrected invalid copy (#2479) 2019-08-19 12:57:03 -04:00
Vinh d400c1518c fix: temporary use min-height for single comment view to not cutoff report dialog (#2476) 2019-08-19 12:34:39 -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
Vinh 635e740fc0 [next] Fix lookup and recursive types (#2472)
* fix: bug in lookup not checking object properly before accessing

* fix: Recursive types not handling optional arrays
2019-08-15 01:07:49 +07:00
Tessa Thornton c37ee12e57 Bugfix/userdrawer changestatus (#2469)
* fix date formatting breaking user details popvoer

* update mutation return fields for user status changes
2019-08-14 08:32:03 -04:00
Tessa Thornton abb793b16a fix date formatting breaking user details popvoer (#2465) 2019-08-12 19:39:55 -04:00
Wyatt Johnson aa873559d0 fix: fixed forgot password button (#2467) 2019-08-12 19:32:50 -04:00
Nick Funk 0eddf9619f Center sign in popovers over the browser window so they are easily visible (#2457)
* Center sign in popovers in the browser window so they are always visible

* Set popover window feature by default using interfaced parameters

* Update snapshots to account for feature parameters on popup windows

* Lowercase the bar in menubar for Popup so it matches window api

* fix: externalized feature reconciliation
2019-08-12 17:03:09 -04:00
Wyatt Johnson 8d78677154 [CORL-219] Common Tweaks (#2460)
* fix: i18n fixes

* fix: figma tweaks

* fix: tweaked date manipulation logic

* fix: linting

* fix: linting

* fix: tests
2019-08-12 16:44:35 -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
Tessa Thornton c245e9ba74 [CORL-219] Change username (#2452)
* add types for username updates

* add update username methods

* add types and resolvers for username history

* connect frontend to username history and change history mutation

* style update username box

* show username changes in user history drawer

* new users have 1 username entry

* add translations for username change

* allow new users to change username once

* add tests for change username ui

* send email to users after username change

* add types to tests

* treat status.username.history as mandatory

* remove hardcoded 14 day username update frequency

* use framework translation directives

* add account history action component

* clean up strings

* fix imports in change username container

* fix templates

* rename update username methods

* fix nunjucks formatting

* add warning if user missing email

* add fixme

* fix spacing
2019-08-12 10:45:49 -04: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 11fc3697ed fix: addressed chrome browser issues (#2453) 2019-08-09 20:24:54 +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
Tessa Thornton ff964b54a3 [CORL-97] Add user status details popover to user drawer (#2431)
* show tooltip for user status details

* localize strings

* fix merge conflict

* fix date formatting in user details popover

* update snapshot

* fix rebase
2019-08-07 16:22:47 -04: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
Vinh b41ddbc22f [next] Add new typography design tokens (#2451)
* feat: add new typography design tokens

* fix: revert renaming fontFamilySansSerif
2019-08-07 14:09:07 -04:00
Kim Gardner c979dfd7d5 [CORL-487] Update Spanish translations for v5 (#2444)
* WIP add missing Spanish translations

* Add more stream translations

* More stream translations

* Add rest of translations for stream

* fix: accessing undefined message
2019-08-07 02:58:59 +07:00
Tessa Thornton 3694794b01 [CORL-458] open user drawer when flagger username clicked (#2436)
* open user drawer when flagger useranme clicked

* fix comment author click

* update style of flagger button

* update snapshots

* chore: use round-corners design token
2019-08-05 18:02:13 +07:00
Tessa Thornton 5df2de6afc [CORL-156] Manage user suspension status (#2419)
* wire up suspension modal

* show user suspended callout on stream

* prevent comment actions for suspended users

* set default to 3 hour suspension

* add message field to suspension

* allow custom message for suspension

* show suspend success modal

* fix type errors

* remove unused code

* update styles

* fix fixture for streams

* add suspension ui tests

* fix types

* remove warnings?

* remove snapshot

* fix merge conflicts

* allow custom email message when banning users

* fix typo

* correct message type

* use final-form in suspend modal

* refactor suspend modal to use final-form

* refactor ban modal to use final-form

* refactor userStatusChangeContainer to use useCallback

* feat: improve translated form

* fix: addressed issue caused by i18n refactor

* update getMessage to accept arguments, remove format method

* translate suspend info

* change hour format

* make message a mandatory input for suspend and ban user

* fix types in user table

* Revert "fix types in user table"

This reverts commit d396e90b88bb1bd354c5cdbdd72b6d8f1ab72929.

* fix types for user table

* fix: small review tweaks
2019-08-02 21:16:21 +00: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
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
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
Wyatt Johnson 7b7cec5258 feat: switch to comments tab if on featured (#2437) 2019-07-30 18:48:52 -04: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
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 b1732f8a00 feat: initial implementation (#2409) 2019-07-23 17:20:40 +00: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
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 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 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