Commit graph

4203 commits

Author SHA1 Message Date
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
rhymes
dfbc1b3791
Disable service worker on social previews (#6209) [deploy] 2020-02-20 17:39:17 -05:00
Michael Kohl
4e208dc11c
Add cache_key helper (#6190) [deploy] 2020-02-20 17:36:49 -05:00
ludwiczakpawel
6d2c63026c
Homepage Improvements, round II (#6202) [deploy]
* remove border from ad and fix cut-off

* improving ellipsis for tags

* improving ellipsis for tags

* fixing underline between each tag on hover

* user avatars alignment in left sidebar

* test commit

* reverting test

* test commit

* reverting test

* index unassigned

* user suggestions in right sidebar on tag page, fixes

* improving widgets a little

* line height for category

* Update tests

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2020-02-20 17:12:56 -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
Mac Siri
d73f5c1e09
Log Gibbon errors metric on Datadog (#6186) [deploy] 2020-02-20 17:05:24 -05:00
Jacob Herrington
5fbae24760
Delete empty file (#6218) 2020-02-20 15:58:25 -06: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
Jacob Herrington
a24a37c7a6
Add JS confirm to confirmation of user vomits (#6211)
Because confirming a User vomit is a particularly destructive task, we
want to make it a bit more intentional. Ben recommended adding a confirm
dialog for these reports.

This commit also satisfies erblint's complaints regarding the select
element in the ransack search form.
2020-02-20 12:44:03 -06:00
Ben Halpern
dabeb1c732
Fix pull-to-refresh and other small styling issues (#6214) [deploy] 2020-02-20 13:39:26 -05:00
Nick Taylor
522c42f031
Ran prettier on SASS files (#6207) [deploy] 2020-02-20 10:33:58 -08:00
Alex
4eca3c1f5a
Change find_by to find for better error messaging (#6178) [deploy] 2020-02-20 09:58:41 -08: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
0efa486f34
Remove unused code for users-index (#6204) 2020-02-20 10:50:03 -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
Michael Kohl
54a9aee61a
Add Elasticsearch to GitPod (#6198) [deploy]
* Add Elasticsearch to GitPod

* Add second ES port
2020-02-20 07:37:33 -06:00
Ben Halpern
cea1cf5e12
Fix logo link placement (#6184) [deploy] 2020-02-19 17:37:43 -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
Jacob Herrington
aee50e9ea0
Remove misleading FAQ file (#6180)
The FAQ page displayed in production is actually generated in internal
and it might be pretty misleading to folks who want to contributing by
improving our FAQ if they find this file in the codebase.

This has the benefit of clearing up any confusing that might arise from
finding this file and also having a placeholder if someone goes the faq
route in the their dev environment.
2020-02-19 14:14:08 -06: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
Pierre
fa96c114ed
Remove unavailable gif from rotation (#6168) 2020-02-19 14:35:03 -05: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
Mohamed ABDELLANI
e351227bb0
Don't Allow Users To React to Unpublished Posts (#5969) 2020-02-19 13:41:35 -05:00
Nick Taylor
5e677daac1
Homepage feed components (#6052)
* wip - <PodcastArticle /> component.

* Added filler user avatar for other article types.

* Added <LoadingArticle /> component.

* wip

* wip on <Article /> component.

* Added <Article /> component to barrel file.

* Deleted assets from dummy storybook assets folder.

* Updated podcast article story avatar.

* More work on <Article /> component.

* Refactoring Storybook stories.

* Refactored so main component is just the <Article /> component.

* Added a missing video article property.

* Some refactoring of <Article /> component.

* Added Storybook knobs addon.

* Now <Article /> component supports an isBookmarked prop.

* Fixed podcast Storybook story.

* Made the knobs Storybook addon the first tab

* Added more <Article /> Storybook stories.

* More <Article /> component tweaks.

* Added publish time to <Article /> component stories.

* Made the timeAgo function compatible with Preact.

* Added loading="lazy" attribute to <img /> in <Article /> component.

* Added <Article /> Storybook story for past published date.

* Fixed publish date for <Article /> story data.

* Scrapped random avatars.

* Added snapshots for <Article /> component.

* Added snapshots for <LoadingArticle /> component.

* Now test article entities are shared.

* Fixed some wording of Storybook stories.

* Breaking up Article.jsx to make codeclimate happy.

* Now <Article /> component receives icon props.

* Added knobs for <Article /> icon props.

* Added *.stories.jsx to codeclimate exclusion list.

* Added **/*.stories.jsx to codeclimate exclusion list.

* Alright now we have the good glob for excluding Storybook from codeclimate 😆

* Added org headline changes from low hanging fruit PR.

* Updated <Article /> snapshot for org headline.
2020-02-19 11:39:13 -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
rhymes
77725ccbdc
Upgrade gems (#6171)
* Bump to brakeman 4.8.0

* Bump to carrierwave 2.1.0

* Bump to dry-struct 1.3.0

* Bump to google-api-client 0.37.0

* Bump to nokogiri 1.10.8

* Bump to rubyzip 2.2.0

* Bump to shoulda-matchers 4.3.0

* Bump to sidekiq 6.0.5

* Lock to simplecov 0.17.1
2020-02-19 09:43:38 -05:00
Ben Halpern
055c826139
Add heroku slug commit to some cache keys (#6159) [deploy] 2020-02-19 09:07:32 -05:00
Nick Taylor
ee9b1f58b9
Enabled ERB support for webpacker (#6166) [deploy] 2020-02-19 08:58:37 -05:00
Molly Struve
4203b57944
rescue Psych::DisallowedClass when parsing frontmatter (#6145) [deploy] 2020-02-19 08:31:04 -05:00
Ben Halpern
d05ceb4d98
Modify padding for classifiedlisting dropdown (#6165) [deploy] 2020-02-18 18:23:11 -05:00
Zachary Dixon
cf2af6c2dc
Add dropdown menu to listings (#4184) [deploy]
* Resolves 2826, add dropdown menu to listings

* Fixed dropdown position

* Refactored single listing

* Revert schema.rb to master

* Fixed tests
2020-02-18 18:08:39 -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
Molly Struve
895bf07ef3
Add Elasticsearch to Datadog APM (#6129) [deploy] 2020-02-18 16:07:50 -05:00
Molly Struve
0085437725
PageView is no longer a valid model to index (#6161) 2020-02-18 16:06:51 -05:00
Molly Struve
567eb49ee1
Refactor searchable interface into a module for AR models (#6160) [deploy] 2020-02-18 15:35:34 -05:00
Fernando Valverde
797e6372b0
Add explicit 0.0.0.0 bind option to Procfile.dev (#6147) 2020-02-18 14:26:17 -05:00
Nick Taylor
9630a174f9
Added jest config to support test utility modules. (#6154) [deploy] 2020-02-18 12:54:18 -06:00
Ridhwana
086b6ab202
Filter by 'approved:true' on the tags page (when a tag requires approval) (#6037)
* feat: we add the attribute for faceting

* feat: pass the requires_approval tag through with the dataset

* feat: if the tag requires approval then filter by the approved:true facet that we setup via algolia

* chore: false is redundant

* chore: robocop syntax improvement

* refactor: rename filters to tagFilters

* chore: standard javascript styleguide formatting

* chore: javascript styling

* Update app/assets/javascripts/initializers/initScrolling.js.erb

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

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-02-18 12:44:51 -06:00
rhymes
b05d14a851
Enable CORS preflight caching (#6153) [deploy] 2020-02-18 13:37:54 -05:00
Mac Siri
2c6fc937cd
Create greeter (#4727)
* [WIP] Create greeter

* Update greeter
2020-02-18 13:31:00 -05:00
Molly Struve
74118c2d1f
Setup ChatChannelMembership Index (#6152) [deploy] 2020-02-18 13:30:52 -05:00
Jacob Herrington
9fd55657d0
[docs] Add a maintainers document (#5938)
* Remove skip-ci article from docs

Skipping CI causes a hiccup in the PR merging and approval process.
Molly and I talked about this, and we probably need to revisit our
github process revolving around this, but since it is presently causing
an issue, it probably shouldn't be in the docs. We can always add it
back if we change our minds.

* Add a maintainers doc

This doc will give us a place to store information, like the discussion
that Molly and I had around skipping CI, so that anyone with Repo access
can find and contribute to how we run the project.
2020-02-18 12:13:55 -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
b8955f19fe
Add history as a reserved word (#6150) [deploy] 2020-02-18 11:55:00 -05:00