Commit graph

2260 commits

Author SHA1 Message Date
Anna Buianova
f6bb00a26a Add specs for the PodcastFeed #2952 (#3039) [ci skip] 2019-06-04 14:50:25 -04:00
briwa
7c254dc8bf Remove an extra @ in Connect (#3040) [ci skip] 2019-06-04 14:43:37 -04:00
Ben Halpern
119d0f69d6
Finalize multi-org features (#3041)
* Finalize multi-org features

* Fix credits count issues

* Only show org list if multiple orgs on dashboard

* Add check for organizations to JS
2019-06-04 13:56:22 -04:00
Mac Siri
0ebf4232fb
Update stale.yml [ci skip] 2019-06-04 10:41:55 -04:00
Andy Zhao
47d9ec27fb Allow users to belong to multiple orgs (#2583)
* Allow user to have many orgs

* Allow users to handle multi orgs in settings

* Make rounded buttons inline

* Add multi org function to dashboards

* Fix merge conflicts

* Fix mistake in merge conflict fix oops

* Display the correct membership level

* Fix accessibility issues

* Display organizations for article editors

* Handle submitting org id with preact editors

* Make listings work with multiple organizations

* Allow listings to have multiple orgs on create

* Display the correct number of credits for each org

* Move script tag to Webpack

* Allow multi orgs for purchasing and viewing credits

* Use OrganizationMembership as authorization check

* Display multiple organizations for notifications

* Allow dashboard to be viewable under multi-orgs

* Remove unused method

* Add multi-org functionality for article editors

* Show pro dashboard buttons for member+ org levels

* Leave the correct organization

* Allow article API to change org id

* Add left-out authorization method oops

* Make nav buttons a bit more clear

* Fix merge conflict

* Fix adding org id for /api/articles and tests

* Fix tests for org policy

* Use proper logic for displaying org members

* Update org actions with new authorization

* Use correct org when creating a listing

* Remove additional payment charge oops

* Mark org notifications as read with authorization

* Remove deprecated post_as_organization attribute

* Use new org_admin syntax

* Remove deprecated org logic for article create and update

* Default all RSS posts to not belong to any org

* Render org_member page for guest users

* Update org policy spec to work with multi orgs

* Use org_membership for org traits and move identity code

* Use org_member trait

* Update to work with multi-orgs

* Validate article's org_id if param org_id is blank

* Make  a let variable

* Remove unnecessary eager load for credits

* Fix HTML structure and org logic for non-org users

* Update credits spec for multi-org

* Add test for failed payment when purchased by org

* Lint listings_spec

* Test that the listing was created under the user

* Add tests for POST /listings multi-org

* Use double quotes for classes

* Fix /manage and a few other multi-org bugs

* Fix test for multi org

* Use correct method SQL exists? not Rails exist?

* Fix reads spec for multi-org

* Fix org_controller actions to work with multi org

* Test only multi org and not old usage and fix leave_org

* Fix org showing user profile img test for multi-org

* Fix org logic for users with no orgs

* Remove switch org functionality

* Update tests and add hidden param for org id

* Redirect to the specific organization

* Test other org button actions

* Use settings_notice instead of legacy notice and refactor

* Fix weird extra end issue prob from merge conflicts

* Test for with new flash key

* Fix user_views_org tests for multi-org

* Test for new flash message

* Update snapshot with new a11y html

* Move styling to stylesheet

* Add site admins functionality

* Move org_member? method in user model and refactor

* Use unspent_credits_count for organizations

* Add tests for /listings/new and minor bug fixes

* Use .present? in case of empty array

* Fix a lingering deprecated method

* Use greater than 1 for random numbers

* Add tests for counting spent and unspent credits
2019-06-04 09:30:52 -04:00
Andy Zhao
c2d3384f80 Fix 404 issue when submitting abuse report (#3038) 2019-06-03 19:24:24 -04:00
Mac Siri
cea77663ad Fix flaky editor spec & change dev configs (#3022)
* Update .simplecov

* Downgrade factory_bot_rails

* Update flaky test

* Update .travis.yml

* Update user_edits_an_article_spec
2019-06-03 15:01:05 -04:00
Mario See
6bbdb73019 adjust spacing and hide scrollbar (#3027) 2019-06-03 15:00:22 -04:00
dependabot-preview[bot]
7be0b56469 Bump vcr from 4.0.0 to 5.0.0 (#3030)
Bumps [vcr](https://github.com/vcr/vcr) from 4.0.0 to 5.0.0.
- [Release notes](https://github.com/vcr/vcr/releases)
- [Changelog](https://github.com/vcr/vcr/blob/master/CHANGELOG.md)
- [Upgrade guide](https://github.com/vcr/vcr/blob/master/Upgrade.md)
- [Commits](https://github.com/vcr/vcr/compare/v4.0.0...v5.0.0)
2019-06-03 14:52:48 -04:00
dependabot-preview[bot]
9d7bfc7a7d Bump rubyzip from 1.2.2 to 1.2.3 (#3028)
Bumps [rubyzip](https://github.com/rubyzip/rubyzip) from 1.2.2 to 1.2.3.
- [Release notes](https://github.com/rubyzip/rubyzip/releases)
- [Changelog](https://github.com/rubyzip/rubyzip/blob/master/Changelog.md)
- [Commits](https://github.com/rubyzip/rubyzip/compare/v1.2.2...v1.2.3)
2019-06-03 14:50:35 -04:00
dependabot-preview[bot]
ae94dc82bf Bump activerecord-import from 1.0.1 to 1.0.2 (#3032) [ci skip]
Bumps [activerecord-import](https://github.com/zdennis/activerecord-import) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/zdennis/activerecord-import/releases)
- [Changelog](https://github.com/zdennis/activerecord-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zdennis/activerecord-import/compare/v1.0.1...v1.0.2)
2019-06-03 13:51:51 -04:00
dependabot-preview[bot]
d01becf7a2 Bump rubocop from 0.70.0 to 0.71.0 (#3031) [ci skip]
Bumps [rubocop](https://github.com/rubocop-hq/rubocop) from 0.70.0 to 0.71.0.
- [Release notes](https://github.com/rubocop-hq/rubocop/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop/compare/v0.70.0...v0.71.0)
2019-06-03 13:49:10 -04:00
dependabot-preview[bot]
7d796428fd Bump twilio-ruby from 5.23.0 to 5.23.1 (#3033) [ci skip]
Bumps [twilio-ruby](https://github.com/twilio/twilio-ruby) from 5.23.0 to 5.23.1.
- [Release notes](https://github.com/twilio/twilio-ruby/releases)
- [Changelog](https://github.com/twilio/twilio-ruby/blob/master/CHANGES.md)
- [Commits](https://github.com/twilio/twilio-ruby/compare/5.23.0...5.23.1)
2019-06-03 13:46:51 -04:00
dependabot-preview[bot]
e6d558a3dd Bump capybara from 3.20.2 to 3.22.0 (#3034) [ci skip]
Bumps [capybara](https://github.com/teamcapybara/capybara) from 3.20.2 to 3.22.0.
- [Release notes](https://github.com/teamcapybara/capybara/releases)
- [Changelog](https://github.com/teamcapybara/capybara/blob/master/History.md)
- [Commits](https://github.com/teamcapybara/capybara/compare/3.20.2...3.22.0)
2019-06-03 13:46:13 -04:00
dependabot-preview[bot]
f861e880f8 Bump jsdom from 15.1.0 to 15.1.1 (#3036) [ci skip]
Bumps [jsdom](https://github.com/jsdom/jsdom) from 15.1.0 to 15.1.1.
- [Release notes](https://github.com/jsdom/jsdom/releases)
- [Changelog](https://github.com/jsdom/jsdom/blob/master/Changelog.md)
- [Commits](https://github.com/jsdom/jsdom/compare/15.1.0...15.1.1)
2019-06-03 13:44:38 -04:00
Charles Stover
f8e31f6865 https URLs by default (#3019)
This was so upsetting I fixed it on mobile.
2019-06-01 10:16:23 -04:00
Alireza Zekavat Fetrat
4d3203be82 Fixes inappropriate comment header background bug #3020 (#3021) 2019-06-01 10:01:22 -04:00
Ben Halpern
10151f9f4c
Fix close modal click action (#3018) 2019-06-01 10:00:42 -04:00
Mario See
8359ab555f Add reading time to reading list (#2929)
* init

- add reading_time to reactions
- make migration
- add to algolia index in reaction model
- add method in reaction model to define reading time based on reactable reading time

* add time to front end

* Revert "Return errors instead of raising an exception on ArticleCreation (#2922)"

This reverts commit 09a99d93a3.

* Revert "init"

This reverts commit 53650ebcc3c93c54e396977f7c34f7aa35a589c4.

* Revert "Revert "Return errors instead of raising an exception on ArticleCreation (#2922)""

This reverts commit e8cf1f3a290dd06b937247e3ff7593e7c7036553.

* Update reaction.rb

* remove duplicate searchableAttribute
2019-05-31 16:45:29 -04:00
Ben Halpern
1775f42cc4
Finalize DEV Connect for listings (#3016) 2019-05-31 15:22:59 -04:00
Mario See
19b46a86e2 Add messaging option in listings (#2854)
* add prop for message modal method

* clean up comments from open inbox method

* add inbox type to listing model author

* add sample methods for opening message modal in listings and listing modal

* only show for users with open inbox and hide for self

* use contact_via_connect instead of inbox_type

* fix edit listing to include contact via connect attribute

* wip send message method

* adjust message styling

* change id name

* update destination

* remove unused methods
2019-05-31 13:48:45 -04:00
rhymes
36ad407c1d Fix zen mode's global key bug (#2969) 2019-05-31 13:33:29 -04:00
briwa
b301bf8def fix(article): scroll to top when inserting image (#2998) 2019-05-31 10:29:42 -04:00
Mohammadjavad Raadi
2e8eda4974 Fixes Listing Items Spacing Inconsistency and Content Overflow Issue #2846 (#3011) 2019-05-31 09:02:32 -04:00
briwa
b35fc23a82 refactor(svgs): remove empty group tags (#3002)
* refactor(svgs): remove empty group tags

* fix(spec): update liquid tag twitter spec
2019-05-31 08:54:31 -04:00
Anna Buianova
a7332846df Validate on creating a reaction notification (#3010) 2019-05-31 07:30:17 -04:00
Curtis Maloney
8d50956f1a Optimise images (#2966) 2019-05-30 17:37:10 -04:00
briwa
b8908c5190 fix(README): link to the testing doc is broken (#3006)
[ci skip]
2019-05-30 17:36:22 -04:00
Ali Spittel
5dd0341a0c refactor v2 editor guide (#3007) 2019-05-30 17:35:19 -04:00
Jess Lee
c3e2a0c5f1 Add missing instance var for /manage & Bust rails cache on comments (#3004) 2019-05-30 12:23:20 -04:00
cyrillefr
8c52d5c43f Move remove_each notifications method in own job (#2946) 2019-05-29 16:26:18 -04:00
rhymes
a99c072525 Guard bust_comment against nil commentable (#2991) 2019-05-29 14:03:20 -04:00
Anna Buianova
c510f1510c Fix a validation error when creating notifications #2525 (#2999)
* Use activerecord-import upsert to deal with the race condition

* Return a more consistent result form Notifications::Reactions::Send
2019-05-29 11:19:37 -04:00
briwa
4f31c6d07a fix(reading-list): even spacing for Save and Bookmark span (#3000) 2019-05-29 11:19:01 -04:00
rhymes
38aa45c8e3 Cleanup bodyPreview component (#2980) [ci skip] 2019-05-28 23:55:37 -04:00
dependabot-preview[bot]
d330883f6e Bump timber from 2.6.2 to 3.0.1 & Add timber-rails gem (#2894) [ci skip]
* Bump timber from 2.6.2 to 3.0.1

Bumps [timber](https://github.com/timberio/timber-ruby) from 2.6.2 to 3.0.1.
- [Release notes](https://github.com/timberio/timber-ruby/releases)
- [Changelog](https://github.com/timberio/timber-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/timberio/timber-ruby/compare/v2.6.2...v3.0.1)

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

* Add timber-rails gem
2019-05-28 23:45:56 -04:00
dependabot-preview[bot]
c15b2a2448 Bump skylight from 3.1.5 to 4.0.2 (#2971) [ci skip]
Bumps [skylight](https://github.com/skylightio/skylight-ruby) from 3.1.5 to 4.0.2.
- [Release notes](https://github.com/skylightio/skylight-ruby/releases)
- [Changelog](https://github.com/skylightio/skylight-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/skylightio/skylight-ruby/compare/v3.1.5...v4.0.2)
2019-05-28 17:46:33 -04:00
rhymes
6a626e819d Refactor: fix issues raised by bullet (#2965)
* Preload organization, not user

* Preload users only when needed

* Pre-load podcasts for podcast episodes in API

* Avoid eager loading error by loading rating votes separately

* Preload associations for moderation

* Preload user comments in trees

* Preload organization for non org dashboard and cleanup queries

* Optimize ArticleSuggester to only load N articles at need

* Remove eager loading and pass variables to partials for easier debug

* Reorganize tags validation code and ignore actsastaggableon eager loading issues

* Remove unused eager loading and bring up comments relation

* Preload podcasts when loading podcast episodes

* Fix views specs

* Make sure ArticleSuggester never returns duplicates

* Remove commented code

* Re-trigger build

* Move suggested articles back to view to respect fragment caching
2019-05-28 17:32:53 -04:00
dependabot-preview[bot]
72d118cf48 Bump stripe from 4.17.0 to 4.18.1 (#2990) [ci skip]
Bumps [stripe](https://github.com/stripe/stripe-ruby) from 4.17.0 to 4.18.1.
- [Release notes](https://github.com/stripe/stripe-ruby/releases)
- [Changelog](https://github.com/stripe/stripe-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stripe/stripe-ruby/compare/v4.17.0...v4.18.1)
2019-05-28 17:32:11 -04:00
rhymes
6ea4b55658 Require only used parts of Rails (#2988)
Rails by defaults loads all its railties and engines, the current app does not use neither ActiveStorage, nor ActionCable nor TestUnit.
We can, hence, dispense of them.
2019-05-28 17:30:05 -04:00
dependabot-preview[bot]
ac6ba0f69b Bump aws-sdk-lambda from 1.25.0 to 1.26.0 (#2970) [ci skip]
Bumps [aws-sdk-lambda](https://github.com/aws/aws-sdk-ruby) from 1.25.0 to 1.26.0.
- [Release notes](https://github.com/aws/aws-sdk-ruby/releases)
- [Changelog](https://github.com/aws/aws-sdk-ruby/blob/master/gems/aws-sdk-lambda/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-ruby/compare/1.25.0...1.26.0)
2019-05-28 17:19:37 -04:00
Ben Halpern
d2f296114a
Modify cache key for article sidebar cta (#2993) 2019-05-28 17:18:31 -04:00
Vince Blom
bfc961b3f3 Codepen Links with Underscore Usernames (#2985)
- updates codepen liquid tag regex to allow underscores
- adds test to ensure an underscore in the username field of the link
  is considered valid
2019-05-28 16:32:34 -04:00
Ben Halpern
e1d537c016
Fix css missing (#2992) 2019-05-28 15:24:56 -04:00
dependabot-preview[bot]
736916259e Bump test-prof from 0.8.0 to 0.9.0 (#2972) [ci skip]
Bumps [test-prof](https://github.com/palkan/test-prof) from 0.8.0 to 0.9.0.
- [Release notes](https://github.com/palkan/test-prof/releases)
- [Changelog](https://github.com/palkan/test-prof/blob/master/CHANGELOG.md)
- [Commits](https://github.com/palkan/test-prof/compare/v0.8.0...v0.9.0)
2019-05-28 13:11:28 -04:00
dependabot-preview[bot]
2bbd594094 Bump google-api-client from 0.29.1 to 0.30.0 (#2974) [ci skip]
Bumps [google-api-client](https://github.com/google/google-api-ruby-client) from 0.29.1 to 0.30.0.
- [Release notes](https://github.com/google/google-api-ruby-client/releases)
- [Changelog](https://github.com/googleapis/google-api-ruby-client/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/google-api-ruby-client/compare/0.29.1...0.30.0)
2019-05-28 13:03:44 -04:00
dependabot-preview[bot]
4a784d46c3 Bump bundler-audit from 0.6.0 to 0.6.1 (#2977) [ci skip]
Bumps [bundler-audit](https://github.com/postmodern/bundler-audit) from 0.6.0 to 0.6.1.
- [Release notes](https://github.com/postmodern/bundler-audit/releases)
- [Changelog](https://github.com/rubysec/bundler-audit/blob/master/ChangeLog.md)
- [Commits](https://github.com/postmodern/bundler-audit/compare/v0.6.0...v0.6.1)
2019-05-28 13:00:28 -04:00
dependabot-preview[bot]
7950266a74 Bump rubocop from 0.69.0 to 0.70.0 (#2975) [ci skip]
Bumps [rubocop](https://github.com/rubocop-hq/rubocop) from 0.69.0 to 0.70.0.
- [Release notes](https://github.com/rubocop-hq/rubocop/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop/compare/v0.69.0...v0.70.0)
2019-05-28 12:57:33 -04:00
dependabot-preview[bot]
d9190b297c Bump eslint-plugin-import from 2.17.2 to 2.17.3 (#2978) [ci skip]
Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.17.2 to 2.17.3.
- [Release notes](https://github.com/benmosher/eslint-plugin-import/releases)
- [Changelog](https://github.com/benmosher/eslint-plugin-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/benmosher/eslint-plugin-import/compare/v2.17.2...v2.17.3)
2019-05-28 12:47:38 -04:00
dependabot-preview[bot]
64bbba5176 Bump codemirror from 5.46.0 to 5.47.0 (#2979) [ci skip]
Bumps [codemirror](https://github.com/codemirror/CodeMirror) from 5.46.0 to 5.47.0.
- [Release notes](https://github.com/codemirror/CodeMirror/releases)
- [Changelog](https://github.com/codemirror/CodeMirror/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codemirror/CodeMirror/compare/5.46.0...5.47.0)
2019-05-28 12:46:17 -04:00