Commit graph

1139 commits

Author SHA1 Message Date
rhymes
fd1c13c7b6
API listings: improve caching (#6247) 2020-02-25 09:24:19 -05:00
Gonzalo Ricco
0b03240e5b
Add rescue InvalidURIError in mastodon_url validation (#6174) [deploy] 2020-02-24 19:13:40 -05:00
Matej Minárik
89dd843a50
Fix Flaky Comment Spec (#6250) 2020-02-24 18:48:45 -05:00
Matej Minárik
e9a0efbbf2
Fix broken StoriesController#show article with bad chars (#6248) [deploy] 2020-02-24 13:41:06 -05:00
rhymes
168f5c597c
Bump Twitter to 7.0 and refactor TwitterBot (#6246) [deploy] 2020-02-24 08:34:41 -05:00
rhymes
aa5f4b8d85
Remove leftover Stripe subscriptions code (#6243) 2020-02-24 08:33:36 -05:00
Josh Puetz
98a2aaf0ce
Cloudify article main images in feed (#6233) [deploy]
* Cloudify article main images

* Removed commented line
2020-02-21 15:42:34 -06:00
Michael Kohl
d13cbbb3c1
Change authorization to signed in users (#6136) [deploy] 2020-02-21 13:53:30 -05:00
rhymes
8c7aa2e494
Rename DataDog to Datadog (#6226) 2020-02-21 12:00:30 -05:00
Molly Struve
5f50561d82
Backend ChatChannelMembership Search using Elasticsearch (#6217) [deploy] 2020-02-21 10:25:38 -05:00
Michael Kohl
c9b641928f
Clean up chat channels when deleting users (#6225) 2020-02-21 09:59:22 -05:00
rhymes
207621f739
Ignore User.organization_id (#6203)
* Ignore User.organization_id

* Fix specs that are still using organization_id
2020-02-21 09:51:49 -05:00
Josh Puetz
e836ccb94f
Fix nil organizations in home page feed endpoint (#6223) [deploy]
* wip

* Fix up test

* Reverted accidental change to seeds.rb

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-02-21 08:36:15 -06:00
Molly Struve
318ee32cdd
Add worker for removing Elasticsearch docs (#6213) [deploy] 2020-02-21 08:13:36 -05:00
Jacob Herrington
a2b7415836
Fix some erblint complaints (#6220) 2020-02-20 21:10:41 -06:00
Molly Struve
18d9bf1de7
rescue ES BadRequest errors, record in Datadog, and return an empty array (#6219) [deploy] 2020-02-20 18:04:19 -05:00
Michael Kohl
4e208dc11c
Add cache_key helper (#6190) [deploy] 2020-02-20 17:36:49 -05:00
Ben Halpern
a73fc5a6a1
Add base element to open embed links in parent context (#6212) [deploy] 2020-02-20 17:08:11 -05:00
rhymes
ca8ea0874d
Upgrade Stripe to version 5 (#6181)
* Upgrade stripe and stripe-ruby-mock

* Replace .all with .list

* Replace .delete with .detach_source and add tests

* Fix credits spec

* Refactor StripeActiveCardsController to use Payments::Customer and fix specs

* Use the right notice to show feedback to the user
2020-02-20 14:19:52 -05:00
Jacob Herrington
42042d9a9e
Vomit on users from /mod (#6182) [deploy]
* Add UI to vomit on a user from /mod

Co-authored-by: MichaelaHunter <michaela1234@gmail.com>

* Add backend tweaks for vomitting on users

Co-authored-by: Andy Zhao <17884966+Zhao-Andy@users.noreply.github.com>

* Validate that users can't moderate articles

* Add system spec for article mod page

* Satisfy rubocop after rebase

* Fix typo and formatting

* Use reactable_id instead of user_id

Co-authored-by: Michaela Hunter  <60361569+MichaelaHunter@users.noreply.github.com>
Co-authored-by: Andy Zhao <17884966+Zhao-Andy@users.noreply.github.com>
2020-02-20 14:11:53 -05:00
rhymes
4bf323bc83
Skip moderation notification if the user is the moderator (#6200)
* Skip moderation notification if the user is the moderator

* Update spec/workers/notifications/moderation_notification_worker_spec.rb

Co-Authored-By: Vaidehi Joshi <vaidehi.sj@gmail.com>

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-02-20 14:09:43 -05:00
Anna Buianova
1dfa3d6183
Fix podcasts internal page (#6205)
* Fix podcasts internal page

* Add a test to check what is displayed in /internal/podcasts
2020-02-20 11:51:37 -05:00
rhymes
c4f520bc1e
Fix homepage campaign hero spec escaping (#6197) 2020-02-20 10:25:47 -05:00
rhymes
2dbb558b30
Social previews should also be generated for decorated objects (#6208) [deploy] 2020-02-20 08:50:05 -05:00
rhymes
bc385ae6d5
Switch decorators to Rails builtin decorations - take 2 (#6125) [deploy]
* Revert "Revert "[deploy] Switch decorators from Draper to Rails builtin decorations (#6040)" (#6122) [deploy]"

This reverts commit d438349550.

* Enable serialization for decorators

* Refactor and test default home feed serialization

* Improve spec

* Applied @vaidehijoshi suggestions

* Applied @citizen428 suggestions

* Make CodeClimate happy

* Cleanup stories_index_spec.rb

* Refactor UserDecorator#cached_followed_tags to loop less
2020-02-19 15:30:53 -05:00
Josh Puetz
17953a06a5
Remove 'table' from JSON fields for user and organization (#6179) [deploy]
* Change naming of some fields in feed json

* Elimate the 'table' entry to OpenStruct
2020-02-19 14:00:56 -06:00
Molly Struve
e752ff98af
Index ChatChannelMemberships to Elasticsearch (#6162) [deploy] 2020-02-19 14:29:16 -05:00
Juan Vasquez
c50c59c250
Prevent save on invalid canonical url (#6093) [deploy] 2020-02-19 13:55:27 -05:00
Josh Puetz
c2261d7ac7
Change naming of some fields in feed json (#6177) 2020-02-19 12:47:16 -06:00
ludwiczakpawel
a77dfefc2a
Homepage UI Improvements (#5890) [deploy]
* de-emphasizing right sidebar: mostly colors & spacing

* adding a bit more love to typography in sidebar

* changing language on LISTINGS widget header

* hiding profile widget from left sidebar

* cards shadow now looks like a bit less random and annoying

* actually doing the same with all shadows! YOLO

* some spacing cleanups around sidebars

* this time some typography love

* im committing but not really sure what exactly

* adding a bit more love to feed card

* looks like i broke some other views.. time to fix em all

* cleaning up typography a bit more

* .

* separating empty search results styling

* created a card styling mixing to reduce some code.. also moved cheese around a bit

* several more cleanups

* improving responsiveness

* i fixed what i broke

* more cleanups

* org badge

* .

* ...

* responsiveness

* .

* some adjustments

* bring back profile card

* tiny logo adjustment

* bunch of further refainments

* typography

* a bit more refainments

* whoops

* bringing back CTAs styling to loggedout sidebar

* fixes to left tags in left sidebar after merge

* buttons fix

* fixing border-color

* Update app/assets/stylesheets/articles.scss

Typo!

Co-Authored-By: Nick Taylor <nick@iamdeveloper.com>

* .

* css cleanup + double border on article page

* removing unnecessary comments

* get rid of loading glitch

* static vs fixed header

* Update system specs

* Update client test snapshots

* Further modify homepage specs

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2020-02-19 11:24:44 -05:00
Alex
8d7b95ea15
Index ClassifiedListings to Elasticsearch (#6132) [deploy]
* Add ClassifiedListingEsIndexWorker & spec

* Update ClassifiedListing model

- Add es index methods (inline and async)
- Index ClassifiedListing to es after_commit
- Add serialized_search_hash
- Update model specs for new methods
- Add serializers referenced in new model method

* Update specs

* Create DataUpdateScript to index ClassifiedListings

* Fix formatting

* Fix codeclimate :/

* Use match_array instead of keys.sort

* Change find_by! to find

* Update spec

* Update mappings for ClassifiedListing

* Update specs

* Implement refactor with Searchable module
2020-02-19 09:55:37 -05:00
Molly Struve
4203b57944
rescue Psych::DisallowedClass when parsing frontmatter (#6145) [deploy] 2020-02-19 08:31:04 -05:00
Josh Puetz
35c2800c89
Add json support at stories/index endpoint (#6070)
* Add json support at stories/index endpoint

* Tweak tests

* Add main image

* Some light refactoring in StoriesController

* Tiny test refactor

* Split feed generation to it's own controller

* Use Jbuilder for article formatting

* Blank lines thanks Rubocop

* Don't cache this response: we want it generated per use each time

* Whoops!

* PR changes and tweaks to Timeframmer constants

* Remove initializer test since arguments aren't required
2020-02-18 15:15:40 -06:00
rhymes
b05d14a851
Enable CORS preflight caching (#6153) [deploy] 2020-02-18 13:37:54 -05:00
Molly Struve
74118c2d1f
Setup ChatChannelMembership Index (#6152) [deploy] 2020-02-18 13:30:52 -05:00
Ridhwana
39007b4dab
Campaign settings (#6141) [deploy]
* feat: port over changes (+ suggestions) from https://github.com/thepracticaldev/dev.to/pull/5892/files

* chore: add query over multiple lines

* refactor: move the sql logic into the controller instead of in the template

* chore: appease code climate
2020-02-18 11:02:09 -06:00
rhymes
6cbfb01394
Stop using legacy user's organization_id and remove followers unused code (#6079) [deploy] 2020-02-18 11:27:43 -05:00
rhymes
f3c2adfa45
Routine rubocop fixes (#6138) 2020-02-18 11:21:42 -05:00
rhymes
a56eb8fab0
Enable CORS on public API endpoints (#6116) [deploy]
* Enable CORS for public API

* Add specs for Articles API

* Mention CORS in the API docs
2020-02-18 10:47:07 -05:00
Molly Struve
06b44bce26
Refactor Common Search Methods into a Base Class (#6133) [deploy] 2020-02-18 10:43:47 -05:00
Molly Struve
98f25e2b9d
Remove UserHistory Feature and PageViews from Algolia (#6127) [deploy] 2020-02-18 10:06:30 -05:00
Ben Halpern
d0dd79ac29
Make sure profile images show up in onboarding (#6134) [deploy] 2020-02-17 20:19:06 -05:00
rhymes
d438349550
Revert "[deploy] Switch decorators from Draper to Rails builtin decorations (#6040)" (#6122) [deploy]
This reverts commit cc53b55a4a.
2020-02-17 11:28:32 -05:00
Andy Zhao
acd3b92b32
Add sink user service and specs for mass vomits (#6006)
* Add sink user service and specs for mass vomits

* Use new score calculation

* Lower articles' scores instead and make async

* Add lower score functionality to controllers

* Remove unused variable

* Use correct var and add missing arg

* Remove unused status

* Add composite index for reactable_type and ID

* Use alias instead of additional boolean

* Use medium priority for sink worker

* Log to honeybadger and not logs

* Log the error and not a string
2020-02-17 10:29:50 -05:00
Ridhwana
6356089ee0
Re-index existing articles with DataUpdateScript (#6109) [deploy] 2020-02-17 10:14:50 -05:00
Andy Zhao
7cf87c14de
[deploy] Delete notifications before comments are deleted and log w/ Honeybadger (#6084)
* Use Honeybadger to log notification errors

* Create a comment first to test if deleted

* Ensure notifications are deleted before comment
2020-02-17 09:51:05 -05:00
rhymes
cc53b55a4a
[deploy] Switch decorators from Draper to Rails builtin decorations (#6040)
* Convert SponsorshipDecorator to Rails decorator

* Remove empty ReactionDecorator

* Rename SponsorshipDecorator#level_color_hex to level_background_color

* Convert CommentDecorator to Rails decorator

* Add specs and fix bugs for NotificationDecorator

* Convert NotificationDecorator to Rails decorator

* Add specs and fix bugs for OrganizationDecorator

* Convert OrganizationDecorator to Rails decorator

* Add specs to PodcastEpisodeDecorator and fix bugs

* Convert PodcastEpisodeDecorator to a Rails decorator

* Add missing specs for ArticleDecorator and fix bugs

* Convert ArticleDecorator to Rails decorator

* Add missing specs to UserDecorator and fix issues

* Convert UserDecorator to Rails decorator

* Add .decorate_collection method

* Add decorator for AR relations and remove Draper

* Rename BaseDecorator back to ApplicationDecorator

* Rename .decorate_ back to .decorate

* Restore decorate_collection (WTH)

* Add decorated?

* Fix bugs and failing specs

* Decoration should always be explicit
2020-02-17 09:32:32 -05:00
Molly Struve
7ff79f77b8
Search Tags in Elasticsearch from Classified Listing and Post Creation (#6024) [deploy] 2020-02-17 08:16:45 -05:00
Vaidehi Joshi
76fe99b76a
Add Broadcast seeds + generator service to set up for welcome notifications (#6080)
* Add more Broadcasts to seeds for welcome notification flow

* Remove unnecessary welcoming_user_id from development config

* Add basic service class for generating appropriate broadcast per user

Eventually, this should be called from a rake task that will rely on this service to determine which broadcast, if any, is the appropriate one to send to newly signed-up users, and will enqueue a worker to create/send a welcome notification when appropriate.

* Add a few TODOs, plus some general cleanup

* Add some skipped tests for WelcomeNotification::Generator
2020-02-14 12:30:25 -08:00
Molly Struve
ef9611d745
Create DataUpdateScript to Index all Tags (#6078) [deploy] 2020-02-14 14:17:52 -05:00