Commit graph

2222 commits

Author SHA1 Message Date
n martin
bae898ed1a
Show canonical URL on article even after it has been updated (#11256)
* Show canonical URL on article even after it has been updated

* Refactor canonical URL fix

* Clean up canonical URL code

* Clean up canonical URL code
2020-11-10 13:30:21 +01:00
Michael Kohl
824e9a13cb
Add service generator (#11265)
* Add service generator

* Finalize service generator

* Add documentation

* Explicitly require rails/generators

* Update Zeitwerk initializer

* Remove explicit require

* Update docs/backend/service-objects.md

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2020-11-10 09:09:35 +07:00
Molly Struve
a0c174fcb7
Refactor:Remove more_experience_level_weight_experiment From Feed Tests (#11340) 2020-11-09 13:59:59 -06:00
Molly Struve
b3ed84e68c
Comment Out Flaky Onboarding Spec (#11341) 2020-11-09 08:54:44 -06:00
Krzysztof Rybka
d6956180ad
Return video_source_url in API V0 Videos index (#11040) 2020-11-09 06:27:28 +01:00
Michael Kohl
d64943958d
Prepare for profile column drop (#11246)
* Add new display area for settings only fields

* Update CSV importer

* Prepare for dropping profile columns from user

* Update spec

* Don't migrate nil values

* Update spec

* Update forem:setup task
2020-11-09 10:17:39 +07:00
Arit Amana
08796b5cee
[Team Email Login] Refactor Authentication Provider Enable/Disable (#11185)
* Starting out

* Building away...

* Hooking buttons up

* Hook Auth Provider buttons to Array Field

* trying to fix NoNameError

* Remains InviteOnlyMode disable and tests

* Smashing remaining tasks

* Last of tasks

* add tests

* Complete specs and tests 😅

* Fix bug

* Additional guard

* pass event to functions

* Position Email Auth first

* Fix bug in Email Auth Modal

* Fix spacing issue

* Update docs for adminModal.js

* Show/hide Enabled Indicator with Enable/Undo buttons

* Complete Auth Providers functionality

* Update app/javascript/admin/controllers/config_controller.js

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

* Update app/javascript/admin/controllers/config_controller.js

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

* Update app/controllers/admin/configs_controller.rb

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

* Update helper names

* better implementation of EnabledIndicator show/hide

* Small copy changes

* Update spec/helpers/authentication_helper_spec.rb

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

* Update app/views/admin/configs/show.html.erb

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

* Update app/helpers/authentication_helper.rb

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

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-11-06 18:19:34 -05:00
Jacob Herrington
0b8f28e1c8
Render op markers for coauthors (#11294) 2020-11-06 12:01:16 -06:00
Rafi
47be7ea322
Fixing missing category in listing modal (#11301) 2020-11-06 12:29:20 -05:00
Vaidehi Joshi
97d5bc47b6
Use OPENRESTY_URL over protocol + domain (#11289)
* Use OPENRESTY_URL over protocol + domain

* Prefer OpenResty over Openresty
2020-11-06 08:58:59 -08:00
Fernando Valverde
f11523f29a
Makes Runtime.js detect the generalized ForemWebView User Agent (#11288)
* Makes Runtime.js detect the generalized ForemWebView User Agent extension

* Adds tests
2020-11-05 14:18:17 -06:00
Andy Zhao
a8c3ff8c5a
Add trusted role to new tag moderators (#11242)
* Don't add to mailchimp for N/A circumstance

* Use class << self over self. methods

* Refactor and make add/remove tag mod idempotent

* Add missing param wiki_body_markdown

* Add errors_as_sentence b/c Tag not inheriting from AppRecord

* Refactor and Crayonsify tag page

* Use proper for attr to make label checkable

* Crayonsify moderator section

* Make placeholder white

* Remove remote: false for sync form submit

* Fix more merge conflicts

* Minor styling adjustments

* Fix color field value

* Don't add to Mailchimp community mod list if not enabled

* Add tests for new tag mod routes

* Add missing line oops

* Use self.method over class << self for new Rubyists

* Use more efficient query for getting tag mods

* Use parentheses to follow convention

* Use cleaner way of routing and controller

* Update tests to match new configuration
2020-11-05 10:36:26 -05:00
Rafi
01725d9344
Fixing date in listing modal (#11260)
* Fixing date in listing modal

* Adding test

* Fixing test message
2020-11-05 08:09:43 +01:00
Molly Struve
c125ef1dbe
Comment out Flaky Onboarding spec (#11277)
* Comment out Flaky Onboarding spec

* comment out one more onboarding spec
2020-11-04 15:17:44 -06:00
Vaidehi Joshi
6d1aada37b
Conditionally hide onboarding task card (#11259)
* Hide onboarding task card on feed if user hasn't completed onboarding

* Fix some typos, use consistent capitalization

* Remove unnecessary saw_onboarding: true from test users

* Use predicate method for saw_onboarding?
2020-11-04 11:04:34 -08:00
Lisa Sy
f9e18291eb
[Crayons] Update comments card in Profile (#11199)
* Update comments card in Profile

* Remove avatar and name
2020-11-04 10:45:17 -08:00
Josh Puetz
542ee58ab8
Rate Limit Modal - Comments (#11102)
* Non-preact modal

* Some cleanup

* Toggle modal on navigation

* Use rate limit modal on comments page

* Added JSdocs

* Remove explanation link

* Comment rate limit test

* Tests and method renaming
2020-11-03 15:49:20 -06:00
Andy Zhao
d511ea6b30
Add expectation to ensure on edit comment page (#11254) 2020-11-03 11:57:21 -05:00
Molly Struve
a741dceace
Refactor:Implement Carrierwave Monkeypatch in all Envs (#11233)
* Refactor:Implement Carrierwave Monkeypatch for all Envs

* add a spec for monkey patch
2020-11-03 10:51:53 -06:00
Mac Siri
16c3ccb955
Replace SimpleIDN usage with Addressable (#11238) 2020-11-03 08:55:31 -05:00
rhymes
47624ddfcd
Add users param to Feeds::Import (#11234)
* Add users param to Feeds::Import

* Fix init and specs

* Replace explicit nil check

Co-authored-by: Michael Kohl <me@citizen428.net>

Co-authored-by: Michael Kohl <me@citizen428.net>
2020-11-03 07:02:17 -06:00
Christopher Wray
9e439fcf6e
Fix Bug: Series index page showing series with 0 articles -#9658 (#11227)
* added join to index collections controller

* + collections test to not show empty series
2020-11-03 09:10:46 +01:00
Julianna Tetreault
aa7ef577cb
Adds a Default Color Hex Value to the Admin Tags Color Field (#11105) [deploy]
* Adds a default color hex value to the /admin/tags/show color picker

* Rebased against color-picker changes and adds default color to edit.html.erb

* Adds a system spec for admin/tags and adjusts the filename for admin_creates_new_page_spec

* Uses .blank? in place of .nil? in admin/tags/show.html.erb

* Refactors test in admin_updates_tag_spec.rb
2020-11-02 12:50:03 -07:00
Molly Struve
1852ff55bf
Refactor:Show Same Number of Articles for all Envs (#11197) 2020-11-02 10:39:38 -06:00
Wouter van Marrum
9946ac221a
Added form fields for the admin podcasts dashboard. (#10517)
* Added form fields for the admin podcasts dashboard.

* Updated podcasts_controller.rb; Added parameters to the allowed params.
Updated edit.html.erb; Removed duplicated field.
Updated podcasts_spec.rb; Updated test.

* Fixed a typo.

* Refactored test which hopefully fixes the build

* Added missing comma.

* Added file fixture uploads.

* Fixed a typo.

* Update spec/requests/admin/podcasts_spec.rb

Co-authored-by: Fernando Valverde <fernando@visualcosita.com>

* Again fixed another typo.

* And again fixed another typo.

* Fixed merge conflicts.

Co-authored-by: Fernando Valverde <fernando@visualcosita.com>
Co-authored-by: rhymes <rhymes@hey.com>
2020-11-02 17:19:39 +01:00
Krzysztof Rybka
20a19daa67
Copy username to search_fields (#11045)
* Copy username to search_fields

* Add test for searching by a username

* Add data update script for reindexing users for username search

* Comment out ReindexUsersForProfiles update script

Co-authored-by: rhymes <rhymes@hey.com>
2020-11-02 08:38:15 -06:00
Molly Struve
fbc569b50c
Optimization:Speed Up Notifications Spec By Combining Assertions (#11200) 2020-11-02 07:56:23 -06:00
Simon Fish
77285ee9af
Add mailer previews for Devise mailer (#10890)
* Add mailer previews for Devise mailer

Issue #10575

* Don't use short module syntax, move file to correct place
Issue #10575

* Fix Devise::Mailer previews

* Separate DeviseInvitable mailers

Co-authored-by: rhymes <rhymes@hey.com>
2020-11-02 09:10:00 +01:00
Michael Kohl
7b6c5b60c1
Add feature flag for profile admin section (#11149)
* Add feature flag for profile admin section

* Fix spec description

* Also remove profile admin link from sidebar

* Disable profile admin routes based on feature flag

* Minor fixes

* Remove unnecessary object from spec

* Refactor AdminHelper

* Fix specs

* Fix remaining specs
2020-11-02 08:48:18 +07:00
Molly Struve
8578fdc358
Spec Fix:Remove Extra Space From Single Number Dates in Spec (#11225) 2020-11-01 18:04:51 -06:00
Molly Struve
9cf92d1a9e
Refactor:Remove Unused BufferedArticles Controller (#11193) 2020-10-30 15:24:02 -05:00
Spencer
c0168df2a8
API: Endpoint to get an organization's details (#10931)
* add organizations api request spec

* add organizations api controller

* add organizations api show route

* add show jbuilder file

* fix merge conflict on routes

* add organization show to api docs

* update created_at to iso format

* api docs add format field/cleanup
2020-10-30 16:22:30 -04:00
Molly Struve
ca3452f044
Refactor:Remove Production Conditional for Page View Updates (#11164) 2020-10-30 13:32:54 -05:00
Alex
cb6781740f
[deploy] Update site config defaults (#11172)
* Update site config defaultss with specs

* Add missing .freeze

* Fix specs
2020-10-30 13:40:09 -04:00
Lisa Sy
3a50ae1b4f
[Crayons] Update tag page header (#11130) [deploy]
* Update tag page header

* Update small fixes

* Make small edits

* Update header layout

* Use "opacity-50" instead of part of a component

* Bringing back `p` since we're stripping other tags anyway :)

* Update to test to match new header

* Update test

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>
Co-authored-by: Zhao-Andy <17884966+Zhao-Andy@users.noreply.github.com>
2020-10-30 10:24:11 -07:00
Julianna Tetreault
038385e4f8
[deploy] Mark Posts as Published in Admin Articles (#11142)
* Refactors #update in Admin::ArticlesController and articles_spec.rb
  - Adds article.update to #update in the controller
  - Shifts the update of co_author_ids further down in #update
  - Adds additional tests to articles_spec.rb
  - Refactors existing tests in articles_spec.rb

* Adds a gaurd clause to Admin::ArticlesController and refactors specs

* Removes ! from article creation in articles_spec.rb
2020-10-30 10:39:31 -04:00
rhymes
51a4a35448
Add Feeds::Import service class (#10998)
* Add the parallel gem

* Add prototype version of Feeds::Import with parallel URL fetching and parsing

* Tune Feeds::Import and add rake task for local tests

* Add rough measurer tool

* Add specs

* Apply suggestions by @citizen428

* Replace silence with silent

* No need for eager loading

* Add temporary Articles::DevFeedsImportWorker

* Remove temporary rake task

* Add basic error handling, copied from RssReader

* Fix error handling

* Remove temporary measuring rake task

* Remove logging added for development purposes

* Add info and error logging on error level
2020-10-30 15:01:44 +01:00
Michael Kohl
32f2b2d58f
Automatically mark tag supported when adding mod (#11151)
* Automatically mark tag a supported when adding mod

* Add data update script
2020-10-30 09:46:10 -04:00
rhymes
caad342033
Small Rubocop fixes (#11182) 2020-10-30 14:45:55 +01:00
Rafal Trojanowski
4bc8b80a90
Introduce tweet_timeline liquid tag (#7605) (#10825) 2020-10-30 11:03:40 +01:00
ludwiczakpawel
5d3691bcc5
Notifications redesign (#11084)
* notifications

* fix

* .

* REVERT

* .

* drop ccss

* REVERT

* specs

* drop colons

* fixse

* fix

* spec 1

* eh

* Fix notification specs

Co-authored-by: Molly Struve <mollylbs@gmail.com>
2020-10-29 20:38:17 +01:00
Julianna Tetreault
6f4e600a4e
Refactor Admin Events Index (#11103) [deploy]
* Adds new and edit views for events and removes them from the index view

* Fixes formatting issues in /admin/pages/index.html.erb

* Refactors /admin/events partial, new, and edit forms

* Updates admin_events routes to include all routes except destroy

* Refactors Admin::EventsController and adds #new and #edit actions

* specs: Adjusts admin_creates_new_event_spec to work with /admin/event changes

* Refactors the Admin::EventsController, routes, and events index even further
  - Adds back placeholder text in Events form
  - Removes unnecessary code from controller
  - Reverts changes to routes
  - Adjusts event_cover_image size on index.html.erb

* specs: Adds tests around creating and updating events to events_spec

* Adds pagination to Admin::EventsController #index to cap events at 20 per page

* Removes .all from Admin::EventsController and adds a line to index.html.erb

* Uses crayons classes for _event_form.html.erb
2020-10-29 10:11:15 -06:00
Alex
94cd9e246f
[deploy] Add default for main_social_image (#11126)
* Add default for main_social_image

* Fix image URL and add spec

* Fix spec

* Move image_url helper into image module

* Fix typo in comment

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

* Change URL helper logic

* Try something else

* Use ApplicationConfig

* Refactor

* Try again

* Try again with another approach

* Add specs for URL.local_image

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-10-29 10:07:14 -04:00
Mac Siri
540bc1fd84
[deploy] Add Imgproxy docs (#11104)
Co-authored-by: Molly Struve <mollylbs@gmail.com>
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-10-29 09:03:55 -04:00
Molly Struve
f97c822570
[deploy] Refactor: Run Display Ad Events Controller in all Envs (#11144) 2020-10-28 17:15:43 -05:00
Jacob Herrington
8f5954aeb8
[deploy] Improve error messages and validation for admin pages (#11141)
* Improve error messages and validation for pages

This could probably be cleaner, but I wanted to avoid changing behavior,
so there is a bit of redundancy.

In this commit, I also had to convert an if statement to a case
statement for Rubocop.

* Add system spec for editing pages

* Use errors_as_sentence
2020-10-28 13:54:38 -05:00
Mac Siri
8ba2c03360
[deploy] Encode domain name in pusher channels (#11136)
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-10-28 14:52:38 -04:00
Arit Amana
1912ffdc46
[Team Email Login] Refactor the Email Authentication flow (#11090)
* Hooked "Enable" button to hidden checkbox

* Hooked "Close" button to close email settings and show "Enable/Edit" button

* Additional hookups

* Start building generalized Modal blocks

* Everything hooked up except styling and a few Qs

* last of the hookups; ensure logic flow

* clean up

* specs to cover email auth refactor

* Fix bug surfaced by Vaidehi

* Incorporate PR feedback

* prevent email auth disable if invite-only-mode

* adjust emailAuthModal body text

* Sundry improvements

* Last-mile tweaks

* Trying to get 3rd party auth deselect to work

* delete unnecssary function

* remove superfluous comment

* Move inline styling into CSS file

* Incorporate PR feedback

* Incorporate more PR feedback

* Make Confirm btn intent clearer

* Add TODO comment
2020-10-28 13:37:11 -04:00
y yam
fc22e2c4ae
Add admin config to always show manually selected users on "Suggested people to follow" list (#10917) [deploy]
* Fix missing spaces in description of suggested_users

* Add config to use suggested_users instead of auto-generated suggestions

* Improve determine_follow_suggestions method

* Update app/lib/constants/site_config.rb

Improve the wording of the description of prefer_manual_suggested_users

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

* Apply new style to prefer_manual_suggested_users checkbox

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-10-28 10:36:49 -07:00
Ben Halpern
531f26bad6
Add admin shortcut to tag page (#11092)
* Add admin shortcut to tag page

* Fix spec

* Add more check

* Change admin location
2020-10-28 12:19:21 -04:00