Commit graph

731 commits

Author SHA1 Message Date
rhymes
466ec8bd17
Ignore unused tags columns (#6947) 2020-03-30 16:57:13 +02:00
Lucas Hiago
bc84c4473f
Refactor method in tweet models (#6929) 2020-03-30 16:10:17 +02:00
rhymes
6e1fabaadb
Ignore unused podcast_episodes columns (#6939) [deploy]
* Ignore unused podcast_episodes columns

* Remove featured from serializer
2020-03-30 15:38:22 +02:00
rhymes
863247049e
Ignore unused pages columns (#6934) 2020-03-30 15:35:12 +02:00
Molly Struve
72f04e4a13
Create Reactions Index in Elasticsearch and Serializer (#6899)
* create index for reactions and their reactables, set up serializer

* use respond_to instead of checking type

* remove rubocop change

* add last_indexed_at to reactions index
2020-03-27 18:44:54 -04:00
rhymes
9a0a6fbe8f
Remove unused columns from articles (#6860) [deploy]
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2020-03-27 17:04:13 +01:00
rhymes
d03c751c65
Rubocop fixes (#6904)
* Run rubocop -a

* Regenerate rubocop todo

* Fix Lint/UselessAssignment

* Fix RSpec/RepeatedDescription

* Fix Style/GuardClause

* Fix Style/NumericPredicate

* Regenerate rubocop todo
2020-03-27 15:30:59 +01:00
rhymes
0374f2d101
Remove unused columns in display_ads (#6859) 2020-03-27 10:05:46 +01:00
Jacob Herrington
38d56542eb
[deploy] Moderator and admin actions log (#6797)
* Add audit logging for negative reactions

This change saves requests that create negative reactions to the audit
log. We need to be monitoring admin and moderator actions throughout the
app to increase visiblity on how our tools are being used and identify
abuse.

Additionally, this will help east concerns about giving elevated users
more powerful tools.

* Add a basic UI for moderator audit logs

* Log experience level ratings

* Log tag adjustments

* UI tweaks for moderator actions log

* Add logging to internal reactions controller

* Add logging for admin actions on users and articles

* Add searching to the moderator actions table

* Move audit instrumentation out of concern

We are able to use a PORO here instead of using a Rails concern. Moving
this also makes syntax to audit something quite a bit more explicit and
obvious to future developers

* Change moderator logs pagination page length

* Move auditing to after action filters

* Add moderator actions to the internal navbar

* Add request spec for internal moderator actions

* Use request params to populate AuditLog slug
2020-03-26 16:59:24 -05:00
Ben Halpern
bc6a2f14c2
Revert rating_votes_count removal (#6851) 2020-03-25 18:20:09 -04:00
rhymes
30d9acf92e
Ignore unused display_ads columns (#6785) 2020-03-25 17:59:53 -04:00
rhymes
f1167be64c
Ignore unused articles columns (#6781)
* Ignore unused article columns

* Remove usage of ignored columns
2020-03-25 17:48:42 -04:00
rhymes
cf94d0ba98
Remove unused columns from display_ad_events (#6806) [deploy] 2020-03-25 17:47:05 -04:00
Mac Siri
84e84af8d7
Create Article#admin_published_with scope (#6794) 2020-03-24 18:15:43 -04:00
Jacob Herrington
c673b2bb6d
Internal: Add a table for negative reactions (#6751) [deploy]
* Add a table for moderator reactions

This is a simplified version of a feature that should be fleshed out
in the near future.

Despite the fact that this project is taking a new direction, I think
this table could be useful in the meantime.

* Add specs for internal mod actions view

* Rename mod actions to negative reactions
2020-03-24 16:08:24 -04:00
Molly Struve
3087d3d4d8
Index comments into FeedContent index (#6791) [deploy] 2020-03-24 09:24:20 -05:00
rhymes
04e94c89ab
Ignore unused display_ad_events columns (#6783) 2020-03-24 12:04:13 +01:00
Andy Zhao
57d9d72c10
Update call to action box text styling (#6795)
* Use constant for type_of_user

* Add comment for clarity

* Remove legacy inline styles

* Move comment above the render
2020-03-24 10:49:37 +01:00
Jibran Kalia
a91cb9f8f4
Create primary_sticker_image_url in SiteConfig (#6746) [deploy]
* Create primary_sticker_image_url in SiteConfig

* Adding test for updating primary_sticker_image_url

* typo

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2020-03-23 14:55:18 -04:00
Ben Halpern
030e491cf4
Add logo_png SiteConfig for manifest etc. use (#6760) [deploy]
* Add logo_png SiteConfig for manifest etc. use

* Touch ups
2020-03-23 14:31:41 +01:00
Michael Kohl
1481faf34d
Auto confirm admin reactions (#6693) [deploy] 2020-03-20 14:11:13 -04:00
Andy Zhao
494ad153ab
Add response templates for internal usage (#6676)
* Add internal response template controller

* Add response template policy and spec

* Add response template views for internal

* Add missing html oops, and some padding

* Use arrays instead of %w because spaces

* Link to user in index list

* Add actual HTML oops

* Allow success flash to be displayed

* Add tag moderator trait

* Remove unnecessary .all

* Use constant to avoid duplication

* Use URL helpers over manual string URLs

* Use appropriate renders and URLs

* Follow conventional CRUD and use form_with

* Add internal request spec for response_templates

* Add missing view file oops

* Use table view for index and bootstrap styles

* Redirect to index after create

* Use clearer messaging for labels

* Validate email types to use only plain text and html
2020-03-20 11:32:55 -04:00
Fernando Valverde
14c13cb33b
Adds Podcast Episode metadata as JSON to avoid scraping the HTML (#6727) [deploy]
* Adds Podcast Episode metadata as JSON to avoid scraping the HTML

* Uses app_url helper instead of app_protocol_and_domain string interpolation for podcastImageUrl

* Adds podcast_episode#mobile_player_metadata, cleans eslint/codeclimate mess I made & adds tests

* Removes an extra line to fix codeclimate

* Removes unnecessary return
2020-03-20 10:28:24 -04:00
Ben Halpern
bff4050c35
Add dynamic monthly sitemaps (#6704) [deploy]
* Initial sitemap work

* More sitemap progress

* Remove files

* Finalize monthly sitemap

* Update spec/models/organization_spec.rb

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

* Clean up approach

* Change tests

* Fix test not sure what problem was

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-03-19 17:20:23 -04:00
Molly Struve
7085082781
Add class_name to Elasticsearch ID field for Feed Content (#6729) [deploy] 2020-03-19 16:14:42 -05:00
Ben Halpern
379aa4d1ec
Allow communities to dictate authentication providers (#6639) [deploy]
* Allow communities to dictate authentication providers

* Include proper file

* Reset siteconfig value

Co-authored-by: rhymes <rhymesete@gmail.com>
2020-03-18 16:41:39 -04:00
rhymes
a333da23d1
Move dev/mascot account to class methods (#6694) 2020-03-18 14:42:40 +01:00
rhymes
20fd8cdb92
Replace observers with callbacks and remove rails-observers (#6675)
* Add test for vomit reactions ping

* Remove reaction observer

* Add tests for new published article ping

* Remove reaction observer

* Remove comment observer

* Fix specs

* Remove rails-observer gem
2020-03-18 09:58:36 +01:00
Jacob Herrington
19b91129d8
Denote previously reported and suspended users in vomit reactions (#6619) [deploy]
* Break feedback_messages view into partials

* Standardize capitalization

* Add visual cues for banned and vommitted users

* Use helper methods to construct urls

* Rename vomitted? to vomitted_on?

vomitted_on? is a slightly more clear method name. This change takes
Rhymes' suggestion to use the AR method exists? over where(...).exists?
2020-03-16 18:22:00 -04:00
Ben Halpern
8b0cfaf48a
Add two new experiments and one new conversion event (#6633) [deploy]
* Add two new experiments and one new conversion event

* change hours in 7 to 24
2020-03-16 18:16:02 -04:00
Ben Halpern
de27e7ed34
Allow community admins to alter site description (#6662) [deploy]
* Allow community admins to alter site description

* Fix typo
2020-03-16 15:34:49 -04:00
Ben Halpern
58e524acdc
Allow admins to define core sidebar tags in config (#6641) [deploy] 2020-03-16 08:54:32 -04:00
Andy Zhao
d08f830d86
Add response templates model and table (#6615)
* Add response templates model and table

* Add missing factory oops

* Remove response templates on delete

* Remove moderator_id column from comments for now

* Use constants and add spec for response templates
2020-03-16 09:52:03 +07:00
rhymes
86129395eb
Cleanup tag validation a bit (#6604)
* Cleanup tag validation a bit

* Use symbols
2020-03-12 15:41:08 +01:00
rhymes
01e4a0b0f1
API: add docs for /followers/users and remove organizations endpoint (#6551)
* Use api-key for api tests

* Remove /api/followers/organizations endpoint

* Add more tests

* Add documentation for /api/followers/users
2020-03-11 10:56:43 +01:00
Michael Kohl
02f86fedd7
Allow admins to delete users without emails (#6530) [deploy]
* Allow admins to delete users without emails

* Guard against blank email addresses
2020-03-10 22:20:36 +01:00
Vaidehi Joshi
502bef156e
Allow an article's main_image to be removed (#5687) [deploy]
Currently, we don't allow users to remove the `main_image` of an article once it has been set. It can be changed, but never removed.
This change allows the `main_image` to be removed by checking for the `cover_image` key in the frontmatter that is sent along in the article's markdown. This means that a user should be able to remove the image associated with an article by removing the value of `cover_image:` from their frontmatter.
2020-03-10 08:29:59 -07:00
Ben Halpern
0817e2ac9e
Create implicit experience level rating vote upon creating of readinglist reaction (#6522) [deploy]
* Do not render or link to empty rss feeds

* s

* Move calculation to worker

* remove xit test

* Also allow implicit rating votes in comments

* Fix alignment issue

* Remove comment logic
2020-03-10 10:59:49 -04:00
Anna Buianova
99cabcbf6b
Removed unused campaign settings (#6532) [deploy] 2020-03-09 12:59:54 -04:00
rhymes
c7503fd0b1
Fix scripts startup check for development mode (#6520)
* Fix scripts startup check for dev mode

* Update doc
2020-03-09 17:15:21 +01:00
Vaidehi Joshi
99c87d7a17
Replace WELCOMING_USER_ID with mascot_user_id (#6484) [deploy]
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
2020-03-09 08:08:53 -07:00
rhymes
21fca3e0f2
Comments API: hide deleted and hidden comments (plus docs) (#6482) [deploy]
* Modernize index test

* Hide comments body_html and user info if the comment is either deleted or hidden

* Shorten lines a bit

* Freeze repeated strings

* Document all /comments

* Document /comments/{id}
2020-03-07 09:02:10 +01:00
Molly Struve
82526989fc
Index Articles and Podcast Episodes to Elasticsearch (#6488) [deploy]
* Index Articles and PodcastEpisodes to Elasticsearch

* add callbacks to podcast episodes and specs

* refactor and clean up serializers
2020-03-06 16:39:36 -05:00
Andy Zhao
478d1b36a5
Hide banished users vomit confirmations and delete vomit reactions on banish (#6507) [deploy]
* Update to hide only banished users

* Refactor and move into a model method

* Delete vomits on banished users

* Add tests for banishing users
2020-03-06 15:35:30 -05:00
Molly Struve
731b89ca26
Index users into elasticsearch (#6489) [deploy] 2020-03-06 14:12:02 -05:00
Vaidehi Joshi
10cee2ec5c
Add a mascot_user_id to SiteConfig (#6483) [deploy]
* Add a mascot_user_id to SiteConfig

Also allow it to be updated from /internal/config pages.

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>

* Add spec for updating mascot_user_id

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
2020-03-05 12:44:59 -08:00
Alex
35651b26e5
Remove Algolia from Comments (#6464) [deploy]
* Remove Algolia from comments

* Remove more references to ordered_comments index

* Remove more references to Comments Algolia index

* Fix index_worker_spec
2020-03-05 11:30:25 -08:00
Molly Struve
039ac2e856
Remove Shipping Fields from Users (#6477) [deploy] 2020-03-05 13:41:09 -05:00
rhymes
f3e76e7fe5
Improve API docs for articles, add listings to it and fix bugs (#6413) [deploy]
* Fix articles index state param values

* Update Articles API docs

* Fix ClassifiedListing.cost_by_category with invalid category

* Add docs for GET|POST /listings and fix bugs

* Document PUT /api/listings/:id

* Add docs for /listings/category/{category}

* One variable down

* Improve listings update error handling
2020-03-04 15:30:02 +01:00
Alex
07d3991bc8
Remove Algolia for ClassifiedListings (#6435) [deploy] 2020-03-04 08:36:14 -05:00