Commit graph

4012 commits

Author SHA1 Message Date
rhymes
b94dea9b70
Upgrade erb_lint to support latest Rubocop and fix violations (#9663)
* Upgrade erb_lint to support latest Rubocop and fix violations

* Wrong template name
2020-08-07 15:36:48 +02:00
Sai Bhargav
56aea91e45
Fix self closing div tag (#9661) 2020-08-07 15:07:38 +02:00
Brunno Souza
00b9d0ea12
Refactoring ChatChannel - distributing into services (#9253) 2020-08-07 10:41:34 +02:00
Alex
c988481004
[deploy] Cleanup preferred_languages language_settings for users (#9641)
* Cleanup language settings for users

* Remove logic for old language format

* Make preferred_langagues_array.include? nil safe
2020-08-06 10:00:01 -04:00
Julianna Tetreault
5daf162629
[deploy] Update "/internal/badges" route to "/internal/badge_achievements" (#9643)
* Update /internal/badges route to be /internal/badges/award
  -Updates the route
  -Redirects the old route, /internal/badges, to the new route

* Updates the redirect in #award_badges to correct route
  -Updates #award_badges in Internal::Badges::Controller
   to account for the new route, /internal/badges/award

* Adjust route to be /internal/badges/award in admin_awards_badges_spec.rb

* Adjust URL to be /internal/badges/award in badges_spec.rb

* Replace /internal/badges/award with /internal/badge_achievements to follow convention
  -Updates the old route in routes.rb
  -Updates the old route in #award_badges in Internal::Badges::Controller
  -Updates the old route in admin_awards_badges_spec.rb
  -Updates the old route in badges_spec.rb
2020-08-06 09:58:19 -04:00
ludwiczakpawel
dbbe158d21
Buttons: Ghost Dimmed (#9626)
* flare tag line height

* .

* dropdown fix + actions bar fix

* actions bar on mob

* ghost dimmed

* add to page/crayons
2020-08-06 11:03:06 +02:00
Raphael Noriode
269ef9c4f6
Overview of my own series #6938 (#9054)
* add series to dashboard sidebar template

* add series view to the user dashboard

* update typo

* merge master

* modify the dashboard to hold series count that link to the user's series page

* remove schema unnecessary change

* remove controller count from function
2020-08-06 10:54:59 +02:00
Ridhwana
fc86c30790
Profile Admin UI Setup Screen (v1) (#9610)
* Add ProfileField model

* Fix schema.rb

* Add service objects for base and link fields

* feat: show an index of profile fields and allow them to be edited

* Fix schema.rb

* Add service objects for base and link fields

* Add link fields to seeds

* Make placeholder a keyword argument

* Add work fields

* Add explanation column to profile fields

* Add coding fields

* Switch from inheritance to mixin

* Add email checkbox to base fields

* Add branding fields

* Add spec for ProfileFields::FieldDefinition

* chore: moved the migration file

* feat: add a create and destroy route

* feat: render a partial form

* fix: oops form instead of f

* Move migration back into correct location

* Rename column from explanation to description

* Rename attribute in mixin

* chore: update classed for buttons

* chore: rename from explanation to description

* chore: explanation to description

* chore: new profie field

* fix: only one submit button per form

* fix: update the form

* fix: remove files that got merged mistakenly

* chore: finally, some specs...

Co-authored-by: Michael Kohl <citizen428@dev.to>
2020-08-06 09:26:17 +02:00
Jacob Herrington
b8ce85d58d
Ensure all elements are contained by landmarks in mod center (#9608) 2020-08-05 15:49:54 -04:00
Vaidehi Joshi
df990afadc
Conditionally remove no-cache from Fastly headers (#9631) [deploy]
* Rename FastlyHeaders to CachingHeaders, conditionally experiment with removing no-cache

We suspect that it is safe to remove `no-cache` entirely from the Cache-Control headers that are sent
along to Fastly, but there is no great way to confirm this hypothesis. We're testing this by experimenting
on one single article. We will conditionally default to the same headers that we send to Nginx, and send
those headers to Fastly (by removing `no-cache` and adding in `max-age`, which should be ignored since Fastly
also has Surrogate-Control headers added to it, which include a `max-age`, which Fastly should prioritize
over any other `max-age`.

Once we've confirmed that this doesn't cause issues on the Fastly side, we can remove this check and use
the same Cache-Control headers for both Fastly and Nginx.

* Add check for request.env[REQUEST_PATH].present?
2020-08-05 12:34:12 -07:00
Michael Kohl
c2d23cfc4d
[deploy] Seed profile fields (#9605)
* Fix schema.rb

* Add service objects for base and link fields

* Add link fields to seeds

* Make placeholder a keyword argument

* Add work fields

* Add explanation column to profile fields

* Add coding fields

* Switch from inheritance to mixin

* Add email checkbox to base fields

* Add branding fields

* Add spec for ProfileFields::FieldDefinition

* Move migration back into correct location

* Rename column from explanation to description

* Rename attribute in mixin

* chore: rename from explanation to description

* Add ProfileFields::ImportFromCsv

* Simplify ProfileFields::ImportFromCsv

* Add comment about disabled cop to spec

* Add TODO comment to Rake task

* Document mixin

* Add groups to profile fields

Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
2020-08-05 10:11:30 -04:00
Josh Puetz
427ea0b35a
Correct some lingering /admin paths (#9630) [deploy] 2020-08-04 13:16:17 -05:00
Molly Struve
94251c2f30
[deploy] Bug Fix:Redirect to Direct User Channel for Org Listings (#9616) 2020-08-04 10:37:15 -05:00
Kiran Anto
c2f035ae66
homepageFeed: Add null checks in cases where there's no featured story present (#9528) 2020-08-04 09:59:25 +07:00
Michael Kohl
e9bbcbb789
[deploy] Add ProfileField model (#9580)
* Add ProfileField model

* Fix schema.rb

* Fix schema.rb again

* Fix validation
2020-08-03 16:16:50 -04:00
Andy Zhao
3df3d32b1c
[deploy] Revert "[deploy] Prevent signing up with no email (#9584)" (#9614)
This reverts commit a95a5723d1.
2020-08-03 16:16:20 -04:00
Marcy Sutton
21cb27a25e
improve markup of welcome message (#9586) 2020-08-03 16:02:53 -04:00
Molly Struve
d120fc7e54
[deploy] Bug Fix:Rename Listing Search Field in Elasticsearch to Fix Searching (#9609) 2020-08-03 10:18:17 -05:00
Josh Puetz
cda18d0aa4
[deploy] Move Admin interface paths (#9576)
* Move administrate to /resource_admin

* Test fixes

* Update docs
2020-08-03 08:49:23 -04:00
Ben Halpern
952d1cb4ba
[deploy] Remove a few unnecessary css lines (#9602) 2020-08-02 14:31:32 -04:00
Ben Halpern
eb768a24ad
[deploy] Add explicit robots instruction meta tag and adjust cloudinary (#9601)
* Add explicit robots instruction meta tag and adjust cloudinary

* Fix tests

* Fix test to account for random input

* Skip test
2020-08-02 11:25:46 -04:00
Ben Halpern
5e6a651a4f
[deploy] Award badges asynchronously in internal (#9582)
* Award badges asynchronously in internal

* Spec fixes

Co-authored-by: mstruve <mollylbs@gmail.com>
2020-07-31 19:09:51 -04:00
Andy Zhao
a95a5723d1
[deploy] Prevent signing up with no email (#9584)
* Prevent user email from being blank if new user

* Update error message

* Fix tests to handle new blank email user
2020-07-31 17:32:59 -04:00
Lisa Sy
2f09256713
[deploy] Update modal padding to improve visual balance (#9504) 2020-07-31 15:37:29 -04:00
rhymes
864b13b9ab
[deploy] Rubocop: fix Rails/HasManyOrHasOneDependent for Ahoy::Visit and Badge (#9565)
* Fix Layout/EmptyLines

* Fix Rails/HasManyOrHasOneDependent for Ahoy::Visit

* Fix Rails/HasManyOrHasOneDependent for Badge
2020-07-31 11:43:50 -04:00
Michael Kohl
6edb476acd
[deploy] Remove UserOptionalField (#9579)
* Remove UserOptionalField

* Remove optional fields from user and users factory

* Remove optional fields from user spec
2020-07-31 09:59:48 -04:00
PrimeNoodles
f940b1fdc5
Search: replace replaceState with pushState to fix the back button (#9557)
* Made changes from replaceState to pushState for backbutton browsing

* Fixed typo and replaced replaceState with pushState for consistency
2020-07-31 06:59:24 -04:00
ludwiczakpawel
313cd61ee3
Listings redesign (#9349)
* flare tag line height

* .

* dropdown fix + actions bar fix

* actions bar on mob

* .

* css commented out

* .

* button fix

* preload adjustments

* tags

* Fixed listings modal to make it semantic HTML via <dialog />.

* Refactor an a11y fix.

* Removed test that is no longer needed.

* Added missing global function for test..

* Fixed broken <ListingFiltersCategories /> tests.

* Refactor of mobile dropdown for listing categories.

* Updated a TODO.

* Made the clear query button a crayons Preact button.

* padding

* Fixed listings modal for accessiblilty.

* Removed rspecs that are no longer valid.

* We're no longer using the <dialog /> element, at least for now, so CSS changes aren't necessary.

* Wasn't supposed to be committed.

Co-authored-by: Nick Taylor <nick@dev.to>
Co-authored-by: rhymes <rhymes@hey.com>
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-07-30 17:53:35 -04:00
Sarthak Sharma
11820aa29b
[deploy] 🐞Fixes #9503 When joining a new room, user is not taken to the new room (#9564)
* Feature 🚀 : Ability to delete messages in chat channels

- Sending message ID to frontend
- Deleting Message
- Use pusher to delete message realtime

* Minor Bug 🐞: Show message action only for current user

- User can delete or edit their own messages

* Test cases added

* Bug 🐞: Update message id for receiver

Message id was not sent to receiver by pusher

* Refactoring🛠: Message controller refactoring

* Test Cases📝 : Specs for Delete message added

* Feature 🚀 : Ability to edit messages

* Test Cases📝 : Specs for Edit message added

* Merge conflict resolved

* 🐞 Fixes bug #9503 When joining a new room, user is not taken to the new room

Co-authored-by: Narender Singh <narender2031@gmail.com>
2020-07-30 16:21:55 -04:00
Michael Kohl
1a6c6acd45
[deploy] Activate Devise::Lockable (#9535) 2020-07-30 10:28:51 -04:00
Michael Kohl
26ee8f194c
Rubocop: Move from OpenStruct to Struct in Organization (#9431)
* Move from OpenStruct to Struct in Organization

* Add data update script

* Introduce Articles::CachedEntity model

* Update data update script for new model

* Fix comment

* Update jbuilder
2020-07-30 21:04:05 +07:00
Molly Struve
6ac637b9ef
[deploy] Boost Scores For Adjacent Words (#9562)
* Feature:Boost Scores For Adjacent Words

* using equal for spec array to ensure order
2020-07-30 15:24:11 +02:00
Takuma
2650092abb
[deploy] Fix showing unpublished article edit link (#9511)
* Fix showing unpublished article edit link

* Change if clauses to surround only edit link

* Fix: use ArticlePolicy.update? instead of checking article update authority manually
2020-07-30 15:18:30 +02:00
Nick Taylor
3402856fdc
Make <Modal /> component more accessible (#9563)
* Used <dialog /> for modal to stay on the semantic HTML train.

* Added tests and fixed a11y issues with <Modal /> component.
2020-07-29 10:35:42 -04:00
Alberto Pérez de Rada Fiol
115adbb1bd
[deploy] Add index and show pages for series (#9201)
* Add index and show pages for series

* Address code review

* Use `id` instead of `slug` to get collections

* Extract `collection_link` into the application helper

* Only count published articles

* Get rid of the `collection_link_class` method

* Add tests

* Fix test

* Use `**kwargs` instead of `options = {}`
2020-07-29 10:01:52 -04:00
rhymes
5a2cae4fbb
Rubocop: enable and fix new Rails cops (#9537)
* Enable new Rails/* cops and use autocorrect on them

* Fixed Rails/PluckInWhere leftovers

* Fix Rails/DefaultScope

* Enable and fix Rails/PluckId

* Fix manual mistake with forcing autocorrection on Rails/PluckId

* Apply PR feedback to remove Rails/PluckId inline disables

* Apply PR feedback to get rid of Rails/PluckInWhere inline
2020-07-29 11:14:19 +02:00
rhymes
bbd56875c7
Rubocop: address feedback of #9430 and use kwargs (#9538)
* Use fetch.to_i

* Rubocop: address feedback of #9430 and use kwargs
2020-07-29 11:13:36 +02:00
Molly Struve
e2e034b910
[deploy] Refactor:Remove No Longer Needed Timber Logging (#9555) 2020-07-28 14:00:38 -05:00
Andy Zhao
a589529269
[deploy] Allow org admins to delete their organizations (#9357)
* Add destroy organization backend

* Add view for deleting org

* Add new line to end of file

* Refactor and move destroyable? to model

* Use a nice card to distinguish the message

* Prevent organizations from being deleted if they have credits

* Fix codeclimate issues

* Remove let_it_be_changeable for flakiness
2020-07-28 12:00:15 -04:00
Ben Halpern
8d1a9e7a1c
Show article year if article published last year (#9547)
* Show article year if article published last year

* Fix tests
2020-07-28 10:32:20 -04:00
Nick Taylor
11cd1cb0fc
Upgraded to css-loader 4.0.0 (#9548) 2020-07-28 09:45:13 -04:00
Mac Siri
e330298561
[deploy] Update instantClick's script clone logic (#9542) 2020-07-28 09:06:58 -04:00
Sophia
f9137b2abd
[deploy] Update <ImageUploader /> class component to use hooks (#9369) 2020-07-27 17:09:28 -04:00
Fernando Valverde
5d55299ac3
[deploy] Removes intrusive mobile video autoplay & adds ahoy for visibility (#9539)
* Removes intrusive mobile video autoplay & adds ahoy for visibility

* web video has autoplay enabled

* Implements feedback on video player ahoy events

* use strict equality
2020-07-27 13:11:40 -06:00
Emma Goto
d98f143146
[deploy] Make UX settings save button sticky when modified (#9478)
* Add sticky footer to UX settings page  when changes are made

* Add missing spaces to html object
2020-07-27 12:52:21 -04:00
Molly Struve
386c3e9fa7
[deploy] Optimization/Bug Fix:Only Send Mentioned User Notifications, not all for every message (#9493) 2020-07-27 11:16:41 -05:00
Michael Kohl
57359091a9
Replace dry-struct with ActiveModel (#9534) 2020-07-27 17:42:37 +02:00
Bogdan Covrig
90d53173f5
Change DEV doc to Forem doc on account page (#9507)
* Change DEV doc to Forem doc on account page

* Change Forem API to <community> API for clarification reasons

Make the copy more clear – there is no central Forem API, more like each instance of Forem is having its own API.

Co-authored-by: Molly Struve <mollylbs@gmail.com>

Co-authored-by: Molly Struve <mollylbs@gmail.com>
2020-07-27 10:14:27 -04:00
Ben Halpern
dba75110bb
Change copy away from dev.to (#9494) 2020-07-27 10:02:06 -04:00
Ben Halpern
aab0685b93
Add sign in options button to modal (#9506) 2020-07-27 09:28:41 -04:00