Commit graph

9718 commits

Author SHA1 Message Date
Fernando Valverde
e45b6c5ab2
Adds validations to avoid creating unnecessary PNs (#14621)
* Adds validations to avoid creating unnecessary PNs

* Fix conditional + add tests

* Trigger CI

* Trigger CI

* Add missing rpush mock in spec

* Mock before testing d'oh

* Extend ability to mock rpush in helpers

* Remove unnecessary user3 from spec
2021-08-31 15:00:30 -06:00
dependabot[bot]
75d192f6a5
Bump eslint-plugin-import from 2.24.1 to 2.24.2 (#14631)
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.24.1 to 2.24.2.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.24.1...v2.24.2)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-31 14:01:47 -06:00
dependabot[bot]
114cead780
Bump core-js from 3.16.2 to 3.16.4 (#14624)
Bumps [core-js](https://github.com/zloirock/core-js) from 3.16.2 to 3.16.4.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/compare/v3.16.2...v3.16.4)

---
updated-dependencies:
- dependency-name: core-js
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-31 13:59:38 -06:00
Michael Kohl
e59fccabb3
Only tech admins can manage page feature flags (#14618) 2021-08-31 15:35:42 -04:00
Jamie Gaskins
94841d5934
Remove Database.table_available? (#14639)
ActiveRecord already implements this at the model level and also makes
use of the ActiveRecord schema cache. `Database.table_available?` did
not use this query cache and ended up sending *all* of those queries to
Postgres every single time.
2021-08-31 13:53:34 -04:00
dependabot[bot]
f92b91d18f
Bump autoprefixer from 10.3.2 to 10.3.3 (#14632)
Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from 10.3.2 to 10.3.3.
- [Release notes](https://github.com/postcss/autoprefixer/releases)
- [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/autoprefixer/compare/10.3.2...10.3.3)

---
updated-dependencies:
- dependency-name: autoprefixer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-31 16:58:48 +01:00
Michael Kohl
4b6a9a1567
Update README.md (#14633) 2021-08-31 09:29:52 -05:00
dependabot[bot]
7792246fad
Bump cypress from 8.3.0 to 8.3.1 (#14622)
Bumps [cypress](https://github.com/cypress-io/cypress) from 8.3.0 to 8.3.1.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js)
- [Commits](https://github.com/cypress-io/cypress/compare/v8.3.0...v8.3.1)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-31 08:21:42 +01:00
Suzanne Aitchison
89632249bd
make sure input can scroll into view on mobile (#14619) 2021-08-31 08:11:00 +01:00
Manoj Naidu
909f5ae263
Fixed button styling (#14617) 2021-08-31 08:09:40 +01:00
Michael Kohl
baa94a0abd
Various cleanups (#14616)
* Remove unused constant

* Remove unused column from OrganizationMembership

* Remove outdated comment

* Remove references to no longer existing roles

* Remove legacy service worker code

* Remove duration_in_seconds_column from podcast_episodes

* Remove app_bundle from devices
2021-08-31 09:17:24 +07:00
dependabot[bot]
607a5d7c0c
Bump test-prof from 1.0.6 to 1.0.7 (#14626)
Bumps [test-prof](https://github.com/test-prof/test-prof) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/test-prof/test-prof/releases)
- [Changelog](https://github.com/test-prof/test-prof/blob/master/CHANGELOG.md)
- [Commits](https://github.com/test-prof/test-prof/compare/v1.0.6...v1.0.7)

---
updated-dependencies:
- dependency-name: test-prof
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-30 16:44:30 -04:00
dependabot[bot]
5ebb81e16b
Bump nokogiri from 1.12.3 to 1.12.4 (#14628)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.12.3 to 1.12.4.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.12.3...v1.12.4)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-30 14:06:42 -06:00
Michael Kohl
13bf3c5ef0
Routine Rubocop autofixes (#14604) 2021-08-30 11:44:57 -04:00
Suzanne Aitchison
3b67810b9d
Add support for JSX copy paste in Storybook (#14591)
* add support for JSX and HTML copy paste

* remove html addon, refactor dropdown story

* undo html addon settings
2021-08-30 09:36:01 +01:00
Michael Kohl
a885483059
Introduce Settings::Base (#14138)
* Introduce Settings::Base

* Temporarily re-add gem

* Update Settings::Base to use RequestStore

* Add after_commit hook

* Restructure code

* Finish specs, rename field -> setting

* Update comment

* Undo unrelated change

* Remove redundant get_default

* Fix Doorkeeper issue

* Update docs/backend/configuration.md

Co-authored-by: Josh Puetz <josh@dev.to>

* Clarify comment and documentation

* Update vendored gems

* Fix nil-handling bug in Settings::Base

* Remove accidentaly changes from Gemfile.lock

* Update vendored gems

Co-authored-by: Josh Puetz <josh@dev.to>
2021-08-30 10:27:08 +07:00
Daniel Uber
c3bfdc585d
Install foreman for procfile and setup appdomain in gitpod (#14612)
* Install foreman for procfile and setup appdomain for csrf in gitpod

Foreman was not installed (so bin/startup would fail fast).

Additionally, the APP_DOMAIN can be fetched from the `gp` utility to
get the url for port 3000

Since the .env file is read top down - it's easier to implement
appending the corrected value than to replace it at the beginning, but
I'm completely open to redoing this via a sed command or similar to
change the variable at the top (this would be less confusing for
anyone else dealing with the file).

* Ensure command executes as a series of commands

TODO: if this works move the echo commands into the setup section

* move .env setup commands to init section
2021-08-27 18:21:07 -05:00
dependabot[bot]
3f52089695
Bump counter_culture from 2.8.0 to 2.9.0 (#14610)
Bumps [counter_culture](https://github.com/magnusvk/counter_culture) from 2.8.0 to 2.9.0.
- [Release notes](https://github.com/magnusvk/counter_culture/releases)
- [Changelog](https://github.com/magnusvk/counter_culture/blob/master/CHANGELOG.md)
- [Commits](https://github.com/magnusvk/counter_culture/compare/v2.8.0...v2.9.0)

---
updated-dependencies:
- dependency-name: counter_culture
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-27 15:22:44 -04:00
dependabot[bot]
fd3ab09199
Bump bootsnap from 1.8.0 to 1.8.1 (#14611)
Bumps [bootsnap](https://github.com/Shopify/bootsnap) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/Shopify/bootsnap/releases)
- [Changelog](https://github.com/Shopify/bootsnap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Shopify/bootsnap/compare/v1.8.0...v1.8.1)

---
updated-dependencies:
- dependency-name: bootsnap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-27 15:20:54 -04:00
Daniel Uber
bad23b153c
ignore dump.rdb redis backup file (#14586)
* ignore dump.rdb redis backup file

* Update .gitignore

Co-authored-by: rhymes <github@rhymes.dev>

Co-authored-by: rhymes <github@rhymes.dev>
2021-08-27 12:36:04 -05:00
Suzanne Aitchison
bfb4f00aae
Add copy to HTML feature for storybook (#14599)
* Add copy to HTML feature for storybook, inc fix for article markup

* remove html stories no longer needed
2021-08-27 16:09:21 +01:00
Suzanne Aitchison
62e2e0b898
Minor accessibility fixes for the podcast area (#14606)
* remove duplicate header, convert heading to h1

* hide decorative image from sr, convert nav to a nav

* minor fix for items in nav list

* minor fixes to the podcast page

* trigger CI checks
2021-08-27 15:26:52 +01:00
Nick Taylor
cb065a8645
Remove static Storybook folder when doing local Storybook development (#14608) 2021-08-27 10:05:51 -04:00
Daniel Uber
e33b15e1e5
Add counts for number of views when showing referrers (#14600)
* Add counts for number of views when showing referrers

We're sampling unauthenticated page views (every 10th visit is
recorded) and using the "counts_for_number_of_views" attribute to mark
the 10x weight of these sampled events.

The referrers section of the statistics page however was counting the
number of page view rows (without regard to the weight) and it looked
like external referrers (like a google search) were counting 10 times
on the statistics page.

Update the analytics service to show the sum of the weights, rather
than the count of events, on the "Traffic Source Summary" of the
article stats page.

This is loaded from /api/analytics/referrers?article_id=:id on the
front end.

Needs a test that demonstrates this (currently all specs for this
stayed green suggesting the coverage didn't include anything that
represents this situation).

* Avoid calling sum twice by reusing the value alias

the .sum(:column) method in this chain creates an alias 'select
sum(column) as sum_column' which can be used here to avoid
recalculating the sum once for sorting and again for return value.

Sort by the return value's alias.

* Update the test to include weighted page views

Since we want to demonstrate that the count shown for visits matches
the sum of the weighted page views, add weighting to the top url
visits and expect the sum of the weights to be presented.
2021-08-27 08:03:43 -05:00
Nick Taylor
e0ee5e71f4
Some eslint fixes. (#14605) 2021-08-27 08:37:09 +01:00
dependabot[bot]
1c2f265bd7
Bump rubocop from 1.19.1 to 1.20.0 (#14602)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.19.1 to 1.20.0.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.19.1...v1.20.0)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-27 10:05:27 +07:00
Michael Kohl
1b87cc7626
Profile generalization cleanup phase 2 (#14555)
* Remove ignored profile columns

* Update test.rb

* Remove dev profile fields CSV

* Fix first round of specs

* Add additional .includes

* More spec fixes

* Preload user in more locations

* Fix typo

* Spec/preloading fixes

* Specy McSpecFace

* Update e2e seeds

* Update e2e sees with correct display area

* Remove unused eager loading

* Update test.rb

* Add another entry to Bullet.safe_list

* Fix e2e seeds
2021-08-27 09:17:26 +07:00
Suzanne Aitchison
cb1a261a07
Fix storybook theme switcher (#14597) 2021-08-26 16:05:51 -04:00
dependabot[bot]
c5f5f634ed
Bump pry from 0.13.1 to 0.14.1 (#14601)
Bumps [pry](https://github.com/pry/pry) from 0.13.1 to 0.14.1.
- [Release notes](https://github.com/pry/pry/releases)
- [Changelog](https://github.com/pry/pry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pry/pry/compare/v0.13.1...v0.14.1)

---
updated-dependencies:
- dependency-name: pry
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-26 13:17:55 -06:00
dependabot[bot]
7a372661ed
Bump bootsnap from 1.7.7 to 1.8.0 (#14603)
Bumps [bootsnap](https://github.com/Shopify/bootsnap) from 1.7.7 to 1.8.0.
- [Release notes](https://github.com/Shopify/bootsnap/releases)
- [Changelog](https://github.com/Shopify/bootsnap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Shopify/bootsnap/compare/v1.7.7...v1.8.0)

---
updated-dependencies:
- dependency-name: bootsnap
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-26 12:51:26 -06:00
Nick Taylor
5e5e3eda42
Added the creator role for the first Forem instance admin (#14583)
Co-authored-by: Jamie Gaskins <jamie@forem.com>
2021-08-26 13:50:21 -04:00
Fernando Valverde
015a9c1923
Add exclusion to AASA supported paths (#14593)
* Add exclution to AASA supported paths

* Fix specs and extract supported paths in constant
2021-08-26 10:17:39 -06:00
Nikhil Taneja
ff008e4702
#12643 Add eslint rule for formatting redundant curly braces in jsx (#14592) 2021-08-26 11:15:06 -04:00
Michael Kohl
c16ec1d53d
Remove redundant freeze calls (#14596) 2021-08-26 10:01:08 -04:00
Michael Kohl
7e6f3831d1
Make pry available in tests (#14595) 2021-08-26 15:06:42 +02:00
Daniel Uber
edef262537
update ruby_parser and sexp_processor gems (#14594) 2021-08-25 18:54:36 -05:00
Michael Kohl
521f1d26bc
Upgrade to Ruby 3.0.2 (#12103)
Co-authored-by: rhymes <rhymes@hey.com>
Co-authored-by: Mac Siri <krairit.siri@gmail.com>
2021-08-25 14:26:33 -04:00
Suzanne Aitchison
b75af7b2aa
unify padding of code blocks (#14590) 2021-08-25 17:24:31 +02:00
Michael Kohl
37ae9ccf2e
Fix Users::SuggestRecet#established_user_comment_count (#14589) 2021-08-25 08:40:11 -05:00
Andy Zhao
b34455a9e7
Fix broken links (#14588) 2021-08-24 16:59:56 -04:00
dependabot[bot]
bcab5b6022
Bump flipper-ui from 0.22.0 to 0.22.1 (#14584)
Bumps [flipper-ui](https://github.com/jnunemaker/flipper) from 0.22.0 to 0.22.1.
- [Release notes](https://github.com/jnunemaker/flipper/releases)
- [Changelog](https://github.com/jnunemaker/flipper/blob/master/Changelog.md)
- [Commits](https://github.com/jnunemaker/flipper/compare/v0.22.0...v0.22.1)

---
updated-dependencies:
- dependency-name: flipper-ui
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-24 15:34:05 -04:00
dependabot[bot]
8867dc57b2
Bump flipper-active_record from 0.22.0 to 0.22.1 (#14585)
Bumps [flipper-active_record](https://github.com/jnunemaker/flipper) from 0.22.0 to 0.22.1.
- [Release notes](https://github.com/jnunemaker/flipper/releases)
- [Changelog](https://github.com/jnunemaker/flipper/blob/master/Changelog.md)
- [Commits](https://github.com/jnunemaker/flipper/compare/v0.22.0...v0.22.1)

---
updated-dependencies:
- dependency-name: flipper-active_record
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-24 12:41:16 -06:00
rhymes
2e664b7cd5
Remove API docs packages ✂️ ✂️ ✂️ (#14580)
* Remove API docs packages @spotlight/spectral and redoc-cli

* Remove yard packages
2021-08-24 18:51:05 +02:00
dependabot[bot]
6af768373e
Bump ws from 6.2.1 to 6.2.2 (#14582)
Bumps [ws](https://github.com/websockets/ws) from 6.2.1 to 6.2.2.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/6.2.1...6.2.2)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-24 09:15:13 -06:00
Suzanne Aitchison
03ee38777e
Revert "Bump webpack-dev-server from 3.11.2 to 4.0.0 (#14572)" (#14581)
This reverts commit 6828fe1dcd.
2021-08-24 09:32:52 -05:00
rhymes
fc01a93326
Admin Member view: add Tools::HeaderComponent to reduce duplication (#14558)
* This does not work

* Revert "This does not work"

This reverts commit b2292e61fb10faa6051b009214e732a9927c7746.

* Tried with a partial, works

* Improved with component
2021-08-24 15:08:48 +02:00
Suzanne Aitchison
e40a49e7f1
Fix error adding and removing tags as mod (#14566)
* fix error adding and removing tags

* fix login modal test

* remove unneeded property

* fix followtag spec
2021-08-24 13:44:21 +01:00
Ridhwana
5827be4ecc
RFC 190: Forem Creator Signup Page (#13875)
* chore: add my name to the chaore so that I can search after cleanup

* feat: update the forem creator signup template and copy over some stuff from the email_resgistration

* feat: update the fields

* feat: make sure that it saves

* feat: add an eye svg to the password input

* feat: update eye and eye-off svg

* feat: update the placeholder for the password field

* reveak and hide the password when clicking on the icon

* eye visiblibility functionality

* feat: display the username

* feat: show the username row when we click edit

* feat: update the interaction design

* chore: remove extra line

* chore: remove unneeded function

* feat: never show the username hint when the user field is not hidden

* feat: ensure that the username works

* chore: update the existing specs

* feat: move to packs

* refactor: manage the visibility with a avariable and not with the password type

* optimize the way we use password visibility

* chore: validate the username field

* chore: update the statement

* feat: add a background

* feat: accessibility changes

* feat: set a max length on the username

* feat: some more accessibility changes

* feat: validate the length of the password

* chore: add some margin to the error box

* feat: by_email shows the error states and we should cater for the Forem Creator

* feat: tackle any errors

* WIP/test: first pass of some integration specs

* feat: update the Cypress tests

* Update app/views/shared/authentication/_forem_creator_signup.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/shared/authentication/_forem_creator_signup.html.erb

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

* chore: temporarily disable the background on large screens

* chore: remove title

* prevent default

* feat; update the style of the button

* feat: update the tests to use accessibility tags

* feat: update icons

* chore: oops

* little forntend updates

* Update app/views/shared/authentication/_forem_creator_signup.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update cypress/integration/creatorOnboardingFlows/creatorSignup.spec.js

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

* fea: change the aria label and pressed

* feat: change to just John

* feat: update  cypress tests

* test if this is causing the test to fail

* feat: add some margin

* feat: mostly for Cypress - required is true or false based on whether the field is needed

* refactor: use the password label and skip last test

* Update app/views/shared/authentication/_forem_creator_signup.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/shared/authentication/_forem_creator_signup.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* fix: do not toggle  the label (accessibility)

* fix: add a comma

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Michael Kohl <me@citizen428.net>
Co-authored-by: Paweł Ludwiczak <ludwiczakpawel@gmail.com>
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2021-08-24 10:33:26 +02:00
Andy Zhao
3b81172c56
Remove docs from repo ✂✂✂ (#14579)
* Remove docs ✂✂✂✂

* Remove all references to docs and gitdocs

* Update docs.forem.com to developers.forem.com

* Remove .gitdocs_build/

* Update yarn.lock
2021-08-23 17:23:42 -04:00
dependabot[bot]
32cb3b3408
Bump flipper from 0.22.0 to 0.22.1 (#14575)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-23 17:15:55 -04:00