Commit graph

292 commits

Author SHA1 Message Date
Ben Halpern
c0640ecbc6
Revert search placeholder text to just 'Search' (#4607) 2019-10-26 12:14:32 -04:00
Jacob Herrington
2447d6df9e Fix linter complaints in onboarding/components/IntroSlide.jsx (#4469)
* Fix linter complaints

* Update snapshots

* Fix whitespace
2019-10-25 10:20:58 -04:00
Ben Halpern
bb2eb72455
Fix issue where cover image shows up when it shouldn't (#4583) 2019-10-24 18:23:17 -04:00
Nick Taylor
68e94f524b Refactored to use a common <OrganizationPicker /> component (#4470)
* Refactored to use a common <OrganizationPicker /> component.

* Small refactor to organization <option />s.

* Renamed files from OrgSettings* to OrganizationPicker*

* Brought orgsettings inline to article form.

* Brought orgsettings inline to listings form.

* Rename onBlur to onToggle for org picker instances. Ooops.

* Updated <OrganizationPicker /> test.
2019-10-24 17:27:16 -04:00
Wouter van Marrum
4c15d2e289 Update search-bar's placeholder (#4524) [ci skip] 2019-10-24 16:24:37 -04:00
Andy Zhao
73caa9a864 New Feature: Block Users (#4411)
* Prevent need for eager loading

* Add initial implementation of user block

* Remove debugger oops

* Add index and foreign keys for user_block table

* Use private method instead of exists

* Move channel handling logic to service object

* Update styling a bit

* Use profileDropdown file for future proofing

* Remove commented out code

* Render json: { result } for all endpoints

* Add statuses for sad paths

* Add better sad path handling in the JS

* Remove accidentally committed spec file

* Don't wait for DOM to load block button

* Use equality for accuracy in slug query

* Add status code for unauthorized requests

* Add missing comma sigh
2019-10-23 17:14:28 -04:00
José Chaves Neto
9e6c64fa83 Fix eslint errors in listings/elements/title.jsx (#4496) [ci skip] 2019-10-23 14:21:47 -04:00
Hoang
7cd279f3e1 Fix article submission clone bug (#4505) 2019-10-21 15:40:29 -04:00
Tamas Fodor
0d2506f9ef Fix eslint issues in article-form's jsx files (#4217)
* fix eslint issues in article-form's jsx files

* Use e.key instead of deprecated e.keyCode

* Put back whitespace but in html format

* use re-usable SetupImageButton comp, use window.confirm, put back console.log temporarily

* import deep

* fix CoverImage className prop issue

* update jest snap files

* remove no-restricted-globals from eslint-disable-next-line
2019-10-19 17:09:06 -04:00
RakChamp25
5028e1a670 Refactor: component Tags.jsx (#4448)
* Refactor: component Tags.jsx

* Revamp Changes lint fix.

* Fixes method binding.

* Destructure Fix.

* Lint fix

* Button Lint Fix.

* Event Key Hash Change.
2019-10-19 17:06:48 -04:00
Jacob Herrington
4f0c1bd4b4 Remove unused import (#4484) [ci skip] 2019-10-17 19:02:36 -04:00
RajaSK05
6b83cd0981 Refactor to component model (#4478) 2019-10-17 12:56:33 -04:00
Eddie Hale
f7eba319b5 Fixing eslint errors and warnings under /app/javascript/packs (#4465)
Changes:
 - Refactored articleForm.jsx by moving loadForm() before document.ready.then()
 - Removed 'function' in .then() and modified to .then(() => {
 - Removed unused function 'isUserSignedIn' in Onboarding.jsx

See: #2470
2019-10-17 09:29:40 -04:00
Jacob Herrington
d339bebca0 Remove unused function (#4467) 2019-10-17 08:07:49 -04:00
RakChamp25
00f6f45334 Refactor readingList.jsx (#4388) [ci skip] 2019-10-16 10:40:01 -04:00
Karin Hendrikse
0ff237cf20 Add specs for errors, mainimage, and notice (#4453) [ci skip] 2019-10-15 16:46:25 -04:00
Emilia Muresan
daff71321f Fix lints in app/javascript/src/components/ (#4261) [ci skip] 2019-10-15 16:11:18 -04:00
Jacob Herrington
7152f07867 Remove unused import and unused props (#4452) 2019-10-15 14:12:40 -04:00
Karin Hendrikse
0575648407 Fix lints for sidebarwidget and sidebaruser (#4418) [ci skip] 2019-10-14 14:43:26 -04:00
Hoang Vo
293ba5231b Fix eslint issues in app/javascript/listings (#4253)
* Fix some eslint and a11y issues

* Add a11y fixed to snapshot

* Fix missing whitespace that cause test fail

* Fix code duplicate

* Config eslint to allows the label as a sibling

* Use 'error' instead of 2 in eslintrc

* Correct propTypes in SingleListing

* Add missing id prop for select

* Add space between two functions

* onKeyPress only register Enter

* Allow space key also to activate action

* Use a common function for three event handlers
2019-10-14 14:23:20 -04:00
Jacob Herrington
742d50f524 Remove unused onboarding files (#4254)
* Remove commented code

* Format onboarding SCSS

* Remove old onboarding files

* Remove tests for deleted React components

* Remove outdated onboarding stories
2019-10-14 09:35:37 -04:00
Karin Hendrikse
7ab10e709a Test: add test for ItemListItem and ItemListItemArchiveButton (#4391) 2019-10-14 08:54:07 -04:00
RakChamp25
e690348824 Refactor: moreConfig.jsx (#4352)
* Refactor: moreConfig.jsx

* Revamp Changes

* Revamp TextField Proptypes

* Fix Text Field and revamp changes

* Removed trailing spaces
2019-10-14 08:44:45 -04:00
samuel-glitch
ea64c42d3a Remove unused import (#4362) 2019-10-11 08:43:50 -04:00
Ben Halpern
0a60faec8c
Add tag rules to article v2 editor (#4339)
* Add tag rules to article v2 editor

* Add bottom phrase to tag dropdown

* Remove console logs

* Remove empty space in css

* Remove commented code and clean up css

* Add type='button' for a11y
2019-10-10 20:19:12 -04:00
RakChamp25
e00e7c3412 Refactor : BodyPreview.JSX (#4348) 2019-10-10 13:21:53 -04:00
Leonid Trofymchuk
5e347a6f94 Simplify key codes expression in Tags component (#4248)
* Simplifying this key codes expression in Tags component

* Refactor KeyboardEvent keyCode to key

* Simplify cyrillic letter regexp

* Wrap condition in 2 lines
2019-10-09 16:50:48 -04:00
Ben Halpern
3db3f6fdc2
Fix gotchas with color preview and some style adjustments and add documentation (#4322) 2019-10-08 21:32:31 -04:00
Saurabh Daware
81e3f65965 Add preview for color changes in profile edit (#4212) 2019-10-08 14:52:07 -04:00
Victoria Fluharty
e111951ceb fixes bug in tag search feature (#4222)
* fixes bug in tag search feature
now allows user to type in full name of tag and it does not disappear
makes other changes to pass eslint failing tests
moves methods around according to eslint tests
makes use of prevState callback method due to eslint tests

* updates handleKeyDown method
removes complex logical expression comparison from !== to !=
changes made due to failing task in pull request

* removes commented out code that I added to test code
updates logic to fix searchResults
removes .filter()

* adds comments to fixed code for clarification
2019-10-08 09:40:53 -04:00
Karin Hendrikse
a9adeee11f [SPEC] Add tests for sidebarUser component (#4301) [ci skip] 2019-10-07 16:01:59 -04:00
Karin Hendrikse
14c9adefd5 Test: add test for opening help window on articleForm (#4237) 2019-10-07 08:49:44 -04:00
Nick Taylor
30cc799240 Mini refactor to make var names clearer. (#4257) 2019-10-06 17:04:14 -04:00
Attila Blascsak
66faaccdd8 Fix lints in notificationSubscriptionHander.js (#4172) [ci skip] 2019-10-04 13:08:59 -04:00
Aswathprabhu
13ac7b43dd Remove code dupes in personalInfoForm (#4156) [ci skip] 2019-10-03 11:21:18 -04:00
Aswathprabhu
eeb6cbd763 Refactoring userDetails.jsx removes user config duplication (#4161) 2019-10-01 17:01:05 -04:00
Aswathprabhu
65394cb8cc Refactoring articleForm.jsx removes code duplication (#4159) 2019-10-01 12:05:57 -04:00
Aswathprabhu
cb84a7c63f Refactoring view.jsx removes code duplication (#4154)
* Refactoring view.jsx removes code duplication

* Updates view jsx test snapshots
2019-10-01 08:41:46 -04:00
Laura Chan
427a8dd45e Fix colorPicker's lints (#4109) [ci skip] 2019-09-27 09:43:51 -04:00
John Curcio
64c9b36a40 Simplify notification un-subscription process (#3870) 2019-09-25 16:52:59 -04:00
Aswathprabhu
144d3a0d6f Refactor userDetails's buttons (#4107) [ci skip]
Remove code duplication
2019-09-25 15:09:20 -04:00
Mario See
3e23b3d568 Limit listing's permitted markdown tags (#3882) 2019-09-25 12:43:29 -04:00
rhymes
c8abbe9d60 Pro: memberships (#3461)
* Add ProMembership model

* Implement ProMembershipsController#create

* Implement basic ProMembershipsController#show

* Add ProMembership to ledger

* Populate user history after pro subscription is created

* Add fields for expiration notifications

* Add ProMemberships::ExpirationNotifier to notify users of expiring memberships

* Add tasks for recurring jobs to notify users of expiration

* Add auto_recharge column to ProMembership

* Add ProMemberships::Biller (incomplete)

* Fix specs

* Add ProMembership to Administrate

* Fix spec

* Add has_enough_credits? to User and Organization

* Add Payments::Customer class

* Finish ProMembership::Biller functionality

* Fix ProMemberships::Creator check for credits

* Disable destroy actions for ProMembershipsController

* Correctly authenticate ProMembershipsController actions

* Make sure only pro user's history can be indexed

* Add ProMembershipsController#update action for auto recharge

* Use regular AR to save new credits and add touch to the purchaser

* Clarify Pro membership create policy

* Display information about an existing pro membership

* Add UI to show page

* Add system test for Pro membership creation

* Implement edit membership

* Make sure users with pro memberships can access history and dashboard pro

* Fix padding issue

* Show a different text for a user that has credits but not enough for Pro

* Move Pro Membership functionality inside settings

* Update Pro Membership link in email notifications

* Bust all relevant caches

* Add the Pro checkmark around the website

* Use Users::ResaveArticlesJob instead of delay

* Add/remove user from pro-members chat channel

* Use the appropriate Pro checkmark

* Remove unfinished pro elements

* Remove checkmark JS
2019-09-24 10:38:54 -07:00
Jacob Herrington
6ddac027e8 Refactor intro slide component (#3933) 2019-09-23 14:08:58 -04:00
Jacob Herrington
7198a72953 Refactor tags components (#3895) [ci skip] 2019-09-20 10:18:44 -04:00
Ben Halpern
705da8fbde
Switch to CDN for iframe resizer (#4053) 2019-09-17 16:42:46 -07:00
Ben Halpern
1e8954e581
Add iframe resizer content lib (#4019) 2019-09-12 20:14:54 -07:00
Dmitro Pochapsky
d0f615f3af Fix chat.jsx lints (#3889) 2019-09-12 09:30:59 -04:00
rhymes
61494d2343 Images uploads: fix UI for multiple images (#3958)
* Fix spacing of images button in editor v1

* Fix wording for multiple images in editor

* Update JS tests
2019-09-07 10:57:14 -04:00
Akshay Mahajan
c5577f68a3 Reading list: set default reading time to 1 minute (#3927)
* fixes 0 min reading time in reading list by setting the default reading time to 1 min

* Updated PropTypes for article_reading_time & reading_time to number.isRequired. Updated the relevant tests.
2019-09-03 15:50:40 -04:00