Commit graph

6706 commits

Author SHA1 Message Date
rhymes
ff0edc3540
[deploy] Remove draft articles with a duplicate canonical_url (#10138) 2020-09-04 13:40:53 -05:00
Joe Doss
31bedc2335
Install and enable jemalloc to help improve memory usage in Ruby. (#10195) 2020-09-04 13:31:03 -05:00
Nick Taylor
f0963c1bfa
Drag and drop an image in the editor (#10145)
* Refactored drag n drop functionality to a hook and component.

* Add the snackbar to the article editor.

* Now you can drag and drop images in the post body content.

* Cleaning up a few things.

* Now post cover images can be dragged and dropped.

* Removed unused empty function.

* Added @testing-library/preact-hooks so that we can test hooks.

* Some renaming, small refactor.

* Added tests

* Added more tests.

* Added more tests.

* Added message about dropping only one image in post body.

* Added message about dropping only one image for cover image.

* put onDrop into it's own meethod.

* More tests.

* Added some API documentation.

* Updated editor help with drag and drop image help.

* Changed wording.

* Now the alt text for markdown removes the file extension.

* Updated help wording. Thanks @rhymes

* Now the image markdown adds a new line at the end as we currently do not support inline images.
2020-09-04 14:12:59 -04:00
Molly Struve
2f36630ff0
Revert "Remove draft articles with duplicate feed source URL and cleanup invalid data (#10205)" (#10209)
This reverts commit 375f79099e.
2020-09-04 12:22:06 -05:00
rhymes
375f79099e
[deploy] Remove draft articles with duplicate feed source URL and cleanup invalid data (#10205) 2020-09-04 11:20:59 -05:00
Mac Siri
9e2207ab25
[deploy] Update JS sub-dependencies (#10207) 2020-09-04 11:46:17 -04:00
Josh Puetz
7ab262b205
Add OAuth callback configuration to facebook docs (#10041)
* Add OAuth callback configuration to facebook docs

* Add screenshots
2020-09-04 09:56:17 -05:00
Ben Halpern
b3f1e53ec7
[deploy] Add ga tracking to config (#10150)
* Add ga tracking to config

* Remove empty line

* Remove console.log

* Fix typo

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

* Add google tracking id example
2020-09-04 09:37:16 -04:00
Michael Kohl
27faf0a667
Add profiles controller (#10181)
# Conflicts:
#	config/routes.rb
2020-09-04 14:54:39 +02:00
Lisa Sy
b05c319c2f
Update nav menu in Notification to use crayons-link styling (#10196) [deploy]
* Move nav code into partials

* Update small styling with new nav menu
2020-09-03 17:32:44 -07:00
Ben Halpern
ee1af652c0
Don't include locale in service workers (#10198) 2020-09-03 17:54:01 -04:00
Molly Struve
70b5a3530c
[deploy] Optimization:Limit Column Select for Sticky Nav Articles (#10197) 2020-09-03 16:46:28 -05:00
Alex
2a5a933ed1
Add routes for i18n (#10193)
* Add routes

* Update all_routes spec

* Add i18n route specs

* Add docs

* Docs cleanup

* Add note about fragment caching
2020-09-03 17:11:07 -04:00
Mark Mead
8099a91611
Strip tags from short_summary (#10157) 2020-09-03 16:47:05 -04:00
Molly Struve
dcc43c0715
Optimization:Select Only Necessary Columns from Ahoy Messages For Digest Emails (#10194) 2020-09-03 16:46:33 -04:00
Vaidehi Joshi
d7d29c1bb2
[deploy] Move deletion of legacy cookie higher in omniauth callback (#10190)
* Move deletion of legacy cookie higher in omniauth callback

* Add specific date to hotfix TODO note

* Fix inverted logic that looked for wrong cookie domain
2020-09-03 16:17:34 -04:00
Molly Struve
d0d3c2a2ab
[deploy] Bug Fix:Sort Reactions by created_at (#10171) 2020-09-03 14:18:02 -05:00
Molly Struve
d6449cab26
[deploy] Bug Fix:Comment out content security policy (#10192) 2020-09-03 13:30:10 -05:00
Julianna Tetreault
31990b3d3b
Add Recent Reports to Users' Admin User Page (#10058) [deploy]
* Adds _reports partial and renders _reports.html.erb in /admin/users/edit.html.erb

* Adds a Recent Reports sections and a toggle function to /admin/users/_reports

* WIP: display feedback_messages in _reports.html.erb

* Adds #set_feedback_messages to Admin::Users::Controller and adjusts _reports.html.erb

* Adjusts #set_feedback_messages to look for message ids and adds to _reports.html.erb data

* Remove accidental dead code from Admin::Users::Controller

* Adjusts the else statement wording to be more fun

* Adjusts style of recent reports to mirror style of recent reactions

* Implement Admin UI changes to Recent Reports section of admin/users/:id/edit

* Adds a link to the admin_feedback_messages_path for each report in _reports.html.erb

* Adjusts the path used when a report is clicked on in _reports.html.erb

* Adds #user_types check to feedback_message.rb to determine Affected, Offender, or Reporter in _reports
2020-09-03 12:06:15 -06:00
rhymes
f49ca8909a
[deploy] Revert "Enable CSP in report only mode and use Honeybadger to track violations (#10155)" (#10191)
This reverts commit 1df3e96652.
2020-09-03 12:43:11 -05:00
Jacob Herrington
00c75d0bb2
Add sponsorships to seed data (#10189) 2020-09-03 13:34:00 -04:00
Molly Struve
636eddb1a9
[deploy] Optimization:Add Index for User ID and Mailer to Ahoy Messages (#10175) 2020-09-03 12:18:07 -05:00
rhymes
1df3e96652
[deploy] Enable CSP in report only mode and use Honeybadger to track violations (#10155) 2020-09-03 18:45:31 +02:00
Fernando Valverde
536b2c821c
Adds ability to create new sponsorships from admin dashboard (#10187)
* Adds create feature to the sponsorships admin dashboard

* Fixes spec
2020-09-03 10:10:37 -06:00
ludwiczakpawel
11831e72c1
Extending documentation... (#10156)
* textarea component

* docs / faq: add new follower

* credits

* lang

* moving copy higher

* typo

* Update docs/faqs.md typo

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Update docs/faqs.md lang

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Update docs/faqs.md lang

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Update docs/faqs.md

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Update docs/faqs.md

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Update docs/faqs.md

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Update docs/faqs.md

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Update docs/faqs.md

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Update docs/faqs.md

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Update app/javascript/article-form/components/Title.jsx

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Update docs/faqs.md

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Update docs/faqs.md

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Update docs/faqs.md

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Update docs/faqs.md

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-09-03 10:53:22 -04:00
Sven Efftinge
e990323997
[gitpod] updated node version (#10186) 2020-09-03 10:51:15 -04:00
ludwiczakpawel
74b398d876
New Profile Header (#10185)
* init

* profile header

* merge

* two headers

* centerd

* link fix

* remove comments

* whoops

* Fix specs

Co-authored-by: rhymes <rhymes@hey.com>
2020-09-03 16:47:01 +02:00
rhymes
ffd0ce790b
[deploy] Session cookie domain hotfix for login and logout (#10169)
* Session cookie domain hotfix for login and logout

* Add timefame for removal
2020-09-03 10:45:35 -04:00
Diogo Osório
4c53c59d96
[deploy] Fixes a duplicate page title on the /videos page (#10170)
* Fixes a duplicate page title on the /videos page

So the `app/views/videos/index.html.erb` was invoking the `#title`
helper method 3 times.

In each invocation the helper method was calling
`content_for(:title) { derived_title }`. Looking at the `content_for`
documentation
[here](9055156668/actionview/lib/action_view/helpers/capture_helper.rb (L117)),
you can find the following comment:

```
Note that <tt>content_for</tt> concatenates (default) the blocks it is given
for a particular identifier in order. For example:
```

Which basically meant that each time the helper got invoked, the title
was appended to the end of the existing title.

This commit fixes the issue by making sure that the `#title` helper is
only invoked once by the view.

* Empty commit, trigger the build
2020-09-03 16:07:11 +02:00
Anna Buianova
0e8f48b5e7
Fixed new redirects (#10184) 2020-09-03 09:44:10 -04:00
Michael Kohl
d284e597cd
[deploy] Add Profiles::Update service object (#9912)
* Add Profiles::Update service object

* Refactor

* Rename Profile.fields to Profile.attributes

* Keep sync from user -> profile

* And and update comments

* Rename Profile.refresh_store_accessors!

* Make forwarding getters in user dynamic

* Add more explanation

* Fix typo

* Update service object

* Fix return value

* Fix specs

* Travis, let's be friends again?

* Remove Travis change

* Add require_dependency in Profile

* Refactor

* More refactoring

* Avoid double sync

* Fix specs

* Fix mapped attributes sync
2020-09-03 09:19:25 -04:00
Rafi
8997e3407c
Vertical alignment of post title in notification (#10183) 2020-09-03 13:10:38 +02:00
Michael Kohl
adbdbb9789
Add ProfileFieldGroupsController to API (#10124) 2020-09-03 10:12:53 +07:00
Ben Halpern
11c7b148da
[deploy] Revert removal of unneeded eager load (if needed) (#10179) 2020-09-02 19:51:56 -05:00
Rafi
70abb8101b
Fixing broken jest test (#10162) 2020-09-02 20:02:27 -04:00
Ridhwana
c90cb2caf0
[deploy] Add display_area & show_in_onboarding to the profile setup ui (#10158) 2020-09-02 16:30:33 -05:00
Arit Amana
b79766f697
[deploy] [Admin Tooling] Allow admins unpublish articles from the Mod Actions Panel (#10038) 2020-09-02 16:08:08 -05:00
Ben Halpern
7f928555a5
[deploy] Remove unneeded eager load (#10168) 2020-09-02 16:43:41 -04:00
Molly Struve
83d44401f5
[deploy] Index Reaction created_at Timestamp (#10142) 2020-09-02 12:56:33 -05:00
Molly Struve
34593b7ec3
[deploy] Optimization:Select Article Columns for Digest Email, Limit 6, Use User Attributes (#10147) 2020-09-02 11:31:43 -05:00
Fernando Valverde
ada2d0c728
[deploy] Extracts DisplayAds from Administrate into admin (#10153)
* Extracts DisplayAds from Administrate into admin

* Suggested changes
2020-09-02 09:28:22 -06:00
Josh Puetz
f82ea80fcf
Attempt to fix facebook login (#10152) [deploy]
* Attempt to fix facebook login

* Use token parse in the setup lambda
2020-09-02 10:02:32 -05:00
Andrew Bone
a6d01f3215
Hide overflow text (#10159)
Hide overflow text caused be unbreakable words and urls (notification-comment-reacted-link)
2020-09-02 16:22:07 +02:00
Ridhwana
3474ffda6d
Profile Admin updates (#10133)
* feat: cater for when there are no profile fields in a group

* feat: add a modal to create a new group

* feat: add a controller and route for the group

* refactor: add group modal

* feat: edit a group

* chore: remove an instance var

* chore: toggle the section using a toggle button

* feat: add the edit button

* chore: update the messaging

* chore: update the class name

* feat: delete the group

* chore: add some css

* chore: use group_name

* chore: rename the file and add the group select to the file

* feat: render the correct partial and add the profile_field_group_id

* feat: add a profile field

* feat: amend the styles on the card header

* feat: add a cursor pointer

* feat: get the form to redirect after an update

* chore:  remove style

* feat: order by created at so that each time we save the order doesn't change

* fix: change the form

* chore: format the options

* feat: show ungrouped fields at the bottom

* feat: add the profile fields length

* chore: remove unused action

* test: add some specs for profile group workflow

* fix: oops

* refactor: grouped profile fields

* refactor: amend the styles

* chore: rename methods

* chore: update headings

* chore: remove changes from my linter

* refactor: suggestions by Michael - upgrade ternary

* refactor: order by name and label
2020-09-02 12:32:25 +02:00
Michael Kohl
f023c6174f
[deploy] Add data update script for profile fields (#10119) 2020-09-02 09:54:04 +07:00
Ben Halpern
0efcc7f47f
[deploy] Add initial content security policy into codebase (to avoid reliance on edge configuration) (#10144)
* Initial secure header functionality

* Add unsafe-inline to csp

* Secure cookies

* Add connect-src

* Only run secure header config in prod (for now)

* Change prod check to within default

* Change from secure_headers to rails config

* Wrap behind production check
2020-09-01 20:32:13 -04:00
Molly Struve
b60c6c687c
Flaky Spec Fix:(Attempt)Ensure Article Suggester Count is Consistent (#10146) 2020-09-01 20:27:46 -04:00
Molly Struve
5657067e55
[deploy] Revert "Migrate ProfileImage to Images::Profile (#10055)" (#10149)
This reverts commit ab81f36a38.
2020-09-01 18:28:58 -05:00
Mac Siri
23cee97d0a
Fix Flaky Runkit system spec (#10148) 2020-09-01 19:22:12 -04:00
Mac Siri
ab81f36a38
[deploy] Migrate ProfileImage to Images::Profile (#10055) 2020-09-01 17:16:03 -04:00