Commit graph

992 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
Molly Struve
330009995d
[deploy] Optimization:Index Chat Channel Memberships Async on Message Creation (#9491) 2020-07-24 09:52:42 -05: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
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
Ben Halpern
1b22cdd1c9
[deploy] Change from presence to private pusher channels (#9401) 2020-07-20 12:59:26 -04: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
a4dadfb728
Standardize ActiveRecord order clauses (#9395)
* Change simple order clauses

* Change nested order clauses
2020-07-20 10:00:51 -04: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
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
rhymes
696c712883
Rubocop: routine fixes (#9345)
* rubocop -A

* Fix Style/HashLikeCase

* regenerated todo file
2020-07-16 18:18:13 +02:00
benhalpern
a18e5912e9 Remove extra space 2020-07-16 10:22:49 -04: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
benhalpern
98242dc68b Initial work 2020-07-16 06:59:20 -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
Michael Kohl
0633d85b6b
Remove outdated comment (#9323) 2020-07-15 13:26:18 +02: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
1166370818
Rubocop: activate Layout/ClassStructure (#9304) 2020-07-14 18:28:18 +02:00
rhymes
3ab9b91575
Routine Rubocop fixes (#9302)
* rubocop -A

* rubocop --auto-gen-config

* Fix sorting in Bundler/OrderedGems to consider punctuation
2020-07-14 17:24:03 +02:00
Julianna Tetreault
5f143c4308
Add Polymorphism to Broadcasts (Part 1) (#9231) [deploy]
* Add polymorphism to Broadcasts table
  - Adds a broadcastable_id column to Broadcasts
  - Adds a broadcastable_type column to Broadcasts

* Create Announcements and Welcome Notifications tables
  - Adds an Announcements table
  - Adds a Welcome Notifications table
  - Adds timestamps to both tables
  - Adds banner_style column to Announcements table

* Adds Announcement and Welcome Notification models
  - Adds an Announcement model in prep for polymorphism
  - Adds a WelcomeNotification model in prep for polymorphism

* Add data_update script to backfill type_of column for Broadcasts

* Add unique index on broadcastable_type and broadcastable_id on the Broadcasts table

* Add update! to the data_update script to backfill broadcastable_type
2020-07-13 09:36:19 -06:00
rhymes
5affc7c08c
[deploy] Revert "Rubocop: fix Performance/OpenStruct (#9241)" (#9291)
This reverts commit 101cca4a68.
2020-07-13 17:22:58 +02:00
rhymes
ba82e72aa4
Fix Rails/OutputSafety violations (#9244) 2020-07-11 11:36:24 +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
8126c5c2c1
Rubocop: Address Metrics/BlockLength violations (#9246)
* Address Metrics/BlockLength violations

* Add jbuilder to package auto correct
2020-07-10 13:53:32 -04:00
Molly Struve
fad259b1c8
[deploy] Bug Fix: Remove Rails Validation for Follow Uniqueness, Guard against dup Follow Jobs (#9222) 2020-07-09 09:50:06 -05: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
rhymes
5b62811c98
[deploy] Rubocop: fix violations of Layout/LineLength (#9197) 2020-07-08 08:36:36 -05:00