Commit graph

5802 commits

Author SHA1 Message Date
Nick Taylor
618fc4f902
Since we've added more testing, coverage thresholds can be bumped up a bit. (#8824) 2020-06-22 14:16:22 +02:00
Anurag Hazra
7d73872afb
style: fixed z-indexing bug in sidebar reactions (#8793)
* style: fixed z-indexing bug in sidebar reactions

* chore: set z-index: unset

* Travis where are thou?

Co-authored-by: rhymes <rhymesete@gmail.com>
2020-06-22 13:26:11 +02:00
Nick Taylor
52ac36dd0a
Added a11y Storybook addon. (#8814) 2020-06-22 10:56:03 +02:00
Nick Taylor
7fa3068e70
webpack aliases resolve properly for eslint now. (#8816) 2020-06-22 10:26:01 +02:00
Nick Taylor
568ada8fe6
Cleaned up some tests. (#8817) 2020-06-22 10:25:39 +02:00
Nick Taylor
be9a880e81
Fix eslint files for prettier (#8815)
* Fixed lint extends so that prettier is the last extends to override all other extends (recommended).

* Added prettier to extends of base eslint file.
2020-06-22 10:25:05 +02:00
Ben Halpern
4aa3240fde
[deploy] Fix comment/reaction count hiding issue on small screens (#8786) 2020-06-18 21:37:27 -04:00
Ben Halpern
6f735a5a27
[deploy] Fix div/aside mismatch (#8784) 2020-06-18 20:58:16 -04:00
Ben Halpern
e9a60d9f77
[deploy] Check for snackbar (#8783) 2020-06-18 19:51:21 -04:00
Vaidehi Joshi
ded5e245fd
Turn off ahoy visit tracking (#8782) [deploy] 2020-06-18 15:31:31 -07:00
Julianna Tetreault
426d3191e8
Add a Broadcast Show View (#8769) [deploy]
* Add #show to the Broadcasts::Controller and to routes.rb
  - Adds a show method to the Broadcasts Controller
  - Adds a show route to routes.rb

* Add a show view for Broadcasts
  - Adds show.html.erb to /internal/broadcasts
  - Repurposes code from index.html.erb for show view
  - Repurposes code from edit.html.erb for show view

* Rewrite /internal/broadcasts index to use a table
  - Formats /internal/broadcasts with a table
  - Removes on-hover functionality from show.html.erb

* Refactor Broadcast resources in routes.rb

* Redirect to #show on create and update for Broadcasts

* Add the Destroy Broadcast button to the Broadcast show view

* Remove style preventing Broadcast preview

* Add Broadcast styling back and add display: block to stylesheet

* Add display: flex to .broadcast-wrapper in layout.scss

* Remove superfluous slashes from opening tags
2020-06-18 15:51:45 -06:00
Vaidehi Joshi
904f0dac78
Add ahoy + welcome notification tracking (#8758) [deploy]
* Set up ahoy gem, add ahoy-js

* Import ahoy.js into base.js.erb

* Add trackNotification function to notifications/index.html.erb

* Add sanitized_broadcast_id helper

* Use sanitized_broadcast_id in broadcast partial

* Add specs around tracking welcome notifications

* Remove optional fields from Ahoy::Visit migration + table

* Fiddle with trait to see if it helps with CI failures

* Disable geocode tracking in ahoy

* Stub out SiteConfig in notifications page spec
2020-06-18 13:40:14 -07:00
Ben Halpern
0e765b47de
[deploy] Modify articles below content for SEO and efficiency (#8755)
* Modify articles below content for SEO and efficiency

* fix Travis and code climate failures

Co-authored-by: mstruve <mollylbs@gmail.com>
2020-06-18 15:04:29 -04:00
Alex
1890f393a2
[deploy] Add subscriber_email to user_subscriptions & more backend updates (#8723)
* Add migrations for subscriber_email column

* Add new schema

* Update relationships, specs, and factory

* Use unless index_exists? over if !index_exists?

* Fix typo in last fix for migration

* Rename authored_user_subscriptions

- to source_authored_user_subcriptions

* Add factory methods and specs

- UserSubscription.make
- UserSubscription.make_new
- Article.new_user_subscription
- Article.create_user_subscription

* Remove self and &

* Change make_new to build

* new_user_subscription --> build_user_subscription

* Come on, Travis
2020-06-18 14:40:08 -04:00
Nick Taylor
e117c7b766
nickytonline/comment subscription fix (#8768) 2020-06-18 11:26:48 -04:00
Joe Doss
3ba1692eab
Don't seed in production when using db:prepare (#8754)
* We don't want to do devel seeding in production mode when using db:prepare. This
PR fixes that. We can also use seeds.rb to do production seeding for new Forems
in the future.

* Just return if in production instead of wrapping the entire file in an if statement.
2020-06-18 10:39:20 -04:00
Nick Taylor
653ec12300
Upgrade to Preact 10.4.4 (#8739)
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2020-06-18 10:07:17 -04:00
ludwiczakpawel
cb1f03ce9f
[deploy] CSS fixes (#8764)
* flare tag line height

* .

* fix editor overflow issue

* fix editor overflow issue

* themable actions colors

* name position
2020-06-18 09:16:13 -04:00
Michael Kohl
158b3f1307
Display 'Originally published' for canonical URLs (#8761) 2020-06-18 08:10:47 -04:00
rhymes
2fff21f652
Add email panel to settings/account (#8727)
* Use crayons

* Add spec for Identity.email

* Refactor panels and ifs

* Update app/views/users/_account_providers_emails.html.erb

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>

* Update app/views/users/_account_providers_emails.html.erb

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>

* Update app/views/users/_account_providers_emails.html.erb

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>
2020-06-18 13:08:46 +02:00
Dmitry Maksyoma
be07697d6d
Adapt dev env to run on a remote box (#8232)
* Adapt dev env to run on a remote box

* webpack-dev-server ignores CLI arguments, so switched to environment
  variables.
* Dynamically determine remote webpack host via APP_DOMAIN environment
  variable, defined in application.yml.
* Setup content security policy to allow connecting to webpack on a
  remote box, defined by APP_DOMAIN environment variable.

* Make Webpacker listen on 0.0.0.0

* Account for APP_DOMAIN port

* Add support for URI scheme and tests

* Fix a spec by disabling a Rubocop linter
2020-06-18 13:01:49 +02:00
ludwiczakpawel
9c471640b6
Footer redesign (#8684)
* flare tag line height

* .

* init

* moar

* user siteconfig for mascot

* .
2020-06-18 12:52:03 +02:00
Ben Halpern
478b048fc5
[deploy] Fix article preamble style (#8756)
* Fix article preamble style

* Proper tests
2020-06-17 20:10:41 -04:00
Josh Puetz
62fdf6f897
Let's try this again (#8747) 2020-06-17 18:34:40 -04:00
Ben Halpern
fc667e5177
[deploy] Small css fixes (#8743)
* Small css fixes

* Update app/views/articles/_org_branding.html.erb

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>
2020-06-17 16:11:36 -04:00
Ben Halpern
2deadc2385
Change three-dots svg (#8746) 2020-06-17 15:53:55 -04:00
Andy Zhao
0a41ff658b
Only render div if the user is able to connect another auth (#8730)
* Only render div if the user is able to connect another auth

* Use generalized auth provider size instead

* Hide blank div in account page too
2020-06-17 14:57:20 -04:00
Fernando Valverde
5320f533ad
[deploy] Makes the dropdown on comments display correctly on small screens (#8742) 2020-06-17 12:46:58 -06:00
Molly Struve
0761ba4b11
[deploy] Upgrade Rails to 6.0.3.2 To Fix CVE-2020-8185 (#8736) 2020-06-17 11:29:54 -05:00
ludwiczakpawel
cd97ce10f0
[deploy] Ludwiczakpawel/hotfix article (#8738)
* flare tag line height

* .

* .'
'
2020-06-17 12:14:03 -04:00
Ben Halpern
82bb422124
[deploy] hotfix safari code issue (#8737) 2020-06-17 11:59:11 -04:00
Ben Halpern
c66fefc9da
[deploy] Ben/hide html variant (#8733)
* Hide HTML Variant

* Modify travis
2020-06-17 11:36:27 -04:00
Ben Halpern
329f1d3825
[deploy] Hide HTML Variant (#8731) 2020-06-17 11:14:21 -04:00
Molly Struve
5dfdb2bf4d
[deploy] Optimization: Eager Load and Limit Columns When Fetching Articles Not IDs (#8719) 2020-06-17 09:51:44 -05:00
rhymes
7309478420
Rails 6 autoloader: prepare liquid tags code (#8707)
* Move liquid patches to lib/liquid

* Rename classes properly
2020-06-17 16:50:14 +02:00
ludwiczakpawel
16f4d7d46a
[deploy] Article Design update (#8234)
* flare tag line height

* .

* init

* widgets

* widgets lists

* new tabs on home

* instantclick

* .

* rethinking css

* .

* .

* empty space

* init

* campaign widget

* .

* merge

* .

* update layout

* fix sidebars on home page

* .

* fix onboarding x

* test

* spec

* test

* toolbar fix

* more

* test

* better handling ads

* .

* spec

* card border

* .

* .

* actions bar

* cleanup

* animation

* test

* button width

* .

* better responsiveness and author boxes

* meta info

* padding

* better animation

* optimize videos

* fixes

* spec

* .

* codeblocks in comments

* whoops

* Use .present? correctly as it preloads items

* sticky nav

* Update app/views/articles/_sticky_nav.html.erb

I don't know what I'm doing but @benhalpern says so! e8c0f337a5 (r440248874)

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>

* Update app/views/articles/show.html.erb

I don't know what I'm doing but @benhalpern says so! e8c0f337a5 (r440247802)

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>

* little fixes

* Update app/assets/stylesheets/article-show.scss

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>

* pawel updating ruby code......

* actually better merge

* semantic updates

* .

Co-authored-by: rhymes <rhymesete@gmail.com>
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2020-06-17 09:57:57 -04:00
Dmitry Maksyoma
17a9335680
Duplicate notifications, when replying to and mentioning the same user (#8156)
* Refactor Mentions::CreateAll

* Update app/services/mentions/create_all.rb

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

* Refactor for readability

* Try writing tests for duplicate notifications

* Skip Bullet warning, essentially for #current_user

* Fix duplicate notification, when mentioning comment author

* Improve spec readability

* Refactor specs and fix duplicate notificaation for moderator comments

* Refactor spec

* Remove obsolete code and refactor specs

* Remove obsolete spec

* Update spec/requests/comments_create_spec.rb

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

* Get rid of #json_response

* Remove Bullet skipping

* Change #where -> #exists?

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-06-17 08:47:31 -04:00
Ben Halpern
e6abadff6c
Generalize editor logo (#8720) 2020-06-17 10:51:50 +02:00
Jacob Herrington
ad9c7797ec
Fix accessibility warnings from axe (#8718) 2020-06-17 10:48:38 +02:00
Lisa Sy
5e1fc2c4cd
Update connect chat container (part 2) (#8717) [deploy]
* Update chat container of Connect

- Rename certain class names to improve BEM syntax and naming
- Update typography of message cells
- Update header of message area
- Use new 'info' icon to expand sidebar
- Update form fields for both writing and editing a message
- Implement Crayons styling for 'delete' modal

https://github.com/thepracticaldev/dev.to/issues/8437

* Update some tests aand class names

* Update tests

* Update info icon

* Update reference
2020-06-16 15:15:59 -07:00
Molly Struve
76a0a96495
[deploy] Optimization: Add Index to Article Public Reaction Counts for Sorting (#8716) 2020-06-16 18:00:25 -04:00
Molly Struve
5ee80d2b1b
Flaky Spec Fix: Assert Result of Delete Statement Rather Than DB State (#8715) 2020-06-16 15:17:11 -05:00
Molly Struve
6cc4c6fe4a
Flaky Spec Fix: Dont CGI Escape Title Compare (#8714) 2020-06-16 14:19:41 -05:00
Julianna Tetreault
58f9c303aa
Add active_status_updated_at to the Broadcasts Table (#8451) [deploy]
* Add last_active_at datetime to Broadcasts table

* Add last_active_at to Broadcast index view

* Add callback to Broadcast.rb to update last_active_at

* Add a data_update script to backfill the last_active_at column on the Broadcasts table

* Add a spec for updating the last_active_at timestamp in models/broadcast_spec.rb

* Format last_active_at timestamp via strftime in index.html.erb

* Remove data_update_script: backfill_last_active_at_for_broadcasts

* Remove ActiveRecord::Dirty method from broadcast.rb

* Adjust callback in broadcast.rb and last_active_at timestamp format in index.html.erb

* Adjust time in #update_last_active_at and add the safe navigation operator to index.html.erb
  * Accounts for nil last_active_at values in the view
  * Uses Time.current in place of Time.zone.now

* Remove last_active_at param from Broadcasts::Controller

* Add spec to broadcasts_spec.rb to test the updated attribute via a request

* Adjust current_time in broadcasts_spec.rb

* Adjust Timecop.freeze in broadcasts_spec.rb to resolve Travis faliure (fingers crossed)

* Adjust expectation to compare against last_active_at timestamp rather than current time

* Adds Timecop back and stores last_active_at timestamp to test against

* Rename last_active_at to active_status_updated_at on Broadcasts table
  - Renames last_active_at to active_status_updated_at in specs
  - Renames last_active_at to active_status_updated_at in model
  - Renames last_active_at to active_status_updated_at in view
  - Adjusts spelling in spec descriptions
  - Rewords active_status_updated_at in view to Last Active On
2020-06-16 13:04:14 -06:00
Rafi
6f3e89f4ed
Rendering html entity in home feed (#8472) 2020-06-16 13:39:07 -04:00
Mac Siri
715a6ff130
[deploy] Update FlareTag not to cache AR object (#8430) 2020-06-16 13:37:08 -04:00
Raphael Noriode
9ada1dda10
Fix Colour Contrast on the User Profile Header (#8406) 2020-06-16 13:36:27 -04:00
Molly Struve
85f784a76c
[deploy] Optimization: Cache Article cache_tagged_with Counts (#8712) 2020-06-16 12:26:52 -05:00
Lisa Sy
bfe663f407
Update chat container of Connect (#8456)
* Update chat container of Connect

- Rename certain class names to improve BEM syntax and naming
- Update typography of message cells
- Update header of message area
- Use new 'info' icon to expand sidebar
- Update form fields for both writing and editing a message
- Implement Crayons styling for 'delete' modal

https://github.com/thepracticaldev/dev.to/issues/8437

* Update some tests aand class names

* Update tests
2020-06-16 10:23:56 -07:00
rhymes
5d4f24c4ae
Remove Audit::Event::Util (#8704)
* Remove Audit::Event::Util

* Fix flaky spec
2020-06-16 12:50:53 -04:00