Commit graph

6909 commits

Author SHA1 Message Date
Julianna Tetreault
8a01ed6a2c
Removes second_user_id and third_user_id From the Articles Table (#10383) [deploy]
* Removes second_user_id and third_user_id from the Articles table

* Adds updated schema file to (fingers crossed) resolve Travis failure

* Adds gaurd clause to data_update script to mitigate db issues
2020-10-02 13:14:32 -06:00
rhymes
aa39a1f801
Update CODEOWNERS to remove old teams (#10538) 2020-10-02 12:20:29 -04:00
rhymes
c0c1b0fd71
Rename misspelled spec file (#10537) 2020-10-02 17:25:22 +02:00
Ridhwana
21389ab05d
Admin Panel for Configurable Navigational Links (#9444) 2020-10-02 11:11:21 -04:00
Julianna Tetreault
c87974b7ac
[deploy] Add co_author_ids to Articles (#10339)
* Replaces second_user_id and third_user_id with co_author_ids on the Articles table

* Adjusts migration that adds co_author_ids to also add array: true

* Replaces second_user_id and third_user_id with co_author_ids in all applicable files
  - Use co_author_ids in _individual_article view
  - Use co_author_ids in articles and stories controllers
  - Use co_author_ids in article and podcast_episode models
  - Use co_author_ids in article_dashboard
  - Use co_author_ids in comments_helper
  - Use co_author_ids in articles_spec

* Replaces second_user_id and third_user_id with co_author_ids in article.rb model

* Remove unused #assign_co_authors method from the Stories::Controller

* Add #co_authors and #co_author_name_and_path to article_decorator.rb

* Adds a descriptive form field for co_author_ids for Admins in /admin/articles

* Adds a conditional in article/show.html.erb to render co_author names on an Article in a human-readable way

* Replaces get_co_author_name_and_path with proper method name, co_author_name_and_path in show.html.erb

* Adds latest schema to (hopefully) resolve Travis conflicts

* Adds the safe operator to show.html.erb

* Adjusts articles_spec.rb to use an array in the first test

* Replaces unless &.empty? with if ./present? in articles/show.html.erb

* Replaces second_user_id with co_author_ids in stories_show_spec.rb test

* Replaces elsif with else in articles/show.html.erb

* Cleans up show.html.erb by removing conditional in favor of decorator method

* Refactors splitting of params in Articles::Controller and optimizes query in #co_authors

* Reverts removal of second_user_id and third_user_id and migration file

* Adds a data_update script to update co_author_ids with existing second and third user_ids

* Adds validations to co_authors and flash_messages to indicate whether an update was successful or not
  - Adds to methods to article.rb to validate the IDs of co_authors and authors
  - Adds flash messages to the Admin::Articles::Controller and a redirect to the show page
  - Removes the JS highlighting upon submit when updating an Article in Admin
  - Refactors #update action in Admin::Articles::Controller

* Adds tests to article_spec.rb around co_author_id validations in article.rb

* Adjusts #validate_co_authors_must_not_be_the_same to use .include? instead

* Uses Field::Select.with_options in article_dashboard.rb to properly display co_author_ids

* Reverts removal of assigning co_author_ids in the Stories::Controller

* Adjusts error message and adjusts return logic in article.rb (thanks, Fernando!)

* Fixes failing article_spec.rb test that checks for co_author_ids uniqueness

* Adds a default array to co_author_ids and checks if they are .blank?

* Refactor data_update script to use a single SQL statement (thank you, Michael)

* Preserve array order of co_author_ids in article_decorator.rb

* Add db file for default: []

* Add validation to fix bug related to text inputs and invalid users when adding co_authors

* Adds tests to ensure that co_author_ids are both an integer and an integer > 0

* Updates admin/articles_spec.rb to default [] instead of nil

* Adjusts validations in article.rb to be DRY-er and more consistent

* Consolidates validations further

* Refactors validations in article.rb to use procs

* Refactors data_update script to remove nil values from array
2020-10-02 11:06:11 -04:00
Rafi
4a9f27163e
[deploy] Manage listing categories in dashboard (#10506)
* Displaying all listing

* Edit listing form

* Editing listing

* Searching listing categories

* Creating new listing category

* Deleting listing category

* Fixing error message and roles

* Tests

* Fixing aria label

* Fixing link class

* Fixing error message of destroy

* Changing placeholder text
2020-10-02 11:05:09 -04:00
rhymes
4e352020a9
[deploy] Remove additional superfluous indexes (#10530) 2020-10-02 16:20:08 +02:00
Molly Struve
e9761fde7c
Optimization:Dont Notify of Channel Leavings (#10518)
* Optimization:Dont Notify of Channel Leavings

* Add specs and dont send pusher notifications or mark chat channel as unread for left or removed chat actions
2020-10-02 16:19:54 +02:00
Anna Buianova
f6a7a42acc
Slack notification with reminder to delete user gdpr data (#10532) 2020-10-02 10:12:12 -04:00
ludwiczakpawel
bf8e2e53f1
Titles & subtitles cleanup (#10508)
* .

* .

* .
2020-10-02 12:37:39 +02:00
Robin Gagnon
87590e77d3
[deploy] feat: Disable autoplay on native videos (#10516) 2020-10-01 16:52:12 -06:00
Molly Struve
878c70bec9
Spec Fix:Dont Reuse Same Username and Let Factory Set Title (#10519) 2020-10-01 17:10:27 -05:00
Diogo Osório
3bc51a13cc
Fixes 500 error when viewing the "Tag Mods" page without having the role on the database (#10515)
* Makes the ModeratorsQuery not return an exception on invalid role

The current implementation of the query would yield an exception when
recieving an invalid state parameter. As per the [GH issue
discussion](https://github.com/forem/forem/issues/10060#issuecomment-692295217),
Zhao recommended to change its behaviour and not trigger an exception in
this condition.

This commit does just that. If the state argument is invalid, the query
now returns an empty result set.

* Adds a warning when there are no matching mods

* Re-trigger the build
2020-10-01 12:55:25 -06:00
Mac Siri
c2e61074e1
Refactor: Extract app-shell unsupported paths (#10504) 2020-10-01 13:41:59 -04:00
rhymes
aac94bb576
[deploy] Remove superfluous indexes on notifications (#10514) 2020-10-01 13:25:44 -04:00
Vaidehi Joshi
6a697173bc
Split EdgeCache::Bust into Fastly + Nginx-specific classes (#10505) [deploy]
* Split EdgeCache::Bust into Fastly + Nginx-specific classes

* Update EdgeCache::Bust service specs

* Move Nginx TODO comment into Nginx-specific file
2020-10-01 10:07:51 -07:00
Sabarish Rajamohan
e1b3844dfa
[deploy] Updated minimum requirements for local installation on Windows (#10513)
* Updated minimum requirements for local installation on Windows

* Added reference links to WSL 2 support in docs
2020-10-01 11:36:15 -04:00
rhymes
10efa25c0a
Add missing presence validators to models (#10495)
* Add missing presence validator for Tag

* Add missing presence validators to Follow

* Add missing presence validators to ProfileField

* Add missing presence validators to Comment

* Add missing presence validators to Profile

* Add missing presence validators to Organization

* Add missing presence validators to Badge

* Add missing presence validators to Webhook::Endpoint

* Add missing presence validators to NotificationSubscription

* Add missing presence validators to PodcastEpisode

* Add missing presence validators to Sponsorship

* Add missing presence validators to PollOption

* Add missing presence validators to Poll

* Add missing presence validators to Article

* Add missing presence validators to EmailAuthorization

* Add missing presence validators to AuditLog

* Add missing presence validators to DataUpdateScript

* Add missing presence validators to User

* Add missing presence validators to SiteConfig

* Fix specs
2020-10-01 16:15:32 +02:00
rhymes
2d92c5d8e0
API: add docs for api/follows/tags (#10471) 2020-10-01 07:21:44 +02:00
Molly Struve
d2d9984f28
[deploy] Return Cache Bust Response When Busting a Cached Path (#10500) 2020-09-30 17:17:04 -05:00
Mac Siri
7417d03884
Update README's Badge (#10489) 2020-09-30 16:38:23 -04:00
Alex
a35009e339
Remove redirect for listings#update (#10499)
* Remove redirect for listings update

* Quick refactor

* Extract query to convenience method
2020-09-30 16:20:39 -04:00
Mac Siri
02bd3111af
[deploy] Refactor: Create setCurrentUserToNavBar (#10501) 2020-09-30 16:20:23 -04:00
Lisa Sy
46d2e5cddb
Add and apply crayons link header style (#10368)
* Add and apply crayons link header style

* Add crayons-subheader style
2020-09-30 16:14:38 +02:00
ludwiczakpawel
90d04a73db
Crayonsification of Listings form (#10429)
* i dont know how to test

* fix i guess

* layout update

* layout updates

* edit

* edit listing

* fix

* tags field

* specs|

* Update app/javascript/listings/__tests__/ContactViaConnect.test.jsx

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

Co-authored-by: Fernando Valverde <fernando@visualcosita.com>
2020-09-30 09:14:48 +02:00
rhymes
d7976a75d6
[deploy] Add missing FKs to BadgeAchievements BanishedUsers BufferUpdates (#10366)
* Add missing FKs to BackupData BadgeAchievements BanishedUsers BufferUpdates

* Add relations and specs

* Fix specs

* Trigger Travis CI

* Remove traces of backup_data has it has been removed on master

* Fix trailing whitespace
2020-09-29 21:43:14 +02:00
Alex
1fbd20087a
[deploy] Remove redirect on comments#update (#10337)
* Remove redirect on comments#update

* Delete unecessary view

* Refactor to account for orgs and podcasts

* Code cleanup

* Add specs

* Fix podcast comment update

* Add more safe navigation operators

* Update safe nav operators again

* Update comment to explain more
2020-09-29 15:33:51 -04:00
Arit Amana
877e9a13b1
Fix bug that arises when a previously tagged comment is deleted (#10486)
* Starting to dig

* Stil figuring out

* Complete implementation; remains tests

* Modify comment_tag specs
2020-09-29 13:43:25 -04:00
dependabot-preview[bot]
6a8c4f4a50
[deploy] Bump preact from 10.4.8 to 10.5.3 (#10473)
Bumps [preact](https://github.com/preactjs/preact) from 10.4.8 to 10.5.3.
- [Release notes](https://github.com/preactjs/preact/releases)
- [Commits](https://github.com/preactjs/preact/compare/10.4.8...10.5.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-29 13:37:08 -04:00
Rafi
2c6555939e
Handling links from different domain (#10479)
* Preventing url from other domains

* Converting slug to keyword

* Changing wording of error message

* Changing wording of error message

* Fixing breaking test
2020-09-29 13:36:32 -04:00
rhymes
53deac75cd
[deploy] Cleanup orphan data from buffer_updates (#10365)
* Cleanup orphan data from backup_data and buffer_updates

* Remove script as the table has been removed
2020-09-29 17:19:48 +02:00
rhymes
0ca4e8b371
[deploy] Add missing FKs to FeedbackMessage, Note, Taggings, Tag, and UserRole (#10376)
* Add missing FKs to FeedbackMessage, Note, Taggings, Tag, and UserRole

* Add missing relations and specs

* Fix spec
2020-09-29 16:49:47 +02:00
Hugo Peixoto
24e9f81f5a
Fix newlines being chomped in RSS import (#10476)
The CustomText converter was monkey patched to fix a bug related to
preserve_tags. Somewhere in that process, remove_inner_newlines was
changed to strip newlines completely, instead of replacing them with a
single space. This restores that functionality.

In development mode, files are not eager loaded. That means that the
converters were not being required, so it was not possible to reproduce
that issue in development mode (since it was falling back to the
original converter, which does not have the bug). This commit also adds
an initializer that requires every converter.
2020-09-29 10:38:36 -04:00
rhymes
fe75dcde1c
Routine rubocop fixes (#10478) 2020-09-29 10:14:26 -04:00
rhymes
f7d781258b
[deploy] Cleanup orphan data from tags and feedback_messages (#10367)
* Cleanup orphan data from tags and feedback_messages

* Fix comment in script
2020-09-29 10:12:40 -04:00
dependabot-preview[bot]
49ddc725a3
Bump @storybook/addon-knobs from 6.0.21 to 6.0.22 (#10451) 2020-09-29 10:05:17 -04:00
dependabot-preview[bot]
15002b180f
Bump @storybook/addon-a11y from 6.0.21 to 6.0.22 (#10452) 2020-09-29 10:04:59 -04:00
rhymes
bfa06466ef
GitHub liquid tag: add support for img tags with no src attribute (#10470) 2020-09-29 10:37:53 +02:00
narender2031
649c23f854
add no console rule front-end (#10362)
* add no console rule front-end

* add no-console to root eslintrc

* disbale no console rule

* remove console
2020-09-29 09:56:37 +02:00
dependabot-preview[bot]
1b8a497054
Bump eslint-plugin-react from 7.20.6 to 7.21.2 (#10448) 2020-09-28 19:44:51 -04:00
dependabot-preview[bot]
fc7436f049
Bump @storybook/addon-actions from 6.0.21 to 6.0.22 (#10456) 2020-09-28 19:44:04 -04:00
Mac Siri
8d9db4cce1
Update Imgproxy to use predetermined endpoint (#10412) 2020-09-28 18:30:29 -04:00
dependabot-preview[bot]
66a36e7712
Bump @storybook/preact from 6.0.21 to 6.0.22 (#10458) 2020-09-28 18:28:46 -04:00
dependabot-preview[bot]
832438a364
Bump @storybook/addon-links from 6.0.21 to 6.0.22 (#10460) 2020-09-28 18:28:22 -04:00
Rafi
873dc988fd
Removing close button from right panel in moderation view (#10353)
* Removing close button in moderation view

* Fixing typo
2020-09-28 16:02:38 -04:00
ludwiczakpawel
b6bc589a4f
Crayonisification of "Reading list" (#10428)
* saved

* saved

* headers level

* maybe i can test

* revert renaming

* fix
2020-09-28 15:53:20 -04:00
Fernando Valverde
b5309c4a21
[deploy] User agent check fix for native iOS (#10472) 2020-09-28 14:45:36 -04:00
Abenet Tamiru
1481e0d50a
Update to latest yarn version (#10441) 2020-09-28 13:24:35 -04:00
dependabot-preview[bot]
7c3ceff71f
Bump @storybook/addons from 6.0.21 to 6.0.22 (#10462)
Bumps [@storybook/addons](https://github.com/storybookjs/storybook/tree/HEAD/lib/addons) from 6.0.21 to 6.0.22.
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v6.0.22/lib/addons)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-28 13:23:47 -04:00
Rafi
13e985991a
[deploy] Handling empty gist link error in liquid tag (#10437)
* Handling empty gist link

* Fixing wording

* Fixing wording

* Handle empty url in initialize

* Seperate test for empty url

* Converting link to symbol

* Trigger Travis CI

Co-authored-by: rhymes <rhymes@hey.com>
2020-09-28 17:23:54 +02:00