Commit graph

809 commits

Author SHA1 Message Date
Brunno Souza
00b9d0ea12
Refactoring ChatChannel - distributing into services (#9253) 2020-08-07 10:41:34 +02: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
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
Josh Puetz
427ea0b35a
Correct some lingering /admin paths (#9630) [deploy] 2020-08-04 13:16:17 -05: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
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
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
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
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
Michael Kohl
1a6c6acd45
[deploy] Activate Devise::Lockable (#9535) 2020-07-30 10:28:51 -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
Molly Struve
b40af82b66
Flaky Spec Fix:Remove let_it_be Test Prof Helper (#9556)
* Flaky Spec Fix:Remove let_it_be Test Prof Helper

* Spec cleanup and fixes
2020-07-29 11:31:01 +02: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
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
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
Molly Struve
f84f88f9bf
Flaky Spec Fix:Remove let_it_be usage from Comment Model Spec (#9529) 2020-07-26 17:22:51 -05:00
Molly Struve
bc5e114ce9
Flaky Spec Fix:Remove let_it_be To Prevent Bad Database State Failing Specs (#9512) 2020-07-26 12:32:32 -05:00
rhymes
0b4ad49cf8
Rubocop: Enable and fix Style/OptionHash (#9430)
* Enable and fix Style/OptionHash

* Add 10 seconds default timeout to DB statements
2020-07-25 10:41:21 +02:00
Jacob Herrington
b26919e79b
[deploy] Fix archived readinglist reactions affecting count (#9044)
* Fix archived readinglist reactions affecting count

The reading list count badge on the home page currently takes all
readinglist reactions into account, but we shouldn't be including those
that are marked "archived."

Secondarily this fixes a bug that affects only admin users: all
reactions created by admins were given the status "confirmed"
instead of the expected "valid" status.
2020-07-24 14:18:35 -05:00
Michael Kohl
96b0d7fa09
Make credit pricing configurable (#9326)
* Add credit prices to SiteConfig

* Add credit prices to /internal/config

* Fix spec and transform values on update
2020-07-24 12:03:13 -04:00
Michael Kohl
8425c847c3
Update CODEOWNERS and team names in TODO comments (#9460)
* Update CODEOWNERS

* Update teams in TODO comments

* Remove mentions of team cool
2020-07-24 12:17:20 +07:00
Michael Kohl
fdedaa83cf
[deploy] Validate password confirmation when updating password (#9458)
* Validate password confirmation when updating password

* Fix Authentication::Authenticator

* Add comment about Devise
2020-07-24 09:08:52 +07:00
Andy Zhao
9bdef4d4ae
[deploy] Update /ban for Connect (#9459)
* Rough MVP of /ban v2

* Make snackbar dismissable

* Make unban work

* Clean up response for happy and sad paths

* Fix tests

* Fix policy spec
2020-07-23 09:49:54 -04:00
Molly Struve
91c6541f57
Bug Fix:Validate User Password Length is Between 8-100 characters (#9447) 2020-07-22 11:40:23 -04:00
Andy Zhao
32c413f182
[deploy] Default to adding users as members to a chat channel and not mods (#9446) 2020-07-22 10:51:44 -04:00
rhymes
88f0a0e58a
Rubocop: re-activate Style/RegexpLiteral and fix violations (#9418)
* Rubocop: re-activate Style/RegexpLiteral and fix violations

* Add 10 seconds default timeout to DB statements
2020-07-22 16:28:27 +02:00
Veggier
126367fa4a
Ability for admins to remove user from internal chat channels (#9235)
* change ui

* admins can remove users from internal chat channels

* rename destroy to remove_user

* change syntax

* add a single user

* remove a single user --debug

* remove a single user --debug

* remove a single user

* remove a single user

* remove a single user

* remove a single user

* add test for remove single user from internal chat_channel

* test

* sytax change

* add delete user for channel test

* add more test case for the remove user from chat channel

* change to single test case
2020-07-22 09:43:38 -04:00
narender2031
0cfc593150
[deploy] 🚀 Feature: Chat channel request manager (#9305)
* 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

* request manager info API

* 👨🏼‍🎨 Design added for requestCenter

* integrate request manager with API

* remove unused argument

* fix request manager card UI

* fix request card UI

* add request manager button

* handle no invitaion UI

* fix badge UI

* add request specs

* add jest specs

* remove the presenter

* fix code climate issues

* fix queries

* fix runbocop issues

* fix PR suggestions

* remove empty lines

Co-authored-by: Sarthak Sharma <7lovesharma7@gmail.com>
2020-07-22 09:12:09 -04:00
Michael Kohl
2fe4a36271
[deploy] Add audit logs for credit card actions (#9416)
* Add AuditLog entries for credit card actions

* Update docs

* Update category and slug

* Update audit log example in docs
2020-07-22 08:23:42 +07:00
luigi
7c22026d30
Use Enumerable#filter_map in more places (#9389)
because it's a little faster without lose readability
2020-07-20 18:54:38 +02:00
rhymes
6cd64c4071
Rubocop: enable and fix Style/Send and Style/Next (#9366)
* Enable and fix Style/Send

* Enable and fix Style/Next

* Fix private cookies send

* Fix merging indentation issues
2020-07-20 16:28:00 +02:00
Michael Kohl
8dd4a85fba
Introduce domain model for campaigns (#9300)
* Introduce domain model for campaigns

* Move main_tag method to decorator

* Add options argument to decorator method

* Change more code to use Campaign domain model

* active? -> show_in_sidebar? and fix spec

* Switch back to leading dots after merge
2020-07-20 09:04:53 -04:00
Sarthak Sharma
3addb64326
[deploy] 🚀 Feature: Chat channel membership manager component (#8945)
* 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

* fix video content issue

* add UI for membership management

* add api to update memberahip role

* add methods for manage membership

* Add integration test cases

* add emoji for admin

* Open member profile in sidecar only

* 🐞 Problem with direct channel sidecar

* 🐞 Few other UI enhancements

* fix mod typo

* add limit upto 4 for display active memberships

* fix UI issues

* fix action ui for membership

* fix sidebar redirection issue

* fix svg buttons

* add test cases

* fixed broken spec

* fix PR suggestions

* remove not used code

* fix typo

* fix PR suggestion

* fix typos

* add invitation url expiry

* fix specs

* fix PR suggestions

* removed unused gem

* remove presenter format

* handle invitation link expiry with redis

* fix PR suggestions

* user can view non-discoverable channel invitation link

* fix typos

* remove commented code

* add spacing

* PR suggestions

* remove class from button

* replace componentDidMount with commen function

* remove action button for single membership

* add chat message on update role

* add spece between lines

Co-authored-by: Narender Singh <narender2031@gmail.com>
Co-authored-by: Fernando Valverde <fdov88@gmail.com>
2020-07-20 08:08:31 -04:00
Molly Struve
62d43a1ce7
[deploy] Refactor: Remove Block Model and All Related Code (#9370) 2020-07-17 15:32:39 -05:00
benhalpern
b564592a4e Fix test typo 2020-07-17 13:38:47 -04:00
benhalpern
dcf3af7cff Fix test copy 2020-07-16 15:16:18 -04:00
narender2031
2a5f5053b7
[deploy] Fix non channel details visible (#9252)
* 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

* fix pending invitation issue

* non active member blocked to open channel details

* add specs for bug fix

Co-authored-by: Sarthak Sharma <7lovesharma7@gmail.com>
2020-07-16 09:28:28 -06:00
benhalpern
b611a9847a Enable public or private forem config 2020-07-16 09:58:00 -04:00
rhymes
f1ec04a0c9
Rubocop: move dot in multi-line calls to leading position (#9262) 2020-07-16 15:51:11 +02:00
Alex
204fb51f14
[deploy] Remove path redirects (#9350)
* Remove path_redirect menu item

* Remove path_redirects_controller

* Remove path_redirect routes

* Remove PathRedirect model

* Remove internal views

* Remove path_redirects from seed file

* Remove PathRedirect factory

* Remove specs

* Migration to drop table and update schema
2020-07-16 09:35:42 -04:00
Ben Halpern
da6a6739e5
[deploy] Invite users to join and create password (#9294)
* Initial invitation work

* Add more invitation code

* Add proper registration page

* Fix up tests

* Fix failings

* Fix spec

* Add self-serve auth config

* Add registered condition

* Change profile image call and registered_at test

* Change comment

* Fix copy test

* Stub emojipedia

* Linting

* Add registered at to factory

* Ensure registered for user tag

* Update app/views/internal/invitations/index.html.erb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update app/controllers/internal/invitations_controller.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Slight changes

* Update recover password flow

* Update app/views/internal/invitations/index.html.erb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update app/controllers/internal/invitations_controller.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update db/schema.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>
2020-07-15 11:37:19 -04:00
Ben Halpern
70a060b71c
[deploy] Make sidebar sponsor headline configurable (#9251)
* Make sidebar sponsor headline configurable

* Fix spec

* Fix spec typo
2020-07-14 20:18:59 -04:00
rhymes
5affc7c08c
[deploy] Revert "Rubocop: fix Performance/OpenStruct (#9241)" (#9291)
This reverts commit 101cca4a68.
2020-07-13 17:22:58 +02:00
rhymes
101cca4a68
Rubocop: fix Performance/OpenStruct (#9241)
* Fix Performance/OpenStruct in Article and Organization

* Fix Performance/OpenStruct in Notifications::Reactions::Send

* Add missing rubocop disable for Performance/OpenStruct

* Fix serialization
2020-07-11 10:13:18 +02:00
rhymes
ffc96db209
Rubocop: fix additional violations in todo file (#9218) 2020-07-09 10:25:44 -04:00
Ridhwana
6029948c1a
[deploy] Make the mobile Navigation icons configurable (#9056)
* chore: make the icons dynamic from site config

* feat: update the navbar icons

* feat: update the descriptions

* chore: update the icons

* chore: update the names to be more reflective

* chore: freeze  mutable objects assigned to constants

* chore: update Line is too long.

* icons

* update lightning icon

* chore: read from file

* path here is relative, so use Rails root

* revert to original icons and run svgo on it

* no newline

* feat: update height, width
2020-07-08 20:09:48 +02:00
Alex
bac350e877
[deploy] Add role and docs for user subscription liquid tag (#9170)
* Create new restriced_liquid_tag role

* Update role spec

* Use new role over admin

* Add documentation for user_subscription_liquid_tag

* Stub roles to help avoid flaky specs

* Add user approved liquid tags to edit view

* Remove "simply". Coding is hard, yo!

* Update liquid_help

* Update liquid help

* Update and refactor dashboard specs

* Refactor role check for liquid tag docs

* Improve docs wording
2020-07-08 14:07:53 -04:00