Commit graph

4345 commits

Author SHA1 Message Date
Alex
832f59ff6d
Search ClassifiedListings frontend code (#6372) [deploy]
* Add /search/classified_listings route

* Add classified_listings search controller action

* Add spec for /search/classified_listings request

* Begin implementing frontend code

* Add debounce to classified_listings search

* before_action to format page & per_page as Integer

* Use new fetchSearch helper to fix codeclimate

* Refactor to reduce listingSearch function length

* Refactor into separate updateListings function

* Move updateListings function outside class

* Move page size to constant

* Add brackets to conditionals

* Add comment for tags param

* Add JS doc

* Move params logic/cleanup to search_controller

* Move listingIDs to const

* Rename remove_blank_params & move to before_action
2020-03-03 14:13:40 -08:00
cyrillefr
fe57053c44
Fixe html_safe issues from comment domain (#6422) 2020-03-03 15:38:15 -05:00
Jacob Herrington
b5e7521676
Skip vomit reactions on banned users (#6432) [deploy]
Just a quick fix to filter banned users out of the vomit reaction lists,
we are doing essentially the same thing for unpublished articles. It
might worth handling this at the controller level if we experience any
performance issues.
2020-03-03 15:21:37 -05:00
Molly Struve
9b2c470ddd
Dont repeatedly hit the cache for user data (#6433) [deploy] 2020-03-03 15:19:58 -05:00
Andy Zhao
c830a1e24b
Check presence of auth_data_dump (#6431) 2020-03-03 15:05:39 -05:00
Michel
f875f9b4b2
Fix invalid ERB in featured author link. (#6428) [deploy] 2020-03-03 14:43:19 -05:00
Molly Struve
12803fb179
organize article callbacks (#6426) [deploy] 2020-03-03 13:44:49 -05:00
Ben Halpern
3875f38b26
Remove console log (#6424) 2020-03-03 19:39:51 +01:00
Molly Struve
5389b34268
remove redundant search specs (#6421) 2020-03-03 12:53:06 -05:00
Ben Halpern
1dc1723709
Add field test gem to establish a/b testing (#6283) [deploy]
* Initial field test spec work

* Clean up specs

* Fix codeclimage

* Cleanups

* Update names

* Rename and remove need to pass logged in status

* Leadup to prod: two experiments

* Move test logic to controller and add tests

Co-authored-by: Josh Puetz <josh@grorichpuetz.com>
2020-03-03 10:21:29 -05:00
dependabot-preview[bot]
3b2b9cb77b
Bump babel-eslint from 10.0.3 to 10.1.0 (#6403) [deploy]
Bumps [babel-eslint](https://github.com/babel/babel-eslint) from 10.0.3 to 10.1.0.
- [Release notes](https://github.com/babel/babel-eslint/releases)
- [Commits](https://github.com/babel/babel-eslint/compare/v10.0.3...v10.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-03 10:16:21 -05:00
Alex
9888021408
Create fetchSearch helper (#6374)
* Create fetchSearchAPIPromise helper

* Add comments/documentation

* Add test for fetchSearchAPIPromise helper

* Rename fetchSearchAPIPromise to fetchSearch

* Update fetchSearch documentation

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

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-03-03 09:52:24 -05:00
Michael Kohl
4e1ccf4a3a
Add .present? check (#6302) 2020-03-03 09:34:17 -05:00
dependabot-preview[bot]
f05a351906
Bump twilio-ruby from 5.31.1 to 5.31.5 (#6395) 2020-03-03 09:22:38 -05:00
rhymes
ea0c062ef7
Bump omniauth to 1.9.1 (#6420) 2020-03-03 09:17:15 -05:00
rhymes
eb3339b747
Bump reverse_markdown to 2.0 (#6419) 2020-03-03 14:53:55 +01:00
Molly Struve
3703ba3111
Create Feed Content index for Articles and Podcast Episodes and User Index (#6418) [deploy] 2020-03-03 08:00:16 -05:00
Alex
26ed296475
Add published field to ClassifiedListing Search (#6412) [deploy]
* Add published field to ClassifiedListing

* Add back query_conditions conditional

* Don't allow searches for unpublished listings

* Fix comment typo...oops!
2020-03-02 13:56:07 -08:00
Ben Halpern
657de691a8
Add attributesForFaceting to ordered_articles (#6416) [deploy] 2020-03-02 16:15:58 -05:00
Molly Struve
a0c0e7c7e3
remove leftover algolia test code (#6409) [deploy] 2020-03-02 13:58:13 -05:00
Molly Struve
1fc6766ebb
use safety operator for commentable in tags tag_list (#6411) 2020-03-02 13:57:47 -05:00
dependabot-preview[bot]
bfaa9b5f4f
Bump google-api-client from 0.37.1 to 0.37.2 (#6394) [deploy] 2020-03-02 12:51:53 -05:00
cyrillefr
dea823b6ec
Excludes some files from linting and deletes redundancies (#6275) 2020-03-02 12:50:36 -05:00
dependabot-preview[bot]
239ab4022c
Bump launchy from 2.4.3 to 2.5.0 (#6393) 2020-03-02 12:42:00 -05:00
Andy Zhao
a3728cfa4c
[deploy] Add EmailAuthorization model (#6335)
* Add EmailAuthorization model

* Add model file oops

* Add comment for uuid type

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2020-03-02 12:14:24 -05:00
Matej Minárik
8510b50d66
Update Syntax Highlight Color Scheme (#6342) 2020-03-02 11:58:45 -05:00
Maykon Menezes
7e397f4bd5
Fix behavior of Organization comments and posts urls (#6383)
* Fix allowed_user method of notifications controller

* Change to keep the current order of checks
2020-03-02 11:49:25 -05:00
Ben Halpern
3c8422c8d5
Add social image to internal/pages form (#6401) [deploy] 2020-03-02 11:38:01 -05:00
dependabot-preview[bot]
1c9ed1a6b3
Bump oj from 3.10.2 to 3.10.3 (#6398) 2020-03-02 11:19:11 -05:00
dependabot-preview[bot]
dd210e89fd
Bump nokogiri from 1.10.8 to 1.10.9 (#6392)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.8 to 1.10.9.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/v1.10.9/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.10.8...v1.10.9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-02 11:16:08 -05:00
dependabot-preview[bot]
b3c07fd850
Bump bootsnap from 1.4.5 to 1.4.6 (#6397) [deploy]
Bumps [bootsnap](https://github.com/Shopify/bootsnap) from 1.4.5 to 1.4.6.
- [Release notes](https://github.com/Shopify/bootsnap/releases)
- [Changelog](https://github.com/Shopify/bootsnap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Shopify/bootsnap/compare/v1.4.5...v1.4.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-02 10:52:40 -05:00
dependabot-preview[bot]
70939f0c38
Bump better_errors from 2.5.1 to 2.6.0 (#6396)
Bumps [better_errors](https://github.com/BetterErrors/better_errors) from 2.5.1 to 2.6.0.
- [Release notes](https://github.com/BetterErrors/better_errors/releases)
- [Commits](https://github.com/BetterErrors/better_errors/compare/v2.5.1...v2.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-02 10:51:24 -05:00
ludwiczakpawel
f7b0534725
extra padding on tag (#6389) 2020-03-02 16:51:10 +01:00
dependabot-preview[bot]
93e8bfed48
Bump lint-staged from 10.0.7 to 10.0.8 (#6404) 2020-03-02 10:36:36 -05:00
dependabot-preview[bot]
af7f0b0cb9
Bump elasticsearch from 7.4.0 to 7.5.0 (#6400)
Bumps [elasticsearch](https://github.com/elasticsearch/elasticsearch-ruby) from 7.4.0 to 7.5.0.
- [Release notes](https://github.com/elasticsearch/elasticsearch-ruby/releases)
- [Changelog](https://github.com/elastic/elasticsearch-ruby/blob/v7.5.0/CHANGELOG.md)
- [Commits](https://github.com/elasticsearch/elasticsearch-ruby/compare/v7.4.0...v7.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-02 10:25:08 -05:00
Molly Struve
a9ffccc1ac
use safety operator when indexing comment tag list (#6407) 2020-03-02 10:22:00 -05:00
Ridhwana
dee8d39fe7
Ridhwana/Remove shecoded (Please do NOT merge as yet) (#6357) [deploy]
* chore: remove she coded route

* chore: remove the shecoded page

* chore: remove some assets

* chore: remove shecoded pages controller action
2020-03-02 10:20:42 -05:00
Ben Halpern
08cbb837f2
Fix editor style bugs (#6399) [deploy] 2020-03-02 10:12:10 -05:00
dependabot-preview[bot]
561af1e7f3
Bump stripe from 5.15.0 to 5.17.0 (#6391)
Bumps [stripe](https://github.com/stripe/stripe-ruby) from 5.15.0 to 5.17.0.
- [Release notes](https://github.com/stripe/stripe-ruby/releases)
- [Changelog](https://github.com/stripe/stripe-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stripe/stripe-ruby/compare/v5.15.0...v5.17.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-02 10:06:09 -05:00
Gonzalo Ricco
5d22cdef79
Prevent deadlocks with article-collection updates. (#6371) [deploy]
When an article is updated the associated collection is touched along with all its articles. This creates a deadlock where two transaction(nested) lock the article that was updated.
With this commit the collection wll be touched after the article updates transaction has been commited. Doing so we have two sequential transactions.
2020-03-02 09:38:15 -05:00
rhymes
7b6417ca78
Add documentation for how to install ES from homebrew on macOS (#6387)
* Add documentation for how to install ES from brew

* A bit clearer

* Update docs/installation/mac.md

Co-Authored-By: Ridhwana <Ridhwana.Khan16@gmail.com>

* Update docs/installation/mac.md

Co-Authored-By: Ridhwana <Ridhwana.Khan16@gmail.com>

* Move testing section after installation

* Update docs/installation/mac.md

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

* Update docs/installation/mac.md

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

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-03-02 15:33:33 +01:00
Molly Struve
2ef6b5ac50
refactor search method to base class (#6370) [deploy] 2020-03-02 08:37:08 -05:00
dependabot-preview[bot]
ca6bc195a3
[Security] Bump puma from 4.3.1 to 4.3.3 (#6384) [deploy] 2020-03-02 08:20:35 -05:00
Anna Buianova
b36d2e72ff
Started moving sponsorships to /internal (#6355) [deploy]
* Started moving sponsorships to /internal

* Moving sponsorships to /internal

* Improved /internal/sponsorships

* Added destroying sponsorships to /internal

* Rename sponsorships creator in internal
2020-03-01 12:48:47 -05:00
Ben Halpern
e00a08ba82
Small CSS fixes (#6381)
* Small CSS fixes

* Minimal width notifier
2020-03-01 12:46:13 -05:00
Ben Halpern
ec50515810
Remove parentheses when time ago not present (#6379) [deploy] 2020-02-29 14:05:45 -05:00
Ben Halpern
501f70bd9f
Fix width of article sticky sidebar (#6378) [deploy] 2020-02-29 13:08:10 -05:00
Mac Siri
9f58b12f67
Make localstorage draft respect newer saved draft (#6343) [deploy] 2020-02-28 15:17:21 -05:00
Nick Taylor
f6e99dec8b
Nickytonline/homepage main feed component (#6164) [deploy]
* wip

* Removed reference to cached_tag_list as the feed enpoint only returns tag_list now.

* Removed reference to cached_properties.

* Updated <CommentsCount /> and <TagList /> to support additinal className

* wip

* wip

* Undid init scrolling for Algolia articles

* Converted homePageFeed.jsx to an ERB template to access Sprockets.

* Now the homePageFeed.jsx files is an ERB so it can load Sprockets assets.

* wip

* Removed accidental commit of debugger statement in ERB.

* Now different feed time frames are loaded based on the homepage feed tab clicked.

* Prevent default Algolia paging when on the homepage.

* Added a tiny comment about feed time frame.

* Now feed loads properly for each time frame on home page.

* prop name refactor.

* Reneabled default Algolia scrolling.

* On the homepage, we no longer overwrite article HTML with Algolia data for initial articles.

* Assumption is the proper URL for main_image of featured article will be sent in the feed.

* Fixed Google Analytics for featured article.

* No longer need the new-feed ID for checking if we're on the homepage.

* Trying to make codeclimate happy.

* wip

* Removed reference to cached_tag_list as the feed enpoint only returns tag_list now.

* Removed reference to cached_properties.

* Updated <CommentsCount /> and <TagList /> to support additinal className

* wip

* wip

* Undid init scrolling for Algolia articles

* Converted homePageFeed.jsx to an ERB template to access Sprockets.

* Now the homePageFeed.jsx files is an ERB so it can load Sprockets assets.

* wip

* Removed accidental commit of debugger statement in ERB.

* Now different feed time frames are loaded based on the homepage feed tab clicked.

* Prevent default Algolia paging when on the homepage.

* Added a tiny comment about feed time frame.

* Now feed loads properly for each time frame on home page.

* prop name refactor.

* Reneabled default Algolia scrolling.

* On the homepage, we no longer overwrite article HTML with Algolia data for initial articles.

* Assumption is the proper URL for main_image of featured article will be sent in the feed.

* Fixed Google Analytics for featured article.

* No longer need the new-feed ID for checking if we're on the homepage.

* Added postcst episodes to <Feed /> state.

* Breaking up Article.jsx to make codeclimate happy.

* wip

* Created the <TodaysPodcastEpisodes /> and <PodcastEpisode /> components.

* Fixed issues with some components that were updated for the <FeaturedArticle />

* Added tests for <FeaturedArticle />

* Barreled up <FeaturedArticle />

* Added Storybook stories for <FeaturedArticle />

* Featured articles don't display org, so removed that test.

* Added proper today's podcasts components to feed.

* Converted some leftover ERB + removed pro checkmark as it doesn't exist yet.

* Now logic is same as master for feed timeframe.

* Updated <FeaturedArticle /> snapshots.

* On frontpage, bookmark button state is managed by Preact components now.

* bookmarkedFeedItems is now a prop on <Feed />.

* Fixed logic check for initializing reading list icons.

* Now <Article /> and <FeaturedArticle /> receive a bookmarkClick prop.

* Removed beginnings of scroll handler in <Feed /> as we're using what's there already for now.

* Removed logic to not show main image on other time frame feeds as it was not correct.

* Fixed issue with 0 rendering when no podcast episodes in feed.

* Converted <SaveButton /> to a stateful component.

* wip - <Feed /> render prop now passes bookmarked feed item ID set and a click event.

* Moved FEED_ICONS to an export so it's easier to use JSX/JS in <Feed />

* Moved <Feed /> into article components.

* Now reading list save buttons work properly in Preact components.

* Fixed issue with Save buttons in Algolia paging/<Feed />

* Updated snapshots.

* Took <Feed /> out of articles barrel file as jest was trying to import FEED_ICONs which is an ERB template.

* Now the Preact feed is dynamically imported.

* Now the Preact <Feed /> only loads for a logged on user.

* Fixed <FeaturedArticle /> so that the save button behaves properly now.

* Updated article stories for Storybook.

* Putting this back to the order it was because I've removed my code changes for this block.

* Fixed when renderFeed is imported for a logged on user.

* Add podcasts to feed and render home from server

* Add padding to feature laoding div

* Update tests

* Add more loading articles

* Fix conflicts

* Add readinglist javascript to initscrolling

* Ensure first article is one with image

* Organize feed items outside of feed instead of in it

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
Co-authored-by: Josh Puetz <josh@grorichpuetz.com>
2020-02-28 14:14:47 -05:00
Alex
00bced6179
Refactor search specs to use index_documents helper (#6365) [deploy] 2020-02-28 11:08:46 -08:00