Commit graph

1318 commits

Author SHA1 Message Date
Ben Halpern
eaefd588aa
[deploy] Move fragment cache to more efficient location (#7079)
* Move fragment cache to more efficient location

* Fix syntax error
2020-04-04 19:47:50 -04:00
Guilherme Vinicius Moreira
806075dbe7
Refactor internal mods page (#7002)
* Refactor internal mods page

* Refactor code style suggestions
2020-04-03 10:41:09 -04:00
ludwiczakpawel
f87df426ca
[deploy] 8 --> 5 (#7062) 2020-04-03 10:08:45 -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
Ben Halpern
6904854629
Share your project (#7055) 2020-04-02 19:22:27 -04:00
rhymes
cf1f6cc209
Make sure there is no empty <p> in the badge email (#7043) 2020-04-02 18:25:51 -04:00
Ben Halpern
6131c4f03c
[deploy] Remove hardcoded banner exit code (#7018)
* Remove hardcoded banner exit code

* Fix issues with html variant name

* Fix html call logic
2020-04-02 12:08:13 -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
Ben Halpern
ac49cc5a4c
[deploy] Update style for tag social preview (#7017) 2020-04-02 08:23:14 -04:00
Anna Buianova
0457fa4e9d
Removed unused scholarships code (#7023) 2020-04-02 08:15:00 -04:00
ludwiczakpawel
3a17fd2aa9
Crayons Cards and Links (#6997)
* updating links

* fixing exisitng links

* reogranizing links

* update variables

* more variable updates

* .

* rename

* themes adjustments

* whoops

* contrast fix for ben

* little fixes
2020-04-02 10:48:18 +02:00
Ben Halpern
be63775a46
[deploy] Fix erb output on sitemaps (#7009) 2020-04-01 14:24:12 -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
rhymes
b34c2d62be
Ignore unused users columns (#6954) [deploy] 2020-04-01 10:11:40 +02:00
rhymes
f507b8835e
Avoid requesting reaction counts for draft articles (#6931)
* Avoid requesting reaction counts for drafts

* Remove double condition check
2020-04-01 09:24:46 +02:00
ludwiczakpawel
3b14bc10f7
[deploy] Fixing Crayons indicators (#6957)
* fixing indicators a little

* little update

* fixing padding on indicators
2020-03-31 19:25:41 -04:00
Molly Struve
d1fc988ed0
[deploy] Revert "Serve Feed Content From Elasticsearch (#6847)" (#6983)
This reverts commit d7cc1da280.
2020-03-31 16:25:48 -05:00
Ben Halpern
8df3213de3
[deploy] Rearrange order to fix iframe logic (#6980) 2020-03-31 16:26:34 -04:00
Molly Struve
d7cc1da280
[deploy] Serve Feed Content From Elasticsearch (#6847)
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-03-31 13:30:36 -05:00
Guilherme Vinicius Moreira
52f8e8512a
Refactor internal user page (#6940)
* Refactor internal user page

* Refactor forms and conditions
2020-03-31 13:43:07 -04:00
swyx
c5e543591d
Hide API keys in details/summary tag (#6941) [deploy]
* hide api keys in details/summary tag

hide api keys in details/summary tag

* update to directly use summary tag
2020-03-31 16:58:08 +02:00
Ridhwana
e74890680a
Generalize meta content and copyright year (#6887)
* chore: remove the description

* feat: change the meta og:site_name property from The Practical DEV to The <COMMUNITY_NAME> Community consistently

* refactor: change the canonical link to be more dynamic using the <%= ApplicationConfig["APP_PROTOCOL"] %><%= ApplicationConfig["APP_DOMAIN"] %>

* refactor: update the path to be dynamic

* refactor: change some other meta properties to be dynamic

* refactor: update the index

* refactor: update the sitename to just read <%= ApplicationConfig["COMMUNITY_NAME"] %> Community

* feat: copyright year should be dynamic

* feat: change the meta og:url content to be dynamic by using <%= ApplicationConfig["APP_PROTOCOL"] %><%= ApplicationConfig["APP_DOMAIN"] %> for the former part of the url

* feat: space

* refactor: move the copyright notice to a helper

* refactor: use the community_qualified_name helper!

* refactor: start year is already a string

* refactor: use app url helper instead of <%= ApplicationConfig["APP_PROTOCOL"] %><%= ApplicationConfig["APP_DOMAIN"] %> everywhere

* chore:oops

* refactor: Change  <meta name="twitter:image:src" content="http://i.imgur.com/B4JNl1w.png"> to `<meta name="twitter:image:src" content="<%= SiteConfig.main_social_image %>">` consistently.

* refactor: Replace  `<meta property="og:image" content="http://i.imgur.com/B4JNl1w.png" />` with `  <meta property="og:image" content="<%= SiteConfig.main_social_image %>" />`

* chore: update some other meta's

* feat: replace 'The Practical DEV' with 'DEV Community' and

* test: remove The :)

* test: copyright_notice

* fix: syntax error

* feat: name of community

* refactor: use app url

* fix: template strings

* fix: tag

* feat: update the app url parameters

* feat: add a community_name helper so we don't have to refer to an environment variable in the templates

* feat: take into account the case when the start year is a blank string

* feat: single quotes to double quotes

* test: add a test for the #community_name

* chore: update or codeclimate

* chore: amend the community helper

* refactor: use the community_name helper in here

* feat: update ApplicationConfig["COMMUNITY_NAME"]  with community_name

* fix: Time.current.year needs to be a string :(

* chore: extra space

* chore: change to use community_qualified_name
2020-03-31 16:15:57 +02:00
Vaidehi Joshi
5b991fb402
Tweak /internal/broadcast form (#6965)
Ensure that "active" defaults to false.
Ensure that the broadcast type is set to "Welcome" by default.
2020-03-31 06:38:43 -07:00
Vaidehi Joshi
28956d90a5
[deploy] Prompt new users to customize their experience (#6959)
* Rename find_broadcast to find_auth_broadcast

* Fix broken div rendering on /notifications tab

* Allow customize notification to be enqueued

* Add specs for customize welcome notification

Also clean up existing specs to match!

* Rename customization notification method for clarity

* Remove some redundant assertions in generator spec
2020-03-30 19:17:52 -04:00
Andy Zhao
ec371b4624
Fix response templates edit and delete buttons (#6952)
* Fix delete button with correct form_with options

* Use correct path for edit button

* Add test for edit and delete response templates

* Use old pattern to accept alert

* Check for text instead b/c weird timing issue with backend
2020-03-30 15:43:01 -04:00
ludwiczakpawel
c0a9ff75b6
Button & color updates (#6948)
* notifications subscribe dropdown

* little documentation
2020-03-30 18:11:09 +02:00
Molly Struve
ba4b6593bc
JS Bug Fix: Check that bodyClass is present before checking what it includes (#6920)
* check that bodyClass is present before checking what it includes

* refaactor method to return early if bodyClass if not present

* back to simple if statements
2020-03-30 12:07:44 -04:00
ludwiczakpawel
184e56f216
Buttons Group (#6946)
* crayons-btn-group + crayons-btn--icon-alone

* typos

* better padding on outlined buttons

* make ooutlined button border a variable

* hey, pawel - how about not being an idiot??
2020-03-30 15:19:58 +02:00
Ben Halpern
d0a5c93684
[deploy] Fix fragment caching bug for SEO tag pagination. (#6917)
* Fix pagination caching and adjust logic

* Adjust range logic
2020-03-27 13:23:54 -04:00
Anna Buianova
ad26176828
Removed unused pages code (#6908) 2020-03-27 13:22:40 -04:00
Ben Halpern
e35d55c422
Add pagination to tag pages for better SEO crawling (#6771) [deploy]
* Add pagination to tag pages for better SEO crawling

* Modify system specs

* Add some tests

* Finalize tests

* Fix things up

* Add url helpers
2020-03-27 10:34:42 -04:00
Jacob Herrington
38d56542eb
[deploy] Moderator and admin actions log (#6797)
* Add audit logging for negative reactions

This change saves requests that create negative reactions to the audit
log. We need to be monitoring admin and moderator actions throughout the
app to increase visiblity on how our tools are being used and identify
abuse.

Additionally, this will help east concerns about giving elevated users
more powerful tools.

* Add a basic UI for moderator audit logs

* Log experience level ratings

* Log tag adjustments

* UI tweaks for moderator actions log

* Add logging to internal reactions controller

* Add logging for admin actions on users and articles

* Add searching to the moderator actions table

* Move audit instrumentation out of concern

We are able to use a PORO here instead of using a Rails concern. Moving
this also makes syntax to audit something quite a bit more explicit and
obvious to future developers

* Change moderator logs pagination page length

* Move auditing to after action filters

* Add moderator actions to the internal navbar

* Add request spec for internal moderator actions

* Use request params to populate AuditLog slug
2020-03-26 16:59:24 -05:00
Ben Halpern
320c92c759
Further restrict config read permissions (#6880) [deploy] 2020-03-26 17:37:39 -04:00
Vaidehi Joshi
0cac312f32
Use dynamic community name rather than hardcoding "DEV" (#6893) 2020-03-26 15:38:49 -04:00
Andy Zhao
1a989bef07
[deploy] Add response templates to user settings (#6823)
* Add response templates controller, routes, and view

* Add response templates settings page

* Remove dead code

* Use proper variable oops

* Use proper indentation

* Use before action for checking current_user

* Remove index action temporarily

* Use url helpers for redirects

* Use form_with over form_tag and form_for

* Persist previous content if edit fails

* Use exists for performance

* Remove index spec and add CRUD specs

* Memoize @response_template

* Use workaround for sad paths b/c render doesn't work

* Refactor and extract permitted_attributes into var

* Use present over exists to preload into memory

* Use last over first

* Lint for codeclimate

* Use two redirects for happy and sad create path

* Remove proper index route oops

* Codeclimate comma sigh
2020-03-26 14:48:00 -04:00
Vaidehi Joshi
c12cea9b02
Allow users to opt-out of welcome notifications (#6852) [deploy]
* Update some test descriptions in notifications_spec

The descriptions of these tests didn't actually match the test's assertions!

* Add welcome_notifications column to users table

Also ensures that welcome_notifications cannot be set to `nil`.

* Show an opt-out message for Welcome broadcast notifications

* Add opt-out link to notifications + welcome notification box to settings

* Allow welcome notification subscription to be updated

* Add tests for unsubscribed to welcome notification users

Also refactor generator specs a bit.

* Fix up paths, copy, tests

Use rails path helpers instead of hardcoding paths. Improve copy in a few locations.
2020-03-26 11:26:19 -07:00
ludwiczakpawel
209c01037a
Crayons'ifizing Header (#6780) [deploy]
* add tons of colors

* add tons of colors

* moving cheese around and prepping for new theming system

* documenting

* .

* moving theme code to own files

* replacing some variables

* whitespaces

* replacing another batch of variables

* get rid of another variable

* replace loading animation variable with one-fits-all-sizes

* get rid of theme-anchor-color

* remove code colors variables

* another batch of variables replaced

* mostly bringing in variables for haxor theme

* remove invert-image variable for chat

* remove another inver-image variable

* forgot to remove reaction-background variable

* remove border variable

* series

* .

* remove another variable

* remove another variable..

* another batch of variables

* and more...

* header updates

* i forgot to commits things in my PR....

* fix border

* .

* simplifyuing placeholder

* responsiveness

* responsive

* search fix

* fixing prefix-less classes

* increase clickable area

* small style updates for pink theme

* tests

* Fix test

* responsive dropdown

* tiny fixes

* generator rewritten

* dropdown reworked a little

* adjustments

* fix pwa

Co-authored-by: rhymes <rhymesete@gmail.com>
2020-03-26 12:21:53 -04:00
rhymes
cfb64a1c68
Add URL module and article_url, user_url helpers (#6833)
* Add AppURL with .article and .user

* Use URL.url and URL.user

* Add article_url and user_url helpers
2020-03-25 13:54:45 -04:00
Molly Struve
94c7bd3a95
return default aspect ratio of 1 if gif id is not present and refactor (#6837) [deploy] 2020-03-25 11:21:47 -05:00
Molly Struve
7724500bc5
notify honeybadger of js error when it occurs selecting a theme template (#6832) [deploy] 2020-03-25 09:28:42 -05:00
Jacob Herrington
c673b2bb6d
Internal: Add a table for negative reactions (#6751) [deploy]
* Add a table for moderator reactions

This is a simplified version of a feature that should be fleshed out
in the near future.

Despite the fact that this project is taking a new direction, I think
this table could be useful in the meantime.

* Add specs for internal mod actions view

* Rename mod actions to negative reactions
2020-03-24 16:08:24 -04:00
Ben Halpern
ba18f8e481
Include crayons style tag on pages that load direct from css (#6816) 2020-03-24 13:17:54 -04:00
ludwiczakpawel
2671a799b4
[deploy] Responsiveness & Crayons.css (#6814) 2020-03-24 12:56:09 -04:00
Molly Struve
93e1a19a4d
only show link to original commentable if it exists (#6810) [deploy] 2020-03-24 10:13:41 -05:00
Ben Halpern
513cf8081a
Add base imports before other inline styles (#6809) [deploy]
* Add base imports before other inline styles

* Remove base reset
2020-03-24 10:46:31 -04:00
ludwiczakpawel
61b913e5e8
Replacing theme variables (#6682)
* add tons of colors

* add tons of colors

* moving cheese around and prepping for new theming system

* documenting

* .

* moving theme code to own files

* replacing some variables

* whitespaces

* replacing another batch of variables

* get rid of another variable

* replace loading animation variable with one-fits-all-sizes

* get rid of theme-anchor-color

* remove code colors variables

* another batch of variables replaced

* mostly bringing in variables for haxor theme

* remove invert-image variable for chat

* remove another inver-image variable

* forgot to remove reaction-background variable

* remove border variable

* series

* .

* remove another variable

* remove another variable..

* another batch of variables

* and more...

* drop comments

* Update approval file for tweet

Co-authored-by: rhymes <rhymesete@gmail.com>
Co-authored-by: benhalpern <bendhalpern@gmail.com>
2020-03-24 15:05:35 +01:00
Andy Zhao
57d9d72c10
Update call to action box text styling (#6795)
* Use constant for type_of_user

* Add comment for clarity

* Remove legacy inline styles

* Move comment above the render
2020-03-24 10:49:37 +01:00
Alex
bc8c126497
Validate file uploads client-side (#6737)
* JavaScript MVP

- First round of linting
- Use for testing

* Add some default UI error handling

* Add file validation to updating profile image

* Add type validation and fix size bug

* Refactor and add file validation to article cover

* Add file validation to body images

* Add accept field to profile image form

* Add parseInt to maxFileSizeMb

* Add accept and max-file-size-mb to article images

* Change parseInt to Number

* Add file validations to podcast form

* Add accept image to podcasts

* Add file validation and accept field to org form

* Use appendChild for error message

* Add file validation to comment form

* Add JS Docs comments

* Remove redundant format check

* Add documentation to override default values

* Update documention (spelling, formatting, etc.)

* Update max-file-size-mb to 25

* Bump default max file size for images to 25

* Change appendChild to append

* Refactor remove error message

* Refactor JS, remove console logs, update error msg

* Remove video from permitted file types

* Update error messaging

* Update docs for funciton params...oops 🙈

* Fix file size check logic

- Allow for 0 maxFileSizeMb
- Use JSON.parse() for permittedFileTypes to get an Array

* Add specs

* Change blackbox to black box

* Remove wait_for_javascript

* Remove comments from spec
2020-03-24 09:21:49 +01:00
Molly Struve
3187514ad6
handle a missing commentable in new reply email (#6792) [deploy] 2020-03-23 16:40:51 -05:00
Jibran Kalia
a91cb9f8f4
Create primary_sticker_image_url in SiteConfig (#6746) [deploy]
* Create primary_sticker_image_url in SiteConfig

* Adding test for updating primary_sticker_image_url

* typo

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2020-03-23 14:55:18 -04:00