Commit graph

6596 commits

Author SHA1 Message Date
Molly Struve
4786cbddfc
[deploy] Optimization:Dont Send Multiple Digest Emails in a Day (#10042) 2020-08-28 12:25:32 -05:00
rhymes
c9e401758a
[deploy] Add dependent clauses to Article and fix Comment validation (#9990)
* Add dependent clauses to Article model

* Comment should be valid without a commentable

* Add cleanup scripts

* Cache the comments ids before destroying the article

* Add dependent clause to Article.user_subscriptions as well

* Fix specs
2020-08-28 18:24:28 +02:00
Ben Halpern
239629c1de
[deploy] Grant admin permissions through the UI (part 1) (#9656)
* Grant permissions through the UI

* Update app/services/moderator/manage_activity_and_roles.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Make roles into constants

* Swap internal and admin

* Improve UI, remove hack

* Fix link

* Remove unused internal file

* Modify registrations controller

* A bit of progress

* More work

* a bit pf progress on confirmation emails

* Get basic functionality in place

* Remove comments

* First basic test

* Add tests

* Fix code styles

* Remove sessions spec

* Remove sessions spec

* Remove extra markup

* Fix base role

* Add Resource Admin Config

* Fix indentation issue

Co-authored-by: Michael Kohl <citizen428@dev.to>
2020-08-28 11:57:06 -04:00
Nick Taylor
1d5163131b
Revert "Added pragmaFrag so terse Fragment syntax,<></>, can be used in Preact. (#9051)" (#10050) 2020-08-28 10:17:37 -04:00
rhymes
cd65273571
Use explicit name for Preact fragments (#10049) 2020-08-28 10:01:17 -04:00
rhymes
fee66f104e
[deploy] Delete cookie correctly by specifying the domain (#10052) 2020-08-28 15:50:28 +02:00
Ben Halpern
0dd04ea45a
Create initial "register by email and password" beta/MVP in prep for "setup mode" (#10039)
* Modify registrations controller

* A bit of progress

* More work

* a bit pf progress on confirmation emails

* Get basic functionality in place

* Remove comments

* First basic test

* Add tests

* Fix code styles

* Remove sessions spec

* Remove sessions spec

* Remove extra markup
2020-08-28 09:46:56 -04:00
Michael Kohl
6c2357af48
Fix seeds.rb (#10047) 2020-08-28 14:34:43 +02:00
Fernando Valverde
9da71a47c7
[deploy] Introduces Runtime class for standardized & other native cleanup + replace podcast GA with ahoy (#10026) 2020-08-28 05:52:04 -06:00
Molly Struve
cd1db855b6
[deploy] Optimization:Break Send User Digest Emails in Single Jobs (#10043) 2020-08-28 06:37:27 -05:00
Michael Kohl
161ed7d55e
[deploy] Introduce ProfileFieldGroup model (#10007)
* Introduce ProfileFieldGroup model

* Make profile_fields_groups name column unique

* Fix some specs

* feat: allow the page to work again

* Add guard clause to data update script

* Remove unused file

* Fix specs

* Add foreign key

Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
2020-08-28 10:51:33 +07:00
Molly Struve
a7928838f4
[deploy] Optimization:Break Github Repo Updates into Individual Sidekiq Jobs (#10040) 2020-08-27 16:01:36 -05:00
Ben Halpern
f999b5fcdc
[deploy] Delete all cookies when signing out (#10036) 2020-08-27 11:16:32 -04:00
rhymes
56f1f2d777
[deploy] Set UserSubscription sourceable columns to nullable (#10033)
* Set UserSubscription sourceable columns to nullable

* Fix spec
2020-08-27 16:25:48 +02:00
Jens Genberg
2e6d081243
[deploy] Change branding preview text (#9798)
* Change branding preview text from DEV to FOREM

* Refer to preview logo file with inline_svg_tag instead

* Change branding preview to seedling logo

* Make preview logo file more generic
2020-08-27 09:01:34 -04:00
Ben Halpern
fe0e5fe1d2
[deploy] Adjust score a little bit more (#10034) 2020-08-27 07:21:44 -04:00
Ben Halpern
d23477ee51
[deploy] Final final algo fiddle for the day (#10031) 2020-08-26 20:01:51 -04:00
Jacob Herrington
5496ac5b83
Make confirmation text a required field (#10014)
* Make confirmation text a required field

* Use strong params to check if confirmation param is present

* Require config confirmation text to match pattern
2020-08-26 19:59:41 -04:00
Molly Struve
c2f2a02676
Bug Fix:Dont Kill Entire Job When User is Missing a Github Identity (#10030) 2020-08-26 19:58:46 -04:00
Josh Puetz
b9010ec0b1
Add facebook page to Backend Guide index (#10027) [deploy] 2020-08-26 17:04:48 -05:00
Nick Taylor
6f86573dbf
Removed the autoprefixer-rails deprecated gem (#10017)
Co-authored-by: Mac Siri <krairit.siri@gmail.com>
2020-08-26 17:38:24 -04:00
Molly Struve
268d2fc144
[deploy] Optimization:Default Production Logging to Error (#10025) 2020-08-26 16:15:29 -05:00
Ben Halpern
6d8899c131
[deploy] Final fiddling (#10024) 2020-08-26 14:37:42 -04:00
Ben Halpern
c06c53adfe
[deploy] Last algo fiddle I hope (#10023) 2020-08-26 14:00:23 -04:00
Ben Halpern
98f537521a
[deploy] More fiddling with algo score (#10022) 2020-08-26 13:22:49 -04:00
Ben Halpern
1336d8c439
[deploy] Adjust ranking algo, including max score impact (#10020) 2020-08-26 12:36:07 -04:00
Jacob Herrington
2c645c9ace
Allow greater flexibility for footer mascot image (#10004)
* Allow greater flexibility for footer mascot image

This change allows admins to set a footer mascot image of any dimension
and manage the forced dimensions in their site config options.

* Update site config copy based on PR feedback
2020-08-26 12:33:52 -04:00
Josh Puetz
d47d02f090
[deploy] Log in with Facebook (#9922)
* First draft of facebook auth

* Add Facebook welcome broadcast to seeds, data script

* Tests!

* Documentation

* Update docs with pictures

* User siteconfig/app config

* Adjust dropdown menu width to avoid wrap for Facebook button

* Add Facebook auth keys to SiteConfig properly

* Remove unnecessary VCR cassette

* Add omniauth facebook gem to vendor cache

* Use uid instead of email for nickname randomization

* Test fix, test for missing email in Facebook

* Update docs/backend/auth-facebook.md

Co-authored-by: Molly Struve <mollylbs@gmail.com>

* Typo fix!

* Don't default facebook auth settings to ApplicationConfig

Co-authored-by: Molly Struve <mollylbs@gmail.com>
2020-08-26 12:04:20 -04:00
Ben Halpern
14e85493c1
[deploy] Fiddle with hotness score calc (#10019) 2020-08-26 11:18:53 -04:00
Ben Halpern
bd6a996bce
[deploy] Remove AWS SDK and private endpoints completely (#9978)
* Initial work to remove aws_sdk

* More work

* Add tests

* Typos and cleanup

* Fixed typo and misc

* Fix test typos

* Update spec

* Remove functioncaller code

* Add comment to bump tests :)

* Fix spaminess calc
2020-08-26 10:30:31 -04:00
Mac Siri
bed641f6aa
Refactor optimizer_spec (#10002) 2020-08-26 09:52:22 -04:00
Andrew Bone
3174058aa6
Add comments-dedicated-page-container class (#10012)
Patch for #9991
2020-08-26 09:48:17 -04:00
Nick Taylor
08269fb704
Fixed accessibilty issue with empty link on featured post. (#10005) 2020-08-26 09:17:32 -04:00
Jacob Herrington
bd78ba4c2c
[deploy] Add missing configs controller params for rate limiting (#10003) 2020-08-26 07:00:50 -05:00
Ridhwana
d71698317c
chore: change the notice styling (#10010) 2020-08-26 12:21:29 +02:00
ludwiczakpawel
503b1e3be6
Remove dimmed buttons on feed (#9894)
* flare tag line height

* .

* dropdown fix + actions bar fix

* actions bar on mob

* fix
2020-08-26 08:08:31 +02:00
Joe Doss
6fa954c9d0
Add FOREM_BUILD_SHA and FOREM_BUILD_DATE to the container. (#9999)
In the past it was always useful to have meta data within regards to the SHA and
build date/time. This adds in two new env vars that are written to disk as flat
files and then exported to environment variables when the container starts up.

This motivation comes from this comment:

https://github.com/forem/forem/pull/9987#discussion_r476123829
2020-08-25 18:19:04 -05:00
ludwiczakpawel
3e10e0a5a2
fix (#9966) 2020-08-25 16:55:09 -04:00
Mac Siri
b5be5990e4
[deploy] Expand Images::Optimizer to support imgproxy (#9909)
* Create _comment.html.erb spec

* Add imgproxy.rb

* Setup imgproxy MVP

* Expand Images::Optimizer to support imgproxy

* Enable imgproxy in dashboards/show WIP

* Create view spec

* Fix typo

* Also check for Imgproxy.config.endpoint

* Use ApplicationConfig instead of ENV

* Update Images::Optimizer#call
2020-08-25 16:00:40 -04:00
Molly Struve
b23374e737
[deploy] Revert "Refactor:Move RssReader Fetch Article task to Sidekiq (#9976)" (#9998) 2020-08-25 14:57:33 -05:00
Jacob Herrington
e7641b87d6
Fix a typo caused by markdown (#9995) 2020-08-25 15:41:59 -04:00
Molly Struve
ff06454151
[deploy] Refactor:Move RssReader Fetch Article task to Sidekiq (#9976) 2020-08-25 13:47:13 -05:00
rhymes
36358293ce
[deploy] Add foreign keys to models related to Organization (#9933)
* Add foreign keys to models related to Organization

* Fix specs

* Use on_delete: :cascade for listings -> organizations FK
2020-08-25 20:20:47 +02:00
Ben Halpern
45fb6504dc
[deploy] Replace HEROKU_SLUG_COMMIT with custom footprint (naive) (#9904)
* Replace HEROKU_SLUG_COMMIT with custom footprint (naive)

* Fully set RELEASE_FOOTPRINT with the expectation of setting it before launch

* Change tests

* Fix cache
2020-08-25 13:47:14 -04:00
Molly Struve
0947256f13
[deploy] Refactor:Fetch New Github Repos From Sidekiq Cron (#9986) 2020-08-25 12:42:33 -05:00
Julianna Tetreault
24a3b50d4a
Add the Ability to Remove Badge Achievements From Users (#9896) [deploy]
* Moves badge_achievement-related code from /admin/bagdes to /admin/badge_achievements
  - Adds an Admin::BadgeAchievements::Controller
  - Moves #award and #award_badges to Admin::BadgeAchievements::Controller
  - Removes #award and #award_badges from Admin::Badges::Controller
  - Moves award.html.erb from /admin/badges to /admin/badge_achievements
  - Removes badge_achievement routes from /admin/badges
  - Adds a redirect for /admin/badges/badge_achievements to routes.rb
  - Cleans up and refactors code in controllers, views, and routes

* Add more actions to Admin::BadgeAchievements::Controller and matching routes
  - Adds an #index and #destory action to the BadgeAchievements::Controller
  - Adds destroy to the badge_achievements routes
  - Adjusts redirects for badge_achievements in routes.rb
  - Removes dead code from the index view for Badges
  - Refactors the existing code in the index view for BadgeAchievements

* Adds an /admin/badge_achievements_spec and cleans up the /admin/badges_spec
  - Removes the badge_achievement-related tests from badges_spec.rb
  - Adds an additional test around deleting badge_achievements

* Add pagination to badge_achievements index view

* Adds badge_achievements to Admin menu items and add comment to routes.rb
  -Add badge_achievements to the Admin nav bar
  -Add a comment regarding redirects for badge_achievements

* Resolve JS console stacktrace notices and change wording on deletion buttons

* Add a Back to Badge Achievements button to the badge award form

* Adjust styling to fix failing /admin/badges_spec.rb

* Uses SQL paging to optimize scalibility and adds search functionality to index.html.erb
  - Use SQL paging in Admin::BadgeAchievements::Controller in #index and #award
  - Add a search by user ID to Badge Achievements index view
  - Add a limit of 15 badges to be shown on the Badge Achievement index view
  - Add a User ID column to the Badge Achievement index view

* Add Award Badge button back to Badge Achievement index.html.erb

* Change @badge to be more explicit and reword warning around badge deletion

* Adds award badge button back, rewords success message, and adjusts SQL paging
2020-08-25 11:14:47 -06:00
Ridhwana
b0bacf60fb
Profile Fields Admin UI v2 (#9830)
* feat: add a select and a new text field

* feat: groups need to be unique and present

* feat: make the ui a little better

* chore: update the label

* chore: just present

* feat: add some js ( still a work in progress)

* feat: update the interface to work better :)

* chore: indent

* feat: make sure the toggles work

* chore: rename more aptly

* refactor: toggling pulled out into two functions

* refactor: move group form to a partial so that we can reuse it

* chore: move the js to the group form

* chore: update alignment and nav element

* chore: update text

* chore: update specs
2020-08-25 17:39:12 +02:00
Michael Odusanya
5f45f5ed0e
Fixed save button behavior (#9238)
* Fixed save button, but it's slow to update when clicking unsave

* Update app/javascript/articles/components/SaveButton.jsx

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* Update app/javascript/articles/components/SaveButton.jsx

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* Update app/javascript/articles/components/SaveButton.jsx

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* I added the suggested changes but the issue still persists

* Added tests.

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
Co-authored-by: Nick Taylor <nick@dev.to>
2020-08-25 11:23:30 -04:00
Joe Doss
4e1fc4755b
Export RELEASE_FOOTPRINT on container start. (#9987)
RELEASE_FOOTPRINT will be set to the output of date -u +'%Y-%m-%dT%H:%M:%SZ'
(2020-08-25T02:02:21Z for example) which will fix https://github.com/forem/forem/pull/9904

This will be reset to a new date and time string every time the container starts.
2020-08-25 11:06:53 -04:00
Brunno Souza
7f64e38caa
Remove method not used at artciles controller (#9877) 2020-08-25 09:47:32 +02:00