Commit graph

62 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
Alberto Pérez de Rada Fiol
81f77715a6
Fix erblint errors on the app/views/mailers folder (#8402) 2020-06-11 11:34:52 -04:00
Ridhwana
02109e8e9a
feat: update the DEV Digest to be fully dynamic (#8213) 2020-06-01 13:56:29 -04:00
Ridhwana
1a40e10df8
Update the tag moderation email (#8048)
* feat: update the tag mod text

* feat: channel slug

* feat: updates

* feat: update text

* chore: change
2020-05-28 17:46:41 +02:00
Michael Kohl
7f75f99560
[deploy] Rename classified listings (#7910)
* Change models and related files

* Update controllers and specs

* More renaming

* Seek and destroy, I mean search and replace

* Round up the stragglers

* Ground control to Major Travis...

* More fixes

* PR feedback

* Various fixes

* Rename view

* Fix list query builder

* Unify request specs

* Fix some API spec errors

* Fix remaining API specs

* Make spec conform to API

* Fix leftover problems

* Fix JS tests

* Fix column name in select

* Fix API specs

* Fix search specs

* Paging Mr. Travis
2020-05-27 13:35:09 +00:00
Molly Struve
1c461f8891
[deploy] Remove Unused Pro Memberships (#7894) 2020-05-20 11:54:30 -05:00
Sarthak Sharma
90d60bf73f
[deploy] 🚀 Feature: Ability to search discoverable channels and send request to join (#7385)
* 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

* added new column discoverable for public channel and changes in elasticsearch

* fix corrections

* changes in serializer file, added channel_discoverable

* added checkbox with discoverable policy

* changes in code for discoverable channels

* accept and reject member invitation by mod

* add joining request to closed groups

* fixed merge error

* changes in joining member to closed groups

* join to closed group

* changes in message action of joining

* changes in chat upopened json

* 🚀Feature : Ability to search Global Channels

* touch updated_at in after commit update

* 🚀Feature : Ability to send request to discoverable channel

* 🚀Feature : Ability to send request to discoverable channel

* created new route for joining closed channel

* 🚀 Success handle on joining request sent

* removed redundant code

* join_channel improvement, removed authorization for join channel

* list of joining requests

* added joining_request status channels on search list

* changes in mailer and query builder optimized

* 🛠 Adding filter for new Query

* added rspec for add membership method in controller

* rspec for sending join channel request

* invite join request channel list rspec

* test case for query builder discoverable

* viewable and discoverable channel list

* refactored logic for search channels

* 🚀 Check if Request already sent

* 🛠 Optimizing code and making channelButton Component

* 🛠 Optimizing codefor SVG problem

* 🛠 Optimized action.js

* changes in search controller query

* hot fix

* removed unwanted code

* 🛠  Fix the Channel Name problem

* 🛠  Optimizing code further for CodeClimate

* added new column discoverable for public channel and changes in elasticsearch

* fix corrections

* changes in serializer file, added channel_discoverable

* added checkbox with discoverable policy

* changes in code for discoverable channels

* accept and reject member invitation by mod

* add joining request to closed groups

* fixed merge error

* changes in joining member to closed groups

* join to closed group

* changes in message action of joining

* changes in chat upopened json

* touch updated_at in after commit update

* 🚀Feature : Ability to search Global Channels

* 🚀Feature : Ability to send request to discoverable channel

* 🚀Feature : Ability to send request to discoverable channel

* created new route for joining closed channel

* 🚀 Success handle on joining request sent

* removed redundant code

* join_channel improvement, removed authorization for join channel

* list of joining requests

* added joining_request status channels on search list

* changes in mailer and query builder optimized

* added rspec for add membership method in controller

* rspec for sending join channel request

* invite join request channel list rspec

* 🛠 Adding filter for new Query

* test case for query builder discoverable

* viewable and discoverable channel list

* refactored logic for search channels

* 🚀 Check if Request already sent

* 🛠 Optimizing code and making channelButton Component

* 🛠 Optimizing codefor SVG problem

* 🛠 Optimized action.js

* changes in search controller query

* hot fix

* 🛠  Fix the Channel Name problem

* 🛠  Fixing merge problem

* 🛠  Optimizing code further for CodeClimate

* updated UI for membership edit

* fixed test casses and fixed UI for chat_channel_edit

* 🛠napshots added

* test cases fixed

* 🛠 Test cases added for new component

* channel settings accesible only by mod

* 🛠 More Test cases added

* 🛠 Svg code optimized

* 🛠 Svg code optimized in videocontent

* optimized code for search query

* fix test case for query builder

* changes in joining closed channel logic

* refactored join channel

* redirect to edit channel after joining request

* changes in test case for redirect

* optimized code

* 🛠 Eslint bugs fixed

* test case fixed

* optimization

* olving channel repetition problem

* optimization of code for query builder

* changes in query builder

* test cases fixed

* 🛠 Handling reduntant data on frontend

* 🛠  Don't show data if no filter query

* 🛠 Optimized code for fixing bugs and code coverage

* 🛠  Optimizing code further for CodeClimate

Co-authored-by: Parasgr-code <paras.gaur@skynox.tech>
2020-05-11 09:29:15 -04:00
Anna Buianova
500cf7f271
Replaced ApplicationConfig with app_url in views (#7708)
* Replaced ApplicationConfig with app_url in views
* Refactored urls in mailers
2020-05-08 13:19:29 +03:00
Jacob Herrington
a4f71c22b6
[deploy] Add automated email ownership emails (#7556)
* Add automated email ownership emails

This is task Michael does manually a lot. There are a lot of cases where
we need to validate that an individual has access to the email address
associated with their DEV account. This automates a singificant portion
of that, and hopefully we can use it in a lot of places.
2020-05-06 12:07:54 -05:00
Ridhwana
a9b2508664
[deploy] Configure the community_member_label (rails console update required) (#7564)
* feat: add base site config

* chore: rename developer/developers

* feat: update to use community_member_label

* chore: amend text

* chore: update spec

* chore: extra space
2020-04-28 16:56:29 +02:00
Ridhwana
8140e46ceb
Add some placeholder pages (#7441)
* feat: add placeholders for some routes

* about_listings_url

* feat: tag-moderation

* chore: about_listings_url test

* chore: use post a job url

* chore: add pages methods

* chore: just reordered stuff

* oops forgot to save - oh man

* chore: change to single quotes

* chore: hopefully retrigger cc

* chore: update tests

* feat: PR suggestions:)

* chore: spec
2020-04-28 15:55:59 +02:00
Ridhwana
b9a8d87e95
[deploy] Refactor to create a helper for the mailer links (#7502)
* refactor: set the email_from to use in teh defaults

* chore: remove some new lines

* feat: add a mail link helper that can be used in the views

* feat: returns the default if it doesn't understand the parameter

* feat: Quick replacement of links

* feat: allow subject to be passed through

* chore: update all hrefs

* chore: remove rel attribute

* chore: mail link

* update spec

* chore: space

* chore: update some whitespaces and emails

* style

* chore: PR mail_link to email_link and the comment

* feat: PR suggestions for encoding

* feat: use mail_to
2020-04-27 09:18:16 -04:00
Lucas Hiago
d989b9d842
Add style for images on email to turn them responsiveness (#7247)
* Change property for max-width to turn more responsive

* Change css property for images to turn more responsive in mention email
2020-04-26 12:33:16 +02:00
Ridhwana
17fdc556ee
Generalization: Replace static dev emails with configurable ones. (#7438)
* feat: update the email addresses in the site config

* chore: update the default email address everywhere

* feat: update the template for the config

* chore: remove default_site_mail as an allowed parameter

* feat: change biz@dev.to to teh business email address and with a subject

* feat: update partners@dev.to to use SiteConfig.email_addresses[:business]

* feta: update to business email address

* feat: update members@dev.to to use the site config

* feat: update privacy email

* chore: Anna's suggestion to loop through object instead of keys
2020-04-23 11:26:58 +02:00
Ridhwana
a2f1a0049f
Removal of morrrre hardcoded dev.to links (#7390)
* feat: remove 90% of hardcoded dev.to links now

* chore: update tests

* chore: implement suggested changes

* chore: update url

* chore: update to use URL helper
2020-04-21 11:50:18 +02:00
Ridhwana
6dbc838bae
[deploy] Update our mailers to be generalized (#7359)
* feat: make the from in the email to be dynamic

* feat: hardcoded mailer dev.to

* feat: oops hardcoded email addresses in the terms

* chore: remove some whitespace

* update editor guide

* feat: new reply email

* feat: new message mailer

* feat: new follower email

* feat: capitalize the button

* feat: rename the link

* feat: capitalize the button

* feat: generalize the urls

* feat: generalise the url

* feat: dynamic DEV

* feat: update the specs

* feat: DEV digest generalisation part 1

* fix: the method is accessed by tag_url and so the default parameter needs to be set at this level and not at self.tag

* fix: use the tag model instance instead of passing through just the tag name (so that we can use tag_url)

* chore: make code climate happy

* chore: more robocop

* feat: add a default url back for self.tag

* test: fix the feedback helper spec

* fix: spec to be general

* fix: oops :(

* refactor: user_settings_path

* chore: use code_of_conduct_path

* chore: robocop

* chore: use connect path

* chore; use the notifications symbol

* chore: misc path

* feat: simplify url

* feat/fix: change the order of the helpers and use user_url

* chore: user_url

* capitalise

* chore: update article path
2020-04-17 15:35:35 -04:00
Ridhwana
586703f9b7
[deploy] Cleanup some more dev.to generalisation (#7263)
* feat: rename ApplicationConfig[COMMUNITY_NAME] to just community_name

* refactor: use the method name defined in the file

* chore: use community name on the information template

* refactor: move the social media links into a partial

* chore: reuse the css

* chore: update the partners page

* chore: make the code-of conduct DEV related vars dynamic

* feat: update the code of conduct

* feat: first pass at the editor guide

* feat: update more templates (maybe this one should go?)

* feat: update the tags page

* feat: set configurable email

* feat: article urls updated to be dynamic

* feat: add comment

* feat: update rss guide to use local dev

* chore: revert hashtag as it will come from https://github.com/thepracticaldev/dev.to/issues/7254

* chore: string interpolation

* feat: add the code for the svg resizing on the information page.
2020-04-14 21:30:13 -04:00
Ridhwana
8e3ba184e7
Update all the static (i.e. DEV or dev.to) text on mailers to be dynamic (#7216)
* feat: update all the static text on mailers to be dynamic

* feat: use community_qualified_name
2020-04-10 12:48:38 -04:00
Ben Halpern
c1cf1df7a9
[deploy] Fix up connect group issues (#7051)
* Fix up connect group issues

* Fix spec

* Fix spec
2020-04-02 21:58:59 -04:00
rhymes
cf1f6cc209
Make sure there is no empty <p> in the badge email (#7043) 2020-04-02 18:25:51 -04:00
rhymes
2926f6be12
[deploy] Strengthen badge achievement code and fix badge email (#7000)
* Add badges and badge achievements to seeds

* Strengthen BadgeAchievement code and fix mailer bug

* Add indentation
2020-04-02 09:14:10 -04:00
Anna Buianova
0457fa4e9d
Removed unused scholarships code (#7023) 2020-04-02 08:15:00 -04:00
jituraj98
e2edf960dc
[deploy] Connect: move settings to sidecar iframe, improve invitations and remove experimental features (#6903)
* 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

* Move channel settings to sidecar

* added spec for chat_channels_memberships_controller.rb (#6539)

* added spec for chat_channels_memberships_controller.rb

* simplified record not found error for membership

* error message formatting updated

* added error key in flash message

Co-authored-by: jitendra <jitendrarajpurohit@skynox.tech>

* Refining "Move sidecar to iframe" branch (#6634)

* added spec for chat_channels_memberships_controller.rb

* simplified record not found error for membership

* error message formatting updated

* added error key in flash message

* 🐞 Bug Fix: Open sidecar of clicking @all

* 🐞 Bug Fix: adding space after selecting the username from suggestion box

* added remove channel member functionality for moderators

* 🔩 Small Tweaks: Hover issue fixed

* 🐞 Bug Fix: Remove sidecar toggle on @all tag (for now)

* updated manually constructed urls with rails path helpers

* mod users cannot remove members of other channel

Co-authored-by: jitendra <jitendrarajpurohit@skynox.tech>

* 🚀 Finalising the connect group/channel feature.  (#6829)

* added spec for chat_channels_memberships_controller.rb

* simplified record not found error for membership

* error message formatting updated

* added error key in flash message

* 🐞 Bug Fix: Open sidecar of clicking @all

* 🐞 Bug Fix: adding space after selecting the username from suggestion box

* added remove channel member functionality for moderators

* 🔩 Small Tweaks: Hover issue fixed

* 🐞 Bug Fix: Remove sidecar toggle on @all tag (for now)

* updated manually constructed urls with rails path helpers

* mod users cannot remove members of other channel

* mod members can now invite user who have left the channel

* 🐞 Bug Fix: Ability to open sidecar on mention all properly

* Eslint Changes

* send email notification on inviting user feature added

* 🛠  Email design enhancements for channel invitation

* send invitation to mod user added from internal

* 🛠  Gif changes for Mod

* spec fixed

* inviter name issue fixed

* 🚀 Open sidecar when automatically if you use link from email

Co-authored-by: jitendra <jitendrarajpurohit@skynox.tech>

* review changes

* added spec for channel_invite_email

* Bug🐞: Design problem with sidecar after merge

* Bug🐞: Design problem with invitation alert box

* replaced instance variables with local variable

* Bug🐞: Wrong css classes fixed

* Bug🐞: Edit option bug

* yarn.lock file updated

* code review changes

* updated manually constructed urls with rails path helpers in spec

* user name url issue fix in invite email

* user url corrected

Co-authored-by: Sarthak Sharma <7lovesharma7@gmail.com>
Co-authored-by: benhalpern <bendhalpern@gmail.com>
2020-04-01 12:13:26 -04:00
Molly Struve
93e1a19a4d
only show link to original commentable if it exists (#6810) [deploy] 2020-03-24 10:13:41 -05:00
Molly Struve
3187514ad6
handle a missing commentable in new reply email (#6792) [deploy] 2020-03-23 16:40:51 -05:00
Jacob Herrington
243e9b5524
Add a form to email users from internal (#6668)
Co-authored-by: MichaelaHunter <michaela1234@gmail.com>

Co-authored-by: MichaelaHunter <michaela1234@gmail.com>
2020-03-17 11:19:42 -04:00
rhymes
145d5e610e
Use scopes for Follow instead of where all the time (#6149) [deploy] 2020-02-25 19:29:52 -05:00
Michael Kohl
728a05c476 Move from env variables to SiteConfig (#5385) [deploy]
* Move from env variables to SiteConfig

Related to #5384

This PR only deals with the first remaining part outlined in the issue, starting to use existing SiteConfig keys instead of the env variables.

* Restore Envfile to original version for now
2020-01-07 16:36:24 -05:00
Anna Buianova
cfd5434d6c User deletion by email (#4863) [deploy]
* Action to request account deletion by email

* Confirmation page for user destroy

* Remove some of the old destroy user code

* System tests for user destroy

* Moved user destroy tokens to redis

* Change tests according to the new user destroy token storage (in redis)

* Added info about the link to user delete confirmation email

* Remove blank like from schema.rb

* Delete user destroy token on user delete

* Update confirm user destroy js
2019-11-29 13:47:11 -05:00
Mohab Abd El-Dayem
2c80e9da42 Make The Default Email An Enviroment Variable. (#4677)
* Make the default email an enviroment variable

* Added spaces in Envfile for readability
2019-11-01 09:03:06 -04:00
rhymes
c8abbe9d60 Pro: memberships (#3461)
* Add ProMembership model

* Implement ProMembershipsController#create

* Implement basic ProMembershipsController#show

* Add ProMembership to ledger

* Populate user history after pro subscription is created

* Add fields for expiration notifications

* Add ProMemberships::ExpirationNotifier to notify users of expiring memberships

* Add tasks for recurring jobs to notify users of expiration

* Add auto_recharge column to ProMembership

* Add ProMemberships::Biller (incomplete)

* Fix specs

* Add ProMembership to Administrate

* Fix spec

* Add has_enough_credits? to User and Organization

* Add Payments::Customer class

* Finish ProMembership::Biller functionality

* Fix ProMemberships::Creator check for credits

* Disable destroy actions for ProMembershipsController

* Correctly authenticate ProMembershipsController actions

* Make sure only pro user's history can be indexed

* Add ProMembershipsController#update action for auto recharge

* Use regular AR to save new credits and add touch to the purchaser

* Clarify Pro membership create policy

* Display information about an existing pro membership

* Add UI to show page

* Add system test for Pro membership creation

* Implement edit membership

* Make sure users with pro memberships can access history and dashboard pro

* Fix padding issue

* Show a different text for a user that has credits but not enough for Pro

* Move Pro Membership functionality inside settings

* Update Pro Membership link in email notifications

* Bust all relevant caches

* Add the Pro checkmark around the website

* Use Users::ResaveArticlesJob instead of delay

* Add/remove user from pro-members chat channel

* Use the appropriate Pro checkmark

* Remove unfinished pro elements

* Remove checkmark JS
2019-09-24 10:38:54 -07:00
Rishabh Budhiraja
653a266141 Fix links in badge email (#4006) 2019-09-11 15:55:15 -04:00
Andy Zhao
aadd376f9c Use explicit email domain for badge email links and minor cleanup (#3943)
* Set domain for badge email links

* Add credits + listings info to plain text badge email

* Update environment variable setting

* Use ENV when ApplicationConfig has not been init
2019-09-06 10:20:48 -04:00
Mac Siri
c9e1f1fcf3 Add listings to DEV digests (#3854)
* Add listings to digest emailers

* Update app/views/mailers/digest_mailer/digest_email.html.erb

Co-Authored-By: Ben Halpern <bendhalpern@gmail.com>

* Remove margins
2019-08-28 21:28:46 -04:00
Ben Halpern
208bbb3757
Improve mod roundrobin notification and internal tooling (#3855)
* Improve mod roundrobin notification and internal tooling

* Fix tests
2019-08-27 21:54:09 -04:00
Ben Halpern
cbe599e2eb
Adjust internal page logic and add credits copy to notifications (#3843)
* Adjust internal page logic and add credits copy to notifications

* Adjust badge email copy
2019-08-26 13:41:13 -04:00
rhymes
8f5706fcc1 Remove all old membership code, see 97040ab6 (#3575) 2019-07-30 12:33:50 -04:00
rhymes
91de529705 Remove code for legacy mentoring feature (#3186) 2019-06-21 17:18:11 -04:00
rhymes
e626002260 Add alternative texts to images (#2771) [ci skip] 2019-05-09 11:16:03 -04:00
rhymes
783c966c72 Add mailers specs for tracking (#2523)
* Add tracking and missing specs for DigestMailer

* Add tracking and missing specs for MembershipMailer

* Add tracking and missing specs for NotifyMailer

* Add tracking and missing specs for ScholarshipMailer
2019-04-23 12:38:11 -04:00
rhymes
5782ffd7e0 Use published scope for articles (#2374)
* Use published scope for articles

* Fix variable name

* The sequencing in the union query matters

* Fix spec

* Restore a published: true condition

* This test is actually misleading due to the union

* Revert this change, not sure why it's not a relation

* Fix useless diff
2019-04-11 13:18:26 -04:00
Ben Halpern
f280d9e266
Fix a couple things and modify dev digest logic (#1954) 2019-03-03 18:25:39 -08:00
Glenn Carremans
bcce614a80 Last general linting sweep (#1947)
* Fixed HTML errors in /app/views/additional_content_boxes

* Fixed indentation

* Fixed linting error in /app/views/comments

* Fixed indentation in /app/views/html_variants

* Fixed HTML errors + Fixed indentation in /app/views/internal

* Fixed HTML errors + Fixed indentation in /app/views/layouts

* Fixed indentation in /app/views/mailers

* Fixed indentation in /app/views/moderations

* Fixed HTML errors + Fixed indentation in /app/views/notifications

* Fixed HTML errors in /app/views/pages

* Fixed HTML errors + Fixed indentation in /app/views/social_previews

* Fixed indentation in /app/views/stories

* Fixed indentation in /app/views/stripe_subscriptions

* Fixed indentation in /app/views/tags

* Fixed indentation in /app/views/users
2019-03-02 07:47:14 -08:00
Ben Halpern
c93bc48010
Fix issue with boosted article in email digest (#1936)
* Adjust email digest

* Fix for missing user.experience_level

* Fix direction of greater than

* Adjust tests for new criteria
2019-03-01 13:51:06 -08:00
Arnelle Balane
d06902461e Fix linting issues in app/views/mailers (#1889) [ci skip] 2019-02-25 15:00:34 -05:00
rhymes
5ee725410b Replace data with content in export email copy (#1572) 2019-01-16 17:10:06 -05:00
Jess Lee
1d2a6def4a Add tag moderation info page (#1360)
* clarifies tag edit form and updates photo

* add better image

* add tag moderation route and page info

* adds labor module for assigning bulk tag moderators

* Apply Peter's changes from code review

Co-Authored-By: jessleenyc <jessleenyc@gmail.com>

* fix typo

Co-Authored-By: jessleenyc <jessleenyc@gmail.com>

* replace with cloudinary image links

* add specs
2018-12-19 09:27:55 -05:00
Ben Halpern
011e267769
Update mentor matching page (#1218)
* Update mentor matching page

* Update mentorship relationship spec
2018-11-28 19:02:47 -05:00
rhymes
915e2d77b6 Export articles/posts (#576)
* Add EditorConfig file for all editors

* Add article export service

* Add setting to request an export of all articles

* On the outside they are called posts

* Add articles exported email to mailer and service

* Refactor to one public method and test flags

* Trigger the export if it was requested and send the email

* Recreated migration file with generic export fields

* Rename fields and switch to a whitelist

* Refactor ArticleExportService into a more generic structure

* Rename articles_exported_email to export_email

* Fix notify mailer spec

* Rename Exporter::Exporter to Exporter::Service

* Remove commented out line

* Removed body_html, coordinates and updated_at from export

* Invert DJ config

* Update spec
2018-11-21 11:13:36 -05:00
lianafelt
0d23ec1faf Update Mentor Email (#938)
* Update mentor_email.html.erb

Update copy to original mentor email from mailchimp

* Update mentor_email.text.erb
2018-10-16 16:43:03 -04:00