Commit graph

41 commits

Author SHA1 Message Date
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
Jacob Herrington
4ebad8c4bc
Document the usage of Audit:Logger (#8284)
One of the DEV maintainers pointed out that our action logging mechanism
isn't documented anywhere. This add some context for that code!
2020-06-04 21:49:01 -05: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
Ben Halpern
2daac8a216
Add docs for tallying timeseries metrics (#6146) 2020-05-14 15:32:12 -05:00
Andy Zhao
203e8e1ae7
Add a section about what the admin panel is (#7867) 2020-05-14 15:15:44 -04:00
Alex
7149070bca
[deploy] Create FastlyConfig & refactor params safe list (#7630)
* Fastly refactor

- Create FastlyConfig
- Create FastlyConfig::Base
- Create FastlyConfig::Snippets
- Move safe_params to its own VCL file
- Rescue unauthorized errors in development
- Add FastlyConfig errors

* Move active version to method

* Update naming option --> config

* Refactor InvalidConfigsFormat msg to Error class

* Refactor active version logic

* Fix log_to_datadog call

* Move get_active_version logic back into method

* Add some specs ¯\_(ツ)_/¯

* Update Fastly rake task

* Remove old Fastly way

* Update docs for Fastly

* Move snippets to config/ & remove old config

* Change update_config to upsert_config

* Change error type to SubclassResponsibility

* Refactor get_updated_files with filter_map

* Refactor update

* Cleanup update_config --> upsert_config

* Fix updater specs
2020-05-01 11:23:48 -04:00
Molly Struve
74e75b4067
[deploy] Rate Limit Organization Creation (#7595) 2020-04-30 10:55:37 -05:00
Molly Struve
4c779be2ed
[deploy] Remove ALL Algolia Code (#7577) 2020-04-29 10:11:57 -05:00
rhymes
2d26318cf9
[deploy] Replace (black|white)list with more inclusive language (#7459)
* Replace isBlacklisted

* Update fastly.rake task

* More renames

* Rename Faslty config file

* More changes

* Replace isForbiddenFromPreloading with isNotPreloadable

* Skip problematic test

* Re-enable
2020-04-27 18:00:12 +02:00
Alex
397734b29c
Generalize Fastly rake task (#7349)
* Generalize Fastly rake task

- Update Rubocop to disable DescribeClass on rake task specs

* Change default Fastly ENV vars to ""

* Move snippet name to ENV

* Update ENV to FASTLY_WHITELIST_PARAMS_SNIPPET_NAME

* Add FASTLY_WHITELIST_PARAMS_SNIPPET_NAME to the docs

* Update docs

* Quick refactor
2020-04-22 11:49:54 -04:00
Alex
cc6249beff
[deploy] Update whitelisted params on Fastly on deployments (#7279)
* Add Fastly whitelisted params

* Create FastlyVCL::WhitelistedParams.update service

* Add specs

* Create rake task to call new service

* Add rake task to setup script

* Add documentatoin

* Move sort inside params_to_array method

* Rename VCL_REGEX to VCL_DELIMITER

* Add PR URL to docs

* Move snippet name to SNIPPET_NAME constant

* Refactor setting content

* Rename params_to_array to params_to_sorted_array

* Change guard and log success on update

- Return early if params are equal
- Log success message to Rails.logger on update
- Log params diff to Datadog

* Return true explicitly

* Move rake task execution from to release-tasks

* Remove unnecessary environment guard in task

* Remove duplicate code param

* Refactor string from build_content

* Remove reliance on sort

* Reorder logging to implicitly return true

* Update docs to reference release-script.sh

* Update docs

* Update whitelisted params

* Fix params_updated? bug and add more specs

* Remove duplicate param...oopsie!
2020-04-16 15:11:57 -04:00
Fernando Valverde
49e3ca6f18
Adds Pusher Beams docs for Android PN (#7121)
* Adds Pusher Beams docs for Android PN [skip ci]

* Trigger CI
2020-04-07 16:36:37 +02:00
rhymes
235367e073
Make bin/setup predictable and repeatable and remove bin/update (#6566)
* Make bin/setup predictable and remove bin/update

* System not puts

* Give priority to ENV DATABASE_URL
2020-03-10 15:46:23 +01:00
Molly Struve
6a277ba10d
remove rake jobs:work references from code (#6082) [deploy] 2020-02-14 15:18:08 -05:00
Molly Struve
65eba740ab
Document DataUpdateScripts, Add to Deploy Process, Add Development Check (#6068) [deploy] 2020-02-14 11:45:27 -05:00
Jacob Herrington
2d3a974803
Include instructions to set Algolia plan (#5941) 2020-02-06 17:21:05 -06:00
Michael Kohl
5c74464b30
Add documentation for ENVied & SiteConfig (#5841)
* Add documentation for ENVied & SiteConfig

* Add images

* Fix swapped screenshots and update list
2020-02-04 11:41:25 -06:00
Alex
1ed8d4a8ce Fix typo in Algolia docs [ci skip] (#5659) 2020-01-23 12:21:32 -05:00
Shelley Vohr
b146528aa8 feat: add per-user Open Dyslexic font setting (#5037) [deploy]
* feat: add per-user Open Dyslexic font setting

* Adjust css slightly

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2020-01-20 18:23:57 -05:00
ludwiczakpawel
815a95e85d Adding info about disappearing tokens (#5523)
* adding info about disappearing tokens

* fixing copy + numbering issue
2020-01-17 08:46:55 -05:00
ludwiczakpawel
06bf574e34 adding section for switching to free plan (#5514) 2020-01-15 08:38:58 -05:00
Michael Kohl
256448f1f3 Remove unused Envfile variables (#5474)
* Remove unused variables from Envfile

* Remove unused Twitter variables from Envfile

* Also remove GITHUB_TOKEN

* Change Twitter token screenshot URL
2020-01-14 12:05:35 -05:00
Lenmor Larroza Dimanalata
08b0886eb0 Fix Backend Guide > Roles admin links [ci skip] (#5118) 2019-12-16 09:25:48 -05:00
Ryan Smith
b809562a2f Fix Algolia signup link. (#5100) 2019-12-13 10:59:09 -06:00
Jacob Herrington
7d0aeeefe5 Improve the clarity of the docs and fix Prettier config (#4899)
* Improve format and clarity of the docs [ci skip]

While this change produces a lot of git noise by enacting what seems
like an arbitrary linewrap on most of the files in the documentation it
will result in better version control and tracking of the changes in the
documentation.

For example, as it currently stands, if one was to make a
PR to move a comma in a sentence because each paragraph in most of the
files is on a single line, that small change would look in the git
history like the author had modified the entire paragraph. In reality,
this author just moved a comma.

This change also includes a significant number of modifications to the
more article-esque docs. Many of these docs were written in a sort of
stream-of-conciousness and aren't as easy to read as they could be.
Hopefully this is the first of several readability changes. If we could
get these docs to a more accessible reading level, we would probably see
an increase in contributions. :)

* Delegate markdown wrapping to Prettier

* Add linewrapping explanation in the docs [ci skip]
2019-11-26 08:40:53 -05:00
Jacob Herrington
5624b2e7f9 Add a link for Twitter developer access [ci skip] (#4891) 2019-11-25 08:16:16 -05:00
Nick Taylor
22991239bf Ran all markdown files through prettier to fix a handful. (#4599) 2019-10-28 08:20:53 -04:00
samuel-glitch
15d7e7629a Add a sentence to clarify GitHub Authentication (#4360) 2019-10-11 08:56:02 -04:00
Jacob Herrington
4ea1e6e020 Fix typos and mechanical mistakes (#4177) [ci skip] 2019-10-01 16:30:13 -04:00
Dhananjay
ac5509e181 Update image of Algolia backend docs (#3956) [ci skip] 2019-09-09 09:45:52 -04:00
rhymes
0bafec4b4b DOC: Fix aggregated query to avoid deprecation (#3904) [ci skip] 2019-09-03 15:49:26 -04:00
Mario See
59217d76a7 Add scheduled Job doc (#3847) [ci skip] 2019-08-27 16:18:10 -04:00
Yash Dave
eccca28ee1 Update backend's readme filename (#3824) [ci skip] 2019-08-26 17:47:59 -04:00
not-a-patch
4243510f87 Backend Docs: roles.md #3737 (#3827) 2019-08-26 14:50:39 -04:00
not-a-patch
e9c33f4aea Backend docs: github authentication updated (#3814)
- first item says "sign in" when it actually links you to
   creation of a OAuth application
2019-08-23 17:11:22 -04:00
Esquith Allen
4f94889524 Add notification section to docs (#3681) 2019-08-13 10:25:53 -03:00
Esquith Allen
f545ebf7bb Adjust Algolia documentation (#3680) [ci skip] 2019-08-12 11:56:22 -04:00
Kitten King
6290451273 Fix Typos (#3510) 2019-07-22 12:56:48 -04:00
Branko Arnaudovski
1d2e9ff868 Docs: Change admin role tag information (#3323) [ci skip] 2019-06-27 18:06:42 -04:00
rhymes
9210f6793b Improvements on dev docs (#2616)
* Correct installation documentation

* Add stylized titles

* Add some changes to the getting started documentation

* Add changes for the backend guide

* Add changes for the design guide

* Add testing / Q&A guide improvements

* Minor fixes to contributing docs

* More improvements to the general doc

* Improvements for frontend guide
2019-04-29 18:54:29 -04:00
Andrew Brown
30dcb23169 #2507 - refactor GitDocs documentation (#2595)
* #2507 - refactor GitDocs documentation

* #2507 - fix grammar and spelling errors
2019-04-29 10:08:22 -04:00