Commit graph

2905 commits

Author SHA1 Message Date
Mike Healy
1e606b4298 Fix radio button labels on Report Abuse page (#4119) 2019-09-29 19:50:03 -04:00
Jake Wesorick
01f841923e Fix images in chat overflowing outside chat window. (#4127) 2019-09-29 19:13:13 -04:00
rhymes
50cdfb0a96 Do not cache articles notification time indication (#4122)
Fragment caching does not support an explicit expiration date for simplicitly, which means that cached resources are tied to the update datetime of the model.

In this case unfortunately this is not sufficient: a cached time that potentially never gets expired can stale quickly when applied to a time sensitive item like a notification.

Since the "time ago" computation is not particularly heavy and notifications are paginated, I ended up removing that part from the cache altogether.

As a byproduct I created two new separate cache keys for the article notification, one of each section surrounding the time.
2019-09-29 11:39:03 -04:00
rhymes
8a5fb23335 Use server side comments for templates (#4123) 2019-09-27 10:10:30 -04:00
Laura Chan
427a8dd45e Fix colorPicker's lints (#4109) [ci skip] 2019-09-27 09:43:51 -04:00
Ben Halpern
aa9f03740e
Change stackbit integrations page details (#4118)
* Change stackbit integrations page details

* Fix wrongly commented out code
2019-09-26 08:45:19 -04:00
Ben Halpern
8d40f54a31
Add initial functionality for Stackbit on integrations settings tab (#4113)
* Add initial functionality for Stackbit on integrations settings tab

* Add test for stackbit integration

* Adjust test

* switch check from grants to tokens
2019-09-26 07:29:28 -04:00
Anna Buianova
fd1b9868a2 Destroy webhook endpoints when user revokes oaurh app access (#4099)
* Destroy webhook endpoints when user revokes oaurh app access

* Make webhooks destroy on revoke asynchronous
2019-09-26 06:23:38 -04:00
Mac Siri
b7e254ac01
Fix biller spec's zonebie issue (#4112) [ci skip] 2019-09-25 19:00:53 -04:00
John Curcio
64c9b36a40 Simplify notification un-subscription process (#3870) 2019-09-25 16:52:59 -04:00
Andy Zhao
3b0f6f2834 Refactor remove_all and remove_each notifications and fix orphaned notifications (#3570) 2019-09-25 15:31:56 -04:00
Aswathprabhu
144d3a0d6f Refactor userDetails's buttons (#4107) [ci skip]
Remove code duplication
2019-09-25 15:09:20 -04:00
Jess Lee
bcd498d990 add styling for oauth page (#4108) 2019-09-25 12:00:45 -07:00
Mario See
3e23b3d568 Limit listing's permitted markdown tags (#3882) 2019-09-25 12:43:29 -04:00
dependabot-preview[bot]
817cef3638 Bump codemirror from 5.48.4 to 5.49.0 (#4090) [ci skip]
Bumps [codemirror](https://github.com/codemirror/CodeMirror) from 5.48.4 to 5.49.0.
- [Release notes](https://github.com/codemirror/CodeMirror/releases)
- [Changelog](https://github.com/codemirror/CodeMirror/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codemirror/CodeMirror/compare/5.48.4...5.49.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-25 10:24:11 -04:00
dependabot-preview[bot]
75137ef3ec Bump twilio-video from 1.19.1 to 1.19.2 (#4093) [ci skip]
Bumps [twilio-video](https://github.com/twilio/twilio-video.js) from 1.19.1 to 1.19.2.
- [Release notes](https://github.com/twilio/twilio-video.js/releases)
- [Changelog](https://github.com/twilio/twilio-video.js/blob/1.19.2/CHANGELOG.md)
- [Commits](https://github.com/twilio/twilio-video.js/compare/1.19.1...1.19.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-25 10:22:51 -04:00
Ben Halpern
8943467e91
Cache pro membership (#4102) 2019-09-24 11:26:35 -07:00
Anna Buianova
9778ada44a Doorkeeper default scope (#4066)
* Start with the doorkeeper scopes

* Added read_articles scope

* Proper doorkeeper authorization for the API articles#me
2019-09-24 11:11:12 -07: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
cyrillefr
70631ad2f7 Listings creation and update API (#4014)
* Listings creation and update API

  - new listings controller
  - refactored code to share core functionnality between api and web controllers
  - code in common in classified listing concerns
  - added tests for index/create/update
  - json output as views
  - updated a factory

* Listings creation and update API: code update

  - refactored json calls
  - added test cases
  - added pagination for list of listings
  - refactored jbuilder files
  - typos

* Listings creation and update API: code update

  - tags and tag_list in controller
  - changed view to display both
  - refactored and added test

* Listings creation and update API: code update

  - small change to resolve conflit

* Listings creation and update API: code update

  - added test case
  - deleted unneeded test case
2019-09-24 07:03:52 -07:00
dependabot-preview[bot]
f172856ec1 Bump twilio-ruby from 5.26.0 to 5.27.0 (#4086) [ci skip]
Bumps [twilio-ruby](https://github.com/twilio/twilio-ruby) from 5.26.0 to 5.27.0.
- [Release notes](https://github.com/twilio/twilio-ruby/releases)
- [Changelog](https://github.com/twilio/twilio-ruby/blob/master/CHANGES.md)
- [Commits](https://github.com/twilio/twilio-ruby/compare/5.26.0...5.27.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-23 14:12:34 -04:00
Jacob Herrington
6ddac027e8 Refactor intro slide component (#3933) 2019-09-23 14:08:58 -04:00
dependabot-preview[bot]
29191294da Bump airbrake from 9.4.3 to 9.4.4 (#4082) [ci skip]
Bumps [airbrake](https://github.com/airbrake/airbrake) from 9.4.3 to 9.4.4.
- [Release notes](https://github.com/airbrake/airbrake/releases)
- [Changelog](https://github.com/airbrake/airbrake/blob/master/CHANGELOG.md)
- [Commits](https://github.com/airbrake/airbrake/compare/v9.4.3...v9.4.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-23 13:21:51 -04:00
dependabot-preview[bot]
50f405eb3a Bump httparty from 0.17.0 to 0.17.1 (#4087) [ci skip]
Bumps [httparty](https://github.com/jnunemaker/httparty) from 0.17.0 to 0.17.1.
- [Release notes](https://github.com/jnunemaker/httparty/releases)
- [Changelog](https://github.com/jnunemaker/httparty/blob/master/Changelog.md)
- [Commits](https://github.com/jnunemaker/httparty/compare/v0.17.0...v0.17.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-23 13:18:23 -04:00
dependabot-preview[bot]
737fa9f26a Bump lint-staged from 9.2.5 to 9.3.0 (#4089) [ci skip]
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 9.2.5 to 9.3.0.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v9.2.5...v9.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-23 13:04:47 -04:00
dependabot-preview[bot]
6aa4471088 Bump webmock from 3.7.2 to 3.7.5 (#4091) [ci skip]
Bumps [webmock](https://github.com/bblimke/webmock) from 3.7.2 to 3.7.5.
- [Release notes](https://github.com/bblimke/webmock/releases)
- [Changelog](https://github.com/bblimke/webmock/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bblimke/webmock/compare/v3.7.2...v3.7.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-23 13:02:29 -04:00
dependabot-preview[bot]
ce7fab306b Bump simplecov from 0.17.0 to 0.17.1 (#4083) [ci skip]
Bumps [simplecov](https://github.com/colszowka/simplecov) from 0.17.0 to 0.17.1.
- [Release notes](https://github.com/colszowka/simplecov/releases)
- [Changelog](https://github.com/colszowka/simplecov/blob/master/CHANGELOG.md)
- [Commits](https://github.com/colszowka/simplecov/compare/v0.17.0...v0.17.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-23 12:48:17 -04:00
dependabot-preview[bot]
12a339d925 Bump faker from 2.3.0 to 2.4.0 (#4085) [ci skip]
Bumps [faker](https://github.com/faker-ruby/faker) from 2.3.0 to 2.4.0.
- [Release notes](https://github.com/faker-ruby/faker/releases)
- [Changelog](https://github.com/faker-ruby/faker/blob/master/CHANGELOG.md)
- [Commits](https://github.com/faker-ruby/faker/compare/v2.3.0...v2.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-23 12:47:31 -04:00
kay nguyen
b0b23b385a fixed Load More button not readable in night theme (#4077) 2019-09-20 13:41:20 -07:00
Mac Siri
465a676d75 Adjust BufferUpdatesController's authorization (#4070)
* Add back validation and add test

* Move article_admin?

* Adjust Buffer policy

* Create buffer_update_policy_spec
2019-09-20 11:50:34 -07:00
Andrew Siegman
04b7417e27 Fix opacity issue on low quality comments (#4076) [ci skip] 2019-09-20 13:16:24 -04:00
rhymes
de6129b29c Replace ^ and $ with \A and \z in Ruby regexps (#4072) 2019-09-20 10:28:34 -04:00
John Curcio
c5cb61f932 Move Reaction.create delay calls to ActiveJob (#3136) (#4022) 2019-09-20 10:19:07 -04:00
Jacob Herrington
7198a72953 Refactor tags components (#3895) [ci skip] 2019-09-20 10:18:44 -04:00
rhymes
e6100dd400 Fix tags format in Article create API (#4075) [ci skip] 2019-09-20 10:14:41 -04:00
Ben Halpern
fd017a0ba2
Add climate strike widget (#4071) 2019-09-19 18:01:53 -07:00
Ben Halpern
b1b408e61c
Add more variation to home feed (#4069)
* Add more variance to home feed

* Fix array typo

* Fix up watercooler spec

* Fix up blackbox spec
2019-09-19 12:58:11 -07:00
Jess Lee
ff135c7839 Give interns access to internal articles (#4016)
* add intern role and update policies

* update admin policy spec for rubocop

* add article poolicy spec

* fix spec

* switch to scoped admin role

* Finalize single resource admin

* Adjust buffer permissions
2019-09-19 11:35:49 -07:00
John Curcio
4eabc652a2 Add no-readme option to GitHub tag (#4054) 2019-09-19 13:16:19 -04:00
Mac Siri
6fa8dfd7aa Ignore page_views (#4063) 2019-09-19 09:06:14 -07:00
Jacob Herrington
44b014ec6b Change reply notification background color (#4067) 2019-09-19 09:05:45 -07:00
Anna Buianova
c07eb8d9cd Define Doorkeeper::Application association (#4065) [ci skip] 2019-09-19 10:28:55 -04:00
Mac Siri
e6e57c8835 Fix mention's inconsistent hyperlink (#4051)
* Upgrade mention parsing logic

* Avoid hardcoded link in spec
2019-09-18 14:15:06 -07:00
Anna Buianova
0a16bf934a Added association between webhook_endpoints and oauth apps (#4060)
* Added association between webhook_endpoints and oauth apps

* Limit webhooks access by oauth_app_id when authorized by doorkeeper

* Use rails route helpers in webhooks api test
2019-09-18 13:25:40 -07:00
Jacob Herrington
ef88b1e341 Fix delete container alignment (#4062)
* Center delete confirmation text

* Format CSS
2019-09-18 13:22:58 -07:00
rhymes
3194c3bacd Generate HTTPS urls (#4059) 2019-09-18 10:42:50 -07:00
rhymes
02b5bb7d78 API: add doc for webhooks index (#4056)
* Remove updated_at and use the same format for dates

* Add API docs for API /webhooks index
2019-09-18 09:48:33 -07:00
Ben Halpern
705da8fbde
Switch to CDN for iframe resizer (#4053) 2019-09-17 16:42:46 -07:00
Oleksii Filonenko
8d9bad372b Move index.delay.delete_object calls to ActiveJob (#4028)
* Move index.delay.delete_object calls to ActiveJob

* Rename {Algolia,Search}::RemoveFromIndexJob

* Update queue_as for Search::RemoveFromIndexJob
2019-09-17 14:10:38 -07:00
Anna Buianova
ce93c436a7 Implement API endpoint for user's webhooks (#4013) 2019-09-17 13:24:44 -04:00