Skip to content

Commit

Permalink
Merge stable-next into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
jgaskins committed Jun 24, 2021
2 parents 721f170 + b803e58 commit 274fd62
Show file tree
Hide file tree
Showing 322 changed files with 6,070 additions and 3,386 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
*.css diff=css
*.html diff=html
*.erb diff=html
/CHANGELOG.md merge=union
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ _If your PR includes UI changes, please replace this line with details on how
accessibility is impacted and tested. For more info, check out the
[Forem Accessibility Docs](https://docs.forem.com/frontend/accessibility)._

## Added tests?
## Added/updated tests?

- [ ] Yes
- [ ] No, and this is why: _please replace this line with details on why tests
Expand All @@ -57,7 +57,7 @@ development process, or any of our internal teams? If so, please note how you
will share this change with the people who need to know about it._

- [ ] I've updated the [Developer Docs](https://docs.forem.com) and/or
[Admin Guide](https://forem.gitbook.io/forem-admin-guide/), or
[Admin Guide](https://admin.forem.com/), or
[Storybook](https://storybook.forem.com/) (for Crayons components)
- [ ] I've updated the README or added inline documentation
- [ ] I will share this change in a [Changelog](https://forem.dev/t/changelog)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Automatic Comment
uses: peter-evans/create-or-update-comment@v1
uses: peter-evans/create-or-update-comment@v1.4.5
with:
issue-number: ${{ github.event.issue.number }}
body: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ package-lock.json

#sitemap
/public/sitemap.xml.gz
/public/sitemaps/

# Development Docker storage location
_docker-storage/
Expand Down
34 changes: 34 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -773,15 +773,31 @@ Rails/ActiveRecordCallbacksOrder:
StyleGuide: 'https://rails.rubystyle.guide/#callbacks-order'
Enabled: true

Rails/AddColumnIndex:
Description: >-
Rails migrations don't make use of a given `index` key, but also
doesn't given an error when it's used, so it makes it seem like an
index might be used.
Enabled: true

Rails/DefaultScope:
Description: 'Avoid use of `default_scope`.'
StyleGuide: 'https://rails.rubystyle.guide#avoid-default-scope'
Enabled: true

Rails/EagerEvaluationLogMessage:
Description: 'Checks that blocks are used for interpolated strings passed to `Rails.logger.debug`.'
Reference: 'https://guides.rubyonrails.org/debugging_rails_applications.html#impact-of-logs-on-performance'
Enabled: true

Rails/EnvironmentVariableAccess:
Description: 'Do not access `ENV` directly after initialization.'
Enabled: false

Rails/ExpandedDateRange:
Description: 'Checks for expanded date range.'
Enabled: true

Rails/FilePath:
EnforcedStyle: slashes

Expand All @@ -792,6 +808,10 @@ Rails/FindById:
StyleGuide: 'https://rails.rubystyle.guide/#find'
Enabled: true

Rails/I18nLocaleAssignment:
Description: 'Prefer the usage of `I18n.with_locale` instead of manually updating `I18n.locale` value.'
Enabled: true

Rails/Inquiry:
Description: "Prefer Ruby's comparison operators over Active Support's `Array#inquiry` and `String#inquiry`."
StyleGuide: 'https://rails.rubystyle.guide/#inquiry'
Expand Down Expand Up @@ -868,6 +888,10 @@ Rails/TimeZoneAssignment:
Reference: 'https://thoughtbot.com/blog/its-about-time-zones'
Enabled: true

Rails/UnusedIgnoredColumns:
Description: 'Remove a column that does not exist from `ignored_columns`.'
Enabled: true

Rails/WhereExists:
Description: 'Prefer `exists?(...)` over `where(...).exists?`.'
Enabled: true
Expand All @@ -894,6 +918,11 @@ RSpec/ExampleLength:
Max: 15
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleLength

RSpec/IdenticalEqualityAssertion:
Description: Checks for equality assertions with identical expressions on both sides.
Enabled: true
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/IdenticalEqualityAssertion

RSpec/MessageExpectation:
Description: Checks for consistent message expectation style.
Enabled: true
Expand All @@ -909,3 +938,8 @@ RSpec/MultipleExpectations:
Enabled: true
Max: 8
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleExpectations

RSpec/Rails/AvoidSetupHook:
Description: Checks that tests use RSpec `before` hook over Rails `setup` method.
Enabled: true
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/AvoidSetupHook
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## 2021-06-09

- [Clear asset and vendor caches on deploy (#13631) ](https://github.com/forem/forem/commit/6c6f24fdfa24dcfbdc3703033391ed018b1a899d) -
[jgaskins](https://github.com/jgaskins)
- [Fix tiny mobile select bug (#13902)](https://github.com/forem/forem/commit/5dcf3678b2e91714cd530b1b7e45a6ed6243ffc3) -
[benhalpern](https://github.com/benhalpern)
- [Fix tiny border radius issue (#13900)](https://github.com/forem/forem/commit/7a50892c717477a0a7719fb23d572aaa2898a438) -
[benhalpern](https://github.com/benhalpern)
- [Bump honeycomb-beeline from 2.4.0 to 2.4.1 (#13895) ](https://github.com/forem/forem/commit/d101bc18ce29e5e41e96c2650e48c06c95b97d53) -
[dependabot[bot]](https://github.com/apps/dependabot)
- [Bump rubocop from 1.15.0 to 1.16.0 (#13894) ](https://github.com/forem/forem/commit/609afc71c7e9dbdae757b8be7d17d50d110716e3) -
[dependabot[bot]](https://github.com/apps/dependabot)
- [[15 min fix] Remove flake in "follow user" spec (#13897) ](https://github.com/forem/forem/commit/7a17cdf0f3cfbfdf39c7b5c8c07446c252682a55) -
[aitchiss](https://github.com/aitchiss)
- [fix flake in delete listing test (#13899)](https://github.com/forem/forem/commit/e04c6152a4e1601047d0e4f31822bd2e8cd075aa) -
[aitchiss](https://github.com/aitchiss)
- [[15 min fix] Reduce flake in sidebar navigation spec (#13898)](https://github.com/forem/forem/commit/9b8d7cabb3297968fdf390394278742895eae3c7) -
[aitchiss](https://github.com/aitchiss)
- [Revert "Bump jest-watch-typeahead from 0.6.3 to 0.6.4 (#13888)" (#13896) ](https://github.com/forem/forem/commit/c808d264a7588deac21d0f5455c789ed7de1aaa6) -
[aitchiss](https://github.com/aitchiss)
14 changes: 7 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ group :production do
end

gem "active_record_union", "~> 1.3" # Adds proper union and union_all methods to ActiveRecord::Relation
gem "acts-as-taggable-on", "~> 8.0" # A tagging plugin for Rails applications that allows for custom tagging along dynamic contexts
gem "acts-as-taggable-on", "~> 8.1" # A tagging plugin for Rails applications that allows for custom tagging along dynamic contexts
gem "acts_as_follower", github: "forem/acts_as_follower", branch: "master" # Allow any model to follow any other model
gem "addressable", "~> 2.7" # A replacement for the URI implementation that is part of Ruby's standard library
gem "ahoy_email", "~> 2.0.2" # Email analytics for Rails
Expand All @@ -23,7 +23,7 @@ gem "carrierwave", "~> 2.2" # Upload files in your Ruby applications, map them t
gem "carrierwave-bombshelter", "~> 0.2" # Protect your carrierwave from image bombs
gem "cloudinary", "~> 1.20" # Client library for easily using the Cloudinary service
gem "counter_culture", "~> 2.8" # counter_culture provides turbo-charged counter caches that are kept up-to-date
gem "ddtrace", "~> 0.49.0" # ddtrace is Datadog’s tracing client for Ruby.
gem "ddtrace", "~> 0.50.0" # ddtrace is Datadog’s tracing client for Ruby.
gem "devise", "~> 4.8" # Flexible authentication solution for Rails
gem "devise_invitable", "~> 2.0.5" # Allows invitations to be sent for joining
gem "dogstatsd-ruby", "~> 4.8" # A client for DogStatsD, an extension of the StatsD metric server for Datadog
Expand Down Expand Up @@ -75,11 +75,11 @@ gem "rack-cors", "~> 1.1" # Middleware that will make Rack-based apps CORS compa
gem "rack-timeout", "~> 0.6" # Rack middleware which aborts requests that have been running for longer than a specified timeout
gem "rails", "~> 6.1.3.2" # Ruby on Rails
# Pinned since we have a monkey-patch against this version
gem "rails-settings-cached", "= 2.5.2" # Settings plugin for Rails that makes managing a table of global key, value pairs easy.
gem "rails-settings-cached", "2.6.0" # Settings plugin for Rails that makes managing a table of global key, value pairs easy.
gem "ransack", "~> 2.4" # Searching and sorting
gem "recaptcha", "~> 5.8", require: "recaptcha/rails" # Helpers for the reCAPTCHA API
gem "redcarpet", "~> 3.5" # A fast, safe and extensible Markdown to (X)HTML parser
gem "redis", "~> 4.2.5" # Redis ruby client
gem "redis", "~> 4.3.1" # Redis ruby client
gem "rpush", "~> 6.0" # Push Notification library for Rails
gem "rpush-redis", "~> 1.1" # Redis module capability for rpush library

Expand Down Expand Up @@ -147,10 +147,10 @@ group :development, :test do
gem "knapsack_pro", "~> 2.17.0" # Help parallelize Ruby spec builds
gem "pry-byebug", "~> 3.8" # Combine 'pry' with 'byebug'. Adds 'step', 'next', 'finish', 'continue' and 'break' commands to control execution
gem "rspec-rails", "~> 5.0" # rspec-rails is a testing framework for Rails 3+
gem "rubocop", "~> 1.16", require: false # Automatic Ruby code style checking tool
gem "rubocop", "~> 1.17", require: false # Automatic Ruby code style checking tool
gem "rubocop-performance", "~> 1.11", require: false # A collection of RuboCop cops to check for performance optimizations in Ruby code
gem "rubocop-rails", "~> 2.10", require: false # Automatic Rails code style checking tool
gem "rubocop-rspec", "~> 2.3", require: false # Code style checking for RSpec files
gem "rubocop-rails", "~> 2.11", require: false # Automatic Rails code style checking tool
gem "rubocop-rspec", "~> 2.4", require: false # Code style checking for RSpec files
gem "sassc-rails", "~> 2.1.2" # Integrate SassC-Ruby into Rails
gem "spring", "~> 2.1" # Preloads your application so things like console, rake and tests run faster
gem "spring-commands-rspec", "~> 1.0" # rspec command for spring
Expand Down
38 changes: 19 additions & 19 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ GEM
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
acts-as-taggable-on (8.0.0)
acts-as-taggable-on (8.1.0)
activerecord (>= 5.0, < 6.2)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
Expand Down Expand Up @@ -183,7 +183,7 @@ GEM
puma (>= 3.8.0)
railties (>= 5.2.0)
dante (0.2.0)
ddtrace (0.49.0)
ddtrace (0.50.0)
ffi (~> 1.0)
msgpack
dead_end (1.1.7)
Expand Down Expand Up @@ -218,7 +218,7 @@ GEM
dogstatsd-ruby (4.8.3)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
doorkeeper (5.5.1)
doorkeeper (5.5.2)
railties (>= 5)
dotenv (2.7.6)
dotenv-rails (2.7.6)
Expand Down Expand Up @@ -416,7 +416,7 @@ GEM
listen (3.5.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
loofah (2.9.1)
loofah (2.10.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
lumberjack (1.2.8)
Expand Down Expand Up @@ -472,7 +472,7 @@ GEM
octokit (4.21.0)
faraday (>= 0.9)
sawyer (~> 0.8.0, >= 0.5.3)
oj (3.11.5)
oj (3.11.7)
omniauth (2.0.4)
hashie (>= 3.4.6)
rack (>= 1.6.2, < 3)
Expand Down Expand Up @@ -562,7 +562,7 @@ GEM
nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
rails-settings-cached (2.5.2)
rails-settings-cached (2.6.0)
rails (>= 5.0.0)
railties (6.1.3.2)
actionpack (= 6.1.3.2)
Expand All @@ -582,7 +582,7 @@ GEM
recaptcha (5.8.0)
json
redcarpet (3.5.1)
redis (4.2.5)
redis (4.3.1)
redis-actionpack (5.1.0)
actionpack (>= 4.0, < 7)
redis-rack (>= 1, < 3)
Expand Down Expand Up @@ -646,7 +646,7 @@ GEM
rspec-retry (0.6.2)
rspec-core (> 3.3)
rspec-support (3.10.2)
rubocop (1.16.0)
rubocop (1.17.0)
parallel (~> 1.10)
parser (>= 3.0.0.0)
rainbow (>= 2.2.2, < 4.0)
Expand All @@ -660,11 +660,11 @@ GEM
rubocop-performance (1.11.3)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-rails (2.10.1)
rubocop-rails (2.11.0)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.7.0, < 2.0)
rubocop-rspec (2.3.0)
rubocop-rspec (2.4.0)
rubocop (~> 1.0)
rubocop-ast (>= 1.1.0)
ruby-next-core (0.12.0)
Expand Down Expand Up @@ -762,7 +762,7 @@ GEM
stripe (> 5, < 6)
strong_migrations (0.7.7)
activerecord (>= 5)
test-prof (1.0.5)
test-prof (1.0.6)
thor (1.1.0)
thread_safe (0.3.6)
tilt (2.0.10)
Expand Down Expand Up @@ -823,7 +823,7 @@ GEM
webpush (1.1.0)
hkdf (~> 0.2)
jwt (~> 2.0)
websocket-driver (0.7.3)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
xpath (3.2.0)
Expand All @@ -844,7 +844,7 @@ PLATFORMS

DEPENDENCIES
active_record_union (~> 1.3)
acts-as-taggable-on (~> 8.0)
acts-as-taggable-on (~> 8.1)
acts_as_follower!
addressable (~> 2.7)
ahoy_email (~> 2.0.2)
Expand All @@ -864,7 +864,7 @@ DEPENDENCIES
cloudinary (~> 1.20)
counter_culture (~> 2.8)
cypress-rails (~> 0.5.0)
ddtrace (~> 0.49.0)
ddtrace (~> 0.50.0)
derailed_benchmarks (~> 2.1)
devise (~> 4.8)
devise_invitable (~> 2.0.5)
Expand Down Expand Up @@ -935,11 +935,11 @@ DEPENDENCIES
rack-host-redirect (~> 1.3)
rack-timeout (~> 0.6)
rails (~> 6.1.3.2)
rails-settings-cached (= 2.5.2)
rails-settings-cached (= 2.6.0)
ransack (~> 2.4)
recaptcha (~> 5.8)
redcarpet (~> 3.5)
redis (~> 4.2.5)
redis (~> 4.3.1)
redis-actionpack (= 5.1.0)
redis-rack (= 2.0.6)
redis-rails (~> 5.0.2)
Expand All @@ -951,10 +951,10 @@ DEPENDENCIES
rpush-redis (~> 1.1)
rspec-rails (~> 5.0)
rspec-retry (~> 0.6)
rubocop (~> 1.16)
rubocop (~> 1.17)
rubocop-performance (~> 1.11)
rubocop-rails (~> 2.10)
rubocop-rspec (~> 2.3)
rubocop-rails (~> 2.11)
rubocop-rspec (~> 2.4)
ruby-prof (~> 1.4)
rubyzip (~> 2.3)
s3_direct_upload (~> 0.1)
Expand Down
3 changes: 3 additions & 0 deletions app/assets/images/lock.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions app/assets/javascripts/initializePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
initializeCommentPreview, initializeRuntimeBanner,
initializeTimeFixer, initializeDashboardSort, initializePWAFunctionality,
initializeArchivedPostFilter, initializeCreditsPage,
initializeUserProfilePage, initializeProfileInfoToggle, initializePodcastPlayback,
initializeProfileInfoToggle, initializePodcastPlayback,
initializeVideoPlayback, initializeDrawerSliders, initializeProfileBadgesToggle,
initializeHeroBannerClose, initializeOnboardingTaskCard, initScrolling,
nextPage:writable, fetching:writable, done:writable, adClicked:writable,
Expand All @@ -31,7 +31,6 @@ function callInitializers() {
initializePWAFunctionality();
initializeArchivedPostFilter();
initializeCreditsPage();
initializeUserProfilePage();
initializeProfileInfoToggle();
initializeProfileBadgesToggle();
initializePodcastPlayback();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ function initializeProfileImage(user) {

function addRelevantButtonsToArticle(user) {
var articleContainer = document.getElementById('article-show-container');
if (articleContainer) {

if (
articleContainer &&
articleContainer.dataset.buttonsInitialized !== 'true'
) {
let actions = [];
const published = JSON.parse(articleContainer.dataset.published);

Expand Down Expand Up @@ -56,6 +60,7 @@ function addRelevantButtonsToArticle(user) {
}

document.getElementById('action-space').innerHTML = actions.join('');
articleContainer.dataset.buttonsInitialized = 'true';
}
}

Expand Down
Loading

0 comments on commit 274fd62

Please sign in to comment.