Commit graph

2838 commits

Author SHA1 Message Date
Mac Siri
5fba3bd4b9
Improve test speed (#3957) [ci skip] 2019-09-12 16:17:20 -04:00
rhymes
a87fbe6ebf Add index to notifications.notified_at (#3999) 2019-09-12 13:11:31 -07:00
Dmitro Pochapsky
d0f615f3af Fix chat.jsx lints (#3889) 2019-09-12 09:30:59 -04:00
Yash Dave
65d706b1d0 Adjust poll's hover css (#4012) [ci skip] 2019-09-12 09:04:20 -04:00
Ben Halpern
d9634150d8
Add new mod links and tooling (#4009)
* Add new mod links and tooling

* Adjust mod page copy, test
2019-09-12 00:11:01 -04:00
Mario See
01a60b1ee9 Internal Listings: Filter by Category (#3993)
* add select tag and category param

* change filter from onchange to submit

* change options list to call from set list
2019-09-11 19:27:39 -04:00
Jacob Herrington
b00505e9f4 Replace try with safe navigation operator (#3988) [ci skip] 2019-09-11 16:16:37 -04:00
Rishabh Budhiraja
653a266141 Fix links in badge email (#4006) 2019-09-11 15:55:15 -04:00
Mac Siri
57eeceeb74
Generate doorkeeper's view (#3991) [ci skip] 2019-09-11 15:53:46 -04:00
Anna Buianova
2d04488f4d Dispatch events only to the corresponding user endpoints (#4008)
* Dispatch events only to the corresponding user endpoints

* Specify user for dispatch webhook event test to be sure

* Fix webhooks specs
2019-09-11 15:33:11 -04:00
Mario See
6be90c9ad4 Internal Listings: Fill Tweet Text (#3992)
* fill tweet with info even if user doesn't have twitter

* shorten twitter username check

access user from listing instead of finding user via id
2019-09-11 10:25:11 -04:00
Ben Halpern
590149fd48
Fix notifications past aggregation query (#3998) 2019-09-10 11:27:23 -04:00
rhymes
80e6cf4801 Notifications: increase efficiency and fix pagination offset issue (#3986)
* Increase efficiency and fix pagination offset issue

Right now we filter recently aggregated notifications at runtime, which worked before when there was no pagination, but now filtering is not a good idea combined with offset pagination because it throws off the calculations.

The filtering should be done in the SQL query before paginating, which is what we've switched to. I added a bunch of scopes to make the code clearer as well.

To avoid nesting tags I've also updated the HTML and the JS logic to insert it in the right place.

* Add explanation for hiding the load more button for new users
2019-09-10 09:43:45 -04:00
Anna Buianova
8d4991f906 Show webhooks list in internal (#3997) 2019-09-10 09:43:21 -04:00
Jacob Herrington
59e7c104f2 Remove commented code and tests (#3989) [ci skip] 2019-09-09 14:51:02 -04:00
John Curcio
1a8132f892 Fix encoding of special characters on organization page rendering (#3944) 2019-09-09 14:13:23 -04:00
dependabot-preview[bot]
869f3ea90d Bump twilio-ruby from 5.25.4 to 5.26.0 (#3978)
Bumps [twilio-ruby](https://github.com/twilio/twilio-ruby) from 5.25.4 to 5.26.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.25.4...5.26.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-09 13:51:10 -04:00
dependabot-preview[bot]
cde34778e4 Bump bullet from 6.0.1 to 6.0.2 (#3981) [ci skip]
Bumps [bullet](https://github.com/flyerhzm/bullet) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/flyerhzm/bullet/releases)
- [Changelog](https://github.com/flyerhzm/bullet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/flyerhzm/bullet/compare/6.0.1...6.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-09 13:44:14 -04:00
dependabot-preview[bot]
47aad8ce1a Bump webmock from 3.6.2 to 3.7.2 (#3979) [ci skip]
Bumps [webmock](https://github.com/bblimke/webmock) from 3.6.2 to 3.7.2.
- [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.6.2...v3.7.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-09 13:41:22 -04:00
dependabot-preview[bot]
c6b9da1563 Bump storext from 3.0.0 to 3.1.0 (#3980) [ci skip]
Bumps [storext](https://github.com/g5/storext) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/g5/storext/releases)
- [Changelog](https://github.com/G5/storext/blob/master/CHANGELOG.md)
- [Commits](https://github.com/g5/storext/compare/v3.0.0...v3.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-09 13:28:37 -04:00
dependabot-preview[bot]
6feec161e4 Bump rouge from 3.9.0 to 3.10.0 (#3983) [ci skip]
Bumps [rouge](https://github.com/rouge-ruby/rouge) from 3.9.0 to 3.10.0.
- [Release notes](https://github.com/rouge-ruby/rouge/releases)
- [Changelog](https://github.com/rouge-ruby/rouge/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rouge-ruby/rouge/compare/v3.9.0...v3.10.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-09 13:25:47 -04:00
dependabot-preview[bot]
8d8be4f93e Bump eslint-config-prettier from 6.1.0 to 6.2.0 (#3985) [ci skip]
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.1.0 to 6.2.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v6.1.0...v6.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-09 13:23:43 -04:00
dependabot-preview[bot]
95cccee98f Bump devise from 4.7.0 to 4.7.1 (#3977) [ci skip]
Bumps [devise](https://github.com/plataformatec/devise) from 4.7.0 to 4.7.1.
- [Release notes](https://github.com/plataformatec/devise/releases)
- [Changelog](https://github.com/plataformatec/devise/blob/master/CHANGELOG.md)
- [Commits](https://github.com/plataformatec/devise/compare/v4.7.0...v4.7.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-09 13:19:17 -04:00
dependabot-preview[bot]
de57ca7db9 Bump capybara from 3.28.0 to 3.29.0 (#3975) [ci skip]
Bumps [capybara](https://github.com/teamcapybara/capybara) from 3.28.0 to 3.29.0.
- [Release notes](https://github.com/teamcapybara/capybara/releases)
- [Changelog](https://github.com/teamcapybara/capybara/blob/master/History.md)
- [Commits](https://github.com/teamcapybara/capybara/compare/3.28.0...3.29.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-09 13:13:25 -04:00
Andy Zhao
c9a116db42 Fix edge case for rewarding when unpublished (#3987) 2019-09-09 12:33:50 -04:00
dependabot-preview[bot]
3a8a154e9e Bump carrierwave from 2.0.0 to 2.0.1 (#3976)
Bumps [carrierwave](https://github.com/carrierwaveuploader/carrierwave) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/carrierwaveuploader/carrierwave/releases)
- [Changelog](https://github.com/carrierwaveuploader/carrierwave/blob/master/CHANGELOG.md)
- [Commits](https://github.com/carrierwaveuploader/carrierwave/compare/v2.0.0...v2.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-09 12:25:08 -04:00
rhymes
b6c27f34fa Use a sortable unique ID for the event_id (#3972) 2019-09-09 10:15:12 -04:00
Dhananjay
ac5509e181 Update image of Algolia backend docs (#3956) [ci skip] 2019-09-09 09:45:52 -04:00
Mac Siri
14263b287d
Make markdown's mention work with italic (#3868) 2019-09-09 09:23:06 -04:00
Jacob Herrington
6443d66be4 Add missing commas [ci skip] (#3966) 2019-09-07 13:59:12 -04:00
Anna Buianova
4c9a40be41 Dispatch events to the webhook endpoints #3715 (#3872)
* Start with webhooks: table and model

* Start with webhooks api

* Start with webhooks api

* Webhook::Event class and events list

* Remove commented callbacks

* Start with sending events to webhook endpoints

* A couple of tests for Articles::Creator

* Send event to webhook endpoint on article destroy

* Dispatch event on article update

* Dispatch event when an article updated from admin

* Spec for the webhook job

* One more test for the dispatch event job

* Integration-like spec for event dispatching to webhook endpoints when creating an article

* Use Addressable::URI to parse endpoint url

* Add oj as a faster fast_jsonapi backend

* Renamed serializers

* Move article serialization out of a model

* Don't allow to create a webhook event with invalid type

* Add fields for ArticleSerializer

* Fix webhook event job specs

* Specify timeout when dispatching events

* Fix webhook job spec

* Change webhook events queue name

* Change serialized article fields for the dispatchable events

* Include user data when serializing an article for webhook event

* Moved decorating out of Webhook::DispatchEvent, fixed most specs

* Fix route in ArticleSerializer

* Move Article decoration to Webhook::PayloadAdapter

* Refactor image url helpers to avoid including helpers into serializer

* Fix specs

* Default url options for production
2019-09-07 13:17:45 -04:00
rhymes
f7d6874956 Paginate notifications (#3948)
* Use offset instead of page and explain things

* Make load more button work

* Add tests for admin view

* Restore the previous logged out behavior

* Modernize initNotifications.js

* Revert "Modernize initNotifications.js"

This reverts commit 4a112b797d7911c4ab63ad0c0a07111b4e7abe25.

* Fix elements presence errors

* Change load-more-button to only appear if 7 or more posts (and some notification copy adjustments)
2019-09-07 11:54:30 -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
Jess Lee
65fccf00a9 add rake task for fixing credit counter cache (#3962) 2019-09-06 13:08:39 -04:00
Anna Buianova
5248a781b5 Rescue InvalidURIError when busting cache (#3938) 2019-09-06 13:07:24 -04:00
Andy Zhao
8a4030c25d Revert changes as a hotfix (#3964) 2019-09-06 11:54:35 -04:00
Andy Zhao
aadd376f9c Use explicit email domain for badge email links and minor cleanup (#3943)
* Set domain for badge email links

* Add credits + listings info to plain text badge email

* Update environment variable setting

* Use ENV when ApplicationConfig has not been init
2019-09-06 10:20:48 -04:00
rhymes
69c8b24c34 Send JSON 404 response to API error routes (#3959)
* Fix an issue where API 404 calls got the HTML 404 page in response

* Use keyword for consistency
2019-09-06 10:18:50 -04:00
rhymes
3a0dc13fc7 Replace "access token" with "API Key" (#3960) [ci skip] 2019-09-06 09:08:39 -04:00
Almenon
1a99e9bf1a Hide scrollbars in the editor textarea (#3897)
* Hide scrollbars

There is no need for scrollbars in the textarea given the scrollbar at the edge of the browser and that `preact-textarea-autosize` used for the textarea already increases the height of the textarea when needed. Getting rid of scrollbars would solve #2939 and #3330

* add documentation
2019-09-05 18:04:24 -04:00
Jacob Herrington
287bc4432c Make report notification use theme colors (#3896) [ci skip] 2019-09-04 15:22:29 -04:00
rhymes
2e5a847ab8 API: /api/articles/me defaults to published articles (#3937)
* /api/articles/me defaults to published articles

We want to make it explicit to retrieve unpublished articles, this change defaults `/api/articles/me` to only published articles, also adds `/api/articles/me/published`, `/api/articles/me/unpublished` and `/api/articles/me/all` to make requests more explicit.

* Refactor /me logic into a case switch
2019-09-04 14:02:13 -04:00
Andy Zhao
f5e61fdae2 Update Docs deploy command (#3940)
Use make build instead of only gitdocs command
2019-09-04 09:29:49 -04:00
Jacob Herrington
4293a00544 Update notifications reply form to use theme colors (#3894) [ci skip] 2019-09-04 08:42:54 -04:00
Andy Zhao
e25d2eaec9 Escape raw tags in codeblocks properly (#3790) 2019-09-04 08:33:46 -04:00
rhymes
78f22c3682 Simplify the images uploading code (#3907) [ci skip] 2019-09-04 08:14:59 -04:00
not-a-patch
6b7d45baed Update article specs to include missing dependent: :destroy (#3873) [ci skip] 2019-09-03 17:38:13 -04:00
Andy Zhao
dd62a321d1 Add Setup for storybook.dev.to (#3885)
* WIP test custom deploy script

* Add console logs

* Use common JS require instead of import

* WIP

* Use proper names

* Move back one directory...?

* Add npm install?

* Remove console logs

* Refactor a bit
2019-09-03 16:49:37 -04:00
Ben Halpern
07ba4d8b2b
Modify headers to allow embed (#3935) 2019-09-03 16:38:04 -04:00
Jacob Herrington
81f7f73575 Format console copy (#3888) [ci skip] 2019-09-03 15:59:12 -04:00