Commit graph

45 commits

Author SHA1 Message Date
Mac Siri
afa73e06e3
Replace Webpacker with Esbuild (#20470)
* Migrate to esbuild WIP

* Add exclude

* Remove redundant file

* Move file

* Move to javascript_include_tag

* Lint fix

* WIP

* WIP

* Add watch mode to esbuild WIP

* Get jest working

* Remove babel

* Revert "Remove babel"

This reverts commit 6da35260aa19d6f97f586deb66c0ecaf48433b73.

* More WIP

* Got image to load

* WIP

* Resolve audit

* Lint fix

* WIP

* Fix jest spec

* [CI] Remove asset-restore for test build stage

* Production compliant

* Temp disable sourcemap

* Update glob

* Add esbuild helper to stimulus

* Import fragment

* Temp disable coverage to see failing tests

* Fix broken spec

* Address lint

* Set proper es6 target

* Use esbuild for everything

* wait what

* Revert "Set proper es6 target"

This reverts commit 98f5278093421baa8ffe2ca580845b01c1a1eadf.

* Revert "Use esbuild for everything"

This reverts commit 0ac46738f07ffcb6af095ccb1ffa5e439b7fefa3.

* Replace uglifier with terser

* New compiled assets version

* Remvoe honeybadger-io/webpack

* Remove cypress coverage checks for now

* Update jsconfig.json

* Update docker-compose

* Remove public/packs-test from ci cache
2024-01-25 20:29:21 +00:00
Philip How
d615fcef56
Add new members filter to mod center (#20542)
* fix jest

* Update safe_params_list.vcl

---------

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2024-01-23 16:07:45 -05:00
Ben Halpern
456a5e61d2
Add filters to /mod (#20179)
* Add filters to /mod

* Adjust cypress to look for proper text

* Adjust cypress to be less sensitive
2023-10-02 11:47:49 +07:00
Rajat Talesra
01513bae69
Remove mode banner (#18441) 2022-09-12 22:20:13 +05:30
Arit Developer
450af1cd45
Redeploying the Flag/Unflag User functionality (#18235)
* building again

* still building

* still building

* stuck

* Suzanne Holmes on the case

* make report content a button not a link

* revert to link

* add tests

* revert changes made trying to get ModCenter to work

* hide nonworking actions_panel btns in Mod Center

* nudge Travis

* incorporate PR comments

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2022-07-28 09:03:37 -04:00
Arit Developer
3fa350c7f2
Revert "Relocate and Refactor "Flag User" Action (#18182)" (#18232)
This reverts commit 8f544ab6ed.
2022-07-27 12:10:22 -04:00
Arit Developer
8f544ab6ed
Relocate and Refactor "Flag User" Action (#18182)
* building again

* still building

* still building

* stuck

* Suzanne Holmes on the case

* make report content a button not a link

* revert to link

* add tests

* revert changes made trying to get ModCenter to work

* hide nonworking actions_panel btns in Mod Center

* nudge Travis

* incorporate PR comments

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2022-07-27 10:47:17 -04:00
Arit Amana
1679fbf47d
Allow Moderator Role to Unpublish Single Post (#17795)
* relocate btn; build functionality for admin only

* remove commented code

* add explanatory comment

* refactor

* build unpublish and feature-post policies

* mod role in policies fails specs 😓

* fix failing specs

* add end-to-end tests

* fix hardcoded name in modal  😓
2022-06-03 12:48:20 -04:00
Jeremy Friesen
3bdcde6496
Adding indirection for Tag#name to ease future work (#16703)
* Adding indirection for Tag#name to ease future work

In pairing with Arit, we were able to capture a few small wins in
regards to favoring an accessible tag name.  In other words, where ever
you see a tag's name, we want to render it as camel-case.  This will
greatly help those using a screen reader and frankly visually scanning
the tag (idontknowaboutyoubutthisiskindahardtoread).

However, as we explored the
code base, we found several places that will require further
consideration.  These revolve around the API and caching of tags for
articles and listings as well as the JSON documents we use for
populating drop-down lists.

So, instead of unleashing a large pull request, we're opting to provide
a small non-breaking refactor that demonstrates where we're going and
keeps production working as expected while allowing future
development/testing to benefit from these captured gains.

Our next steps are to revisit the related issue and do a proper task
breakdown, becuase there are too many considerations to call this a
"small win".

I also encourage reviewers to read the comments.  This is an emerging
mental pattern that I believe helps us conceptually move our codebase
forward while also guarding against the mega-PR with oodles of commits
and file changes that span numerous contexts.

Related to forem/forem-internal-eng#269

* Expanding specs to address feedback
2022-02-28 16:32:04 -05:00
Ridhwana
5e93d3a25e
Add a contact email address to the /admin/customization/config (#16497)
* feat: remove the default email and cobine the periodic digest and the contact email under the Email section

* refactor: rename  the email_link to contact link and use the contact_email as a default and fallback to the ForemInstance.email

* chore: alignment

* feat: use the contact_email helper

* feat: move the contact_email to the ForemInstance model

* feat: use ForemInstance.contact_email instead of the application helper method

* removed the application Helper

* feat: set the dafault on the contact_email

* fix: cypress tests

* Update app/lib/constants/settings/general.rb

Co-authored-by: Michael Kohl <me@citizen428.net>

Co-authored-by: Michael Kohl <me@citizen428.net>
2022-02-15 17:37:08 +02:00
Daniel Uber
9f9594ccdc
role deprecation cleanup (#15717)
* User decorator (and spec) should use `trusted?`

Fixes a few issues seen in an rspec run that show as:

    DEPRECATION WARNING: User#trusted is deprecated, favor
    User#trusted? (called from config_body_class at
    /opt/apps/forem/app/decorators/user_decorator.rb:58)

And here:

/opt/apps/forem/spec/decorators/user_decorator_spec.rb:112
/opt/apps/forem/spec/decorators/user_decorator_spec.rb:121
/opt/apps/forem/spec/decorators/user_decorator_spec.rb:130
/opt/apps/forem/spec/decorators/user_decorator_spec.rb:139

* prefer User trusted? to trusted

DEPRECATION WARNING: User#trusted is deprecated, favor
User#trusted? (called from permissions at
/opt/apps/forem/app/models/rating_vote.rb:25)

* Prefer trusted? to trusted in user spec

* Use warned? rather than warned in admin article partial

* use trusted? rather than trusted in moderator requests spec

* Prefer trusted? to trusted in moderations controller

* Prefer trusted? to trusted in moderations view

* User auditable? should call trusted? and not trusted

Deprecations go rolling right along.

* Invert guard clause logic to be positive

The original "return unless multiple negated conditions hold" guard
was cumbersome.

Invert to return if any of the exceptions apply, namely:

- this is a comment or readinglist rating (rather than explicit),
allowed for all
- this rating is from a moderator/trusted user (allowed)
- this rating is offered by the article's author (allowed)

I had intended to also remove the safe navigation operators (since it
wasn't clear why there would be a null user or null article, as
rating_vote joins users to articles with a score), but the builtin
validation tests (is expected to validate ...) build objects with
missing attributes, and raise errors when the spec is run.
2021-12-09 15:27:45 -06:00
yheuhtozr
cdb823bdf9
views/moderations i18n (#15068)
* views/moderations i18n

* PR key name changes

* remove ja.yml
2021-10-20 10:48:14 -05:00
Arit Amana
94236d7ee6
Update dev.to/mods for non-logged in users (#12301)
* complete implementation

* check if forem is DEV properly

* Add tests

* improve tests

* improve tests again

* REALLY improve tests (sheesh!)

* Address code review comments

* small changes

* modify specs
2021-01-20 13:53:50 -05:00
Lisa Sy
126c2401e3
Improve small screen display of Mod Center (#10621) [deploy]
* Add page-header padding and overflow-x for tabs

* Split into two moderator files and move into Views folder

* Add page-header padding style

* Increase font size of crayons-tag on small screen

* Improve small screen view of menu and grid rows in mod center

* Fix date alignment

* Update after first PR revision

* Re-update

* Fix stylesheet reference
2020-10-27 07:46:52 -07:00
ludwiczakpawel
bf8e2e53f1
Titles & subtitles cleanup (#10508)
* .

* .

* .
2020-10-02 12:37:39 +02:00
Jacob Herrington
b8ce85d58d
Ensure all elements are contained by landmarks in mod center (#9608) 2020-08-05 15:49:54 -04:00
Jacob Herrington
cd11ebefb9
Fix accessibility issues flagged by axe (#9452) 2020-07-24 10:21:28 -04:00
Arit Amana
a78ccf2310
[deploy] [ModCenter] Fix "FlagUser" Modal functionality (#8995)
* Make FlagUserModal show up on click

* Explain extra div

* Make sure "Vomit All" reaction fires accurately

* Make test-file comment clearer

* Fix bug when 2 articles are open and the FlagUser modal does not open for the first article

* Still working it out ...

* Tests broken; need help

* Get rid of debugging alerts

* Fixed broken tests for <SingleArticle />

* Write tests for ModerationArticles component

* Complete tests for ModerationArticles component

* Employ safer Preact testing techniques

* Query all articles using "data-testid"

* Revert changes

* Got it working with portals for non-iframe implementation.

* wip tests

* Got mod tools flag user modal wprking on article page again.

* Added some documentation the code.

* Now confirm is disabled until you select an item in the flag user modal.

* Revert "wip tests"

This reverts commit fb7a0825039fd377cad04d9dedad9d1146b03978.

* test prep

* Fixed broken test.

* Refactored to use useRef hook.

* Rename a variable

* remove unnecessary comments

Co-authored-by: Nick Taylor <nick@dev.to>
2020-07-15 13:54:52 -04:00
Lisa Sy
7475716662
Make small CSS improvements to mod center (#9315) [deploy]
* Update mod center layout & color fixes

* Update SVG for external link

* - Update external link svg to use
- Remove scrollbar in actions menu
- Move action panel styling from `articles.scss` to `moderators.scss`

* Delete schema.rb

* Add back schema file

* SiteConfig view refactoring (#9286)

* Clean up payment pointer in top shell

* Simplify handling of social media icons

* Also guard against empty strings

* Only traverse hash once

* Adds a default value to the shell version cache response in case it returns undefined (#9250)

* [deploy] 🐞 Hotfix Real time chat was broken  (#9293)

* 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

* 🐞Hotfix: Findinder error in chat

Co-authored-by: Narender Singh <narender2031@gmail.com>

* Bump jsdom from 16.2.2 to 16.3.0 (#9279)

* Fix TypeError: userData is null in blockButton.js (#9299)

Should fix https://app.honeybadger.io/fault/67192/ed6f6b392b5bd791d6dc04732f125123.

* Fix TypeError: userData is null in initializeOnboardingTaskCard.js (#9298) [deploy]

* Fix TypeError: userData is null in initializeOnboardingTaskCard.js

Should fix https://app.honeybadger.io/fault/67192/65045742fda3390a067960f53a894e87.

* Combine return statements in initializeOnboardingTaskCard

* Fix TypeError: null is not an object in initializeArticleReactions.js (#9297) [deploy]

* Fix TypeError: null is not an object in initializeArticleReactions.js

Should fix https://app.honeybadger.io/fault/67192/6f9b4fdf475e2229c968fa26d785b90f

* Return 0 rather than undefined if reactionEl doesn't exist

* Routine Rubocop fixes (#9302)

* rubocop -A

* rubocop --auto-gen-config

* Fix sorting in Bundler/OrderedGems to consider punctuation

* Rubocop: activate Layout/ClassStructure (#9304)

* change Label Follow Weight Scale for Tags in Dashboard (#9247)

* [deploy] Remove codeql analysis for right now (#9308)

* Update Readme Headline (#9309)

* [deploy] Fix TypeError: Cannot set property 'innerHTML' of null (#9306)

Should fix https://app.honeybadger.io/fault/67192/f79e24dfb4e4364da09dda6380e9d2ff.

* Add /forem redirect (#9317)

* [deploy] Make sidebar sponsor headline configurable (#9251)

* Make sidebar sponsor headline configurable

* Fix spec

* Fix spec typo

* Create profile image generator (#8695)

* Create profile image generator

* Update spec/services/users/profile_image_generator_spec.rb

Co-authored-by: Mac Siri <krairit.siri@gmail.com>

* Remove difficult cloudinary dependency

Co-authored-by: Mac Siri <krairit.siri@gmail.com>

Co-authored-by: Michael Kohl <citizen428@gmail.com>
Co-authored-by: Fernando Valverde <fdov88@gmail.com>
Co-authored-by: Sarthak Sharma <7lovesharma7@gmail.com>
Co-authored-by: Narender Singh <narender2031@gmail.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
Co-authored-by: rhymes <rhymesete@gmail.com>
Co-authored-by: Veggier <47649859+Veggier@users.noreply.github.com>
Co-authored-by: Molly Struve <mollylbs@gmail.com>
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
Co-authored-by: Jacob Herrington <jacobherringtondeveloper@gmail.com>
Co-authored-by: Mac Siri <krairit.siri@gmail.com>
2020-07-15 09:54:19 -07:00
Arit Amana
e45742c212
Mod Center MVP 🎉 (#8744)
Co-authored-by: Andy Zhao <17884966+Zhao-Andy@users.noreply.github.com>
2020-06-23 14:58:16 -04:00
Andy Zhao
885e042d31
[deploy] New Feature: Mod Actions Panel (#7777)
* db

* Add an iframe to host mod actions menu

This iframe is probably the fastest way to get a working mod actions
menu without rewriting existing code. We may eventually re-write this,
but based on Ben's recommendation we are going to go with an iframe
because it gets us a working feature quickly and it seems to be serving
us well in other parts of the application.

* Add the mod actions menu button to articles

When the user is "trusted" they will see a small badge on the lower
right-hand side of the screen. Clicking the icon reveals the mod actions
menu.

* Add header to actions panel (#7395)

* Update iframe border

* Add 'Moderate Post' header and button

* Use inline SVG over <img src='svg'>

* Use Crayons variables for units

* Use flexbox to center chevron

* Add accidentally deleted positioning

* Add chevron-right.svg

* Use a partial for actions panel and revert /mod page

* Load actions panel in iframe and not /mod

* Style UpVote, DownVote and Vomit buttons (#7421)

* Add a iframe to host mod actions menu

* Up and Downvote Icons

* Starting with vomit button

* Completed UI; interactions pending

* Incorporated Andy changes; making mod action-panel

* space reactions away from header

* UI tweaks and corrections 1

* Fixing styles to match crayons

* choose pure white color css variable

* Add thumbs-up emoji; address Lisa comments

* Trying to fix reactions interactions

* remove clearThumbReactions function

Co-authored-by: jacobherrington <jacobherringtondeveloper@gmail.com>

* Add bottom layout for actions panel (#7501)

* WIP for Lisa

* Finalize mod actions bottom section

* Use showing instead of hidden for transition

* Add new optimized SVGs

* Fix weird height issues for actions panel

* Move hover styles below the cascade, yo

* Use margin-top for sticky footer over height: 100%

* Move initialize actions panel button to Webpack (#7506)

* Move actions panel JS code to webpack

* Refactor and use destructuring

Thanks @nickytonline!

Co-Authored-By: Nick Taylor <nick@iamdeveloper.com>

* Rename file

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* Configure Experience Level options for Mod Action Panel (#7507)

* Add a iframe to host mod actions menu

* Click interactions (no toggle of dropdowns yet)

Co-authored-by: jacobherrington <jacobherringtondeveloper@gmail.com>

* Fix the iframe's path (#7509)

* Toggle the 'Set Experience Level' menu on button-click (#7529)

* Add a iframe to host mod actions menu

* Add set-exp dropdown functionality

* WIP: making exp level updates async

* Completes async implementation

* Fix controller for "actions_panel" and "/mod"

Co-authored-by: jacobherrington <jacobherringtondeveloper@gmail.com>

* Add close button interaction (#7552)

* Rename actions panel pack file

* Add close button toggle to actions panel

* DB update

* Move more code to Webpack and add conditional tag adjustments section (#7652)

* Move JS code to Webpack

* Clean up a few style issues

* Add styling for tag adjustments

* Add active/inactive functionality

* Add conditional rendering for tag adjustments section

* Add missing variable oops (#7673)

* update with upstream

* Add missing subtract svg (#7695)

* Create 'Flag User' modal (#7626)

* Add a iframe to host mod actions menu

* Starting task

* Phase 1

* Fix "Close Modal" icon

* Implement open modal

* Working on all "Close Modal" actions

* Almost-complete implementation

* Remove Abuse Report snackbar

* Delete unneeded JS code

* Remove "How does this work?" links

* Link to Community Moderation page

* Addressing code review corrections

* Update api call to use "request" method

* Make else path clearer in api call

Co-authored-by: jacobherrington <jacobherringtondeveloper@gmail.com>

* Mod Actions Panel: Prevent nonsensical reaction pairs (#7699)

* Still implementing

* Completed Implementation

* Address code review feednack; refactor "create" method

* Move scss variables to native-css (for ModPanel code only)

* Correct missing native css

* update to native-css again

* More sccs -> native-css fixes

* Adjust ModPanel Button position on mobile (#7744)

* Adjusted ModPanel position on mobile

* Better adjustment

* Fix phantom schema.rb changes

* Fix phantom schema.rb changes

* Finalize tag adjustments (#7740)

* Finalize tag adjustments and flow

* Fix logic for rendering adjust tags options

* Clean up alert response

* Rename user to trusted user

* Use new CSS variables

* Add/remove tag on article's tag section after adjusting

* Fix logic for admin tag input and some other niceties

* Final bug fixes mod panel (#7772)

* Use correct boolean statement

* Clear the value of the textarea not div

* Use the correct attribute

* Use actions panel for /mod page (#7775)

* Fix loading logic with tag adjust button conditional render

* Link to tag moderation for adjust tags section

* Use top over window.parent

Thanks @nickytonline!

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* Use Webpack alias to import

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* Use place-items shorthand over align-items + justify-content

Thanks @nickytonline!

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* Fix typo for utilities

* Add new line to end of file

* Disable linter for use for top function

* Use align-items and justify-content center

* Update SVGs to spec

* Remove unnecessary height and use spacing units for open button

* Remove accidentally added comment

* Error handling when selecting reactions; optimize "reactions.each" loop

* Add comment about clearing innerHTML

* Revert schema back to master

* Use each since there should only be two reactions

* Fix typo oops

* Add missing height oops

* Return if there are no reactions to be destroyed

* Center path with GUI tool shrug

* chose more appropriate name for JS pack; rewrote api calls using async-await

* Rename variables and methods and check categories before clearing

* Use addSnackbarItem instead of hardcoded version

* Place articleModerationTools pack behind user_signed_in

* Correct omission

* Implement dynamic imports for ModPanel tools

* Implemented async/await; added snackbar message for null response use-case

* Fix the "/article/mod" page; make sure all reactions, vomit-user and exp-level working as expected

* Update language to reflect new UI

* Close the modal after the "Confirm Action" button is clicked

* Change text for Spam/Abuse button

* Fix schema to use with master

* Update schema to master again

* Use crayons button for actions panel button

* UI tweak to play nicer with site themes

* Make actions panel work for dev.to/mod

* Add snackbar for reactions

* Update how does this work links

* Add "thumbsup" reactions to logging

* Add thumbsup to categories

* Add external link icon

* Changes to reflect "Privileged" and not "Negative" reactions; spec changes pending

* Updated instance variable

* Starting to update the specs

* Update "thumbsup" points from 10 to 5

* Still working on both requests

* Embracing an easier implemantation (thanks Andy!)

* Add tests for actions panel

* Add some basic tests for actions panel

* Change to flag to admins

* Indicate that 'Reason for Tag adjust' is required

Co-authored-by: Mac Siri <krairit.siri@gmail.com>

* Rename negative_reactions to privileged

* Update rating level to use correct values

* Use a different display value than backend value

* Don't show adjust tags for trusted users

* Add specs for moderation_routes for admin and super_admin

Co-authored-by: Arit Amana <msarit@gmail.com>
Co-authored-by: jacobherrington <jacobherringtondeveloper@gmail.com>
Co-authored-by: Arit Amana <32520970+msarit@users.noreply.github.com>
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
Co-authored-by: Mac Siri <krairit.siri@gmail.com>
2020-06-08 13:24:18 -04:00
Ben Halpern
cde008c0a9
Add current state to nav bar links properly (#8045) 2020-05-25 12:00:21 -04:00
Andy Zhao
dae409f1a9
Remove stats from /mod (#7581) 2020-04-28 18:03:08 -04: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
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
c627f4e98a
Replace DEV with the community name... almost everywhere (#7211)
* chore: search and replace carefully

* fix: small updates

* fix: spec contains DEV hardcoded

* chore: update on badges

* feat: upcase
2020-04-10 17:03:16 +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
Nick Taylor
ccf7e6e5bf
Upgrade to webpacker/webpack 4 and Babel 7 (#6664)
Upgraded to webpacker 4/webpack 4 and Babel 7
2020-03-17 08:20:36 -04:00
Sebastien
665f5aac0f
Refactor ProfileImage (#5803) 2020-02-07 08:56:16 -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
Ben Halpern
df796f7e07
Cache data on /mod (#5315) [deploy] 2019-12-31 10:18:55 -05:00
Ben Halpern
771fa5b782
Final fixes to /mod (#5234) [deploy] 2019-12-23 20:12:14 -05:00
Ben Halpern
03c2404b13
Redo /mod for performance and usability (#5230) [deploy] 2019-12-23 18:10:25 -05:00
jeffin sam
61788e5dec Add tag_colors cache to redis (#4716) [deploy] 2019-11-13 09:43:22 -06:00
Aleksandr
4d0392a17a Add link to /community-moderation on all /mod pages (#4567) [deploy] 2019-11-12 10:11:26 -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
Ben Halpern
d9634150d8
Add new mod links and tooling (#4009)
* Add new mod links and tooling

* Adjust mod page copy, test
2019-09-12 00:11:01 -04:00
Andrew Bone
2969e3d091 Mod page "suggest a tweet" width (#3863)
* Fix tweet box width

* Fix tweet box width

* Moved rule to right selector
2019-08-28 11:04:44 -04:00
rhymes
6a626e819d Refactor: fix issues raised by bullet (#2965)
* Preload organization, not user

* Preload users only when needed

* Pre-load podcasts for podcast episodes in API

* Avoid eager loading error by loading rating votes separately

* Preload associations for moderation

* Preload user comments in trees

* Preload organization for non org dashboard and cleanup queries

* Optimize ArticleSuggester to only load N articles at need

* Remove eager loading and pass variables to partials for easier debug

* Reorganize tags validation code and ignore actsastaggableon eager loading issues

* Remove unused eager loading and bring up comments relation

* Preload podcasts when loading podcast episodes

* Fix views specs

* Make sure ArticleSuggester never returns duplicates

* Remove commented code

* Re-trigger build

* Move suggested articles back to view to respect fragment caching
2019-05-28 17:32:53 -04:00
Ben Halpern
5f3fd96960
Modify social share button and functionality (#2316)
* Modify social share button and functionality

* Some nightmode changes tossed in

* Style adjustments and test snapshot fix
2019-04-06 14:49:52 -04:00
Ben Halpern
1552df98d2
Add ability for trusted users to suggest social copy for posts (#2306)
* Add ability for trusted users to suggest social copy for posts

* Fix schema

* Fix tests

* Fix test
2019-04-04 17:01:58 -04: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
d33c607211
Add non-mod functionality to /mod (#1930) 2019-02-28 11:02:19 -08:00
Ben Halpern
532903c688
Add experience level averaging to articles (#1922)
* Add experience level averaging to articles

* Adjust copy on /mod ratings page
2019-02-28 08:17:29 -08:00