Commit graph

34 commits

Author SHA1 Message Date
Mac Siri
59ee1461a4
Upgrade to Node 20 (#20424)
* Upgrade to Node 18

* Run audit fix to resolve node 16 openssl issue

* Update babel.config.js

* Replace node-version with node-version-file

* Add NODE_OPTIONS

* Specify major version only

* Try setting locally instead

* Try custom hashFunction

* Trying two things at once

* Try without legacy option

* Add back openssl-legacy-provider

* Add resolution for terser-webpack-plugin

* Use older terser-webpack-plugin

* Revert changes to CI

* Add compression-webpack-plugin to resolution

* Use new node_module cache

* Add NODE_OPTION in build_test

* Maybe remove redundant label

* Upgrade storybook

* Update bin/webpack

* Revert "Upgrade storybook"

This reverts commit fca3fb5c8718786b7db20538c5c4ae6cf44b45b8.

* Remove unnecessary change

* Update yarn.lock again

* Now try with Node 20

* Upgrade Node module cache CI

* Lint

* Update base image sha
2023-12-15 14:27:36 +00:00
Nick Taylor
1300f7960a
chore: Removed unused webpack configuration (#16887) 2022-03-15 21:09:34 -04:00
Nick Taylor
52e4e571b7
Reworked some webpack aliases as prework for #16174. (#16412) 2022-02-04 06:34:37 -05:00
Nick Taylor
d13f0ba0cb
Added the babel-inline-react-svg plugin (#15461) 2021-11-23 12:24:50 -05:00
Nick Taylor
ca0db28fc4
Add logo preview to creator settings form (#15363) 2021-11-18 12:23:24 -05:00
Michael Kohl
065f363b81
Fix typo (#15238) 2021-11-02 12:52:47 +07:00
Suzanne Aitchison
dcecc8bf00
Log prop-types warnings to console in development (#14635)
* enable debug for warnings in dev env

* remove preact/devtools call no longer needed

* fix majority of proptype errors on home page

* sweep up proptype errors from listings page

* fix article form error
2021-09-01 09:27:58 +01:00
Josh Puetz
9fe7be190b
Switch references to Forem master branch to main (#12325) 2021-04-16 11:51:06 -05:00
Suzanne Aitchison
e3c97d18d6
Update storybook mention autocomplete component to take over whole textarea (#13044)
* Revert "Revert "Update storybook autocomplete component (#12980)" (#13027)"

This reverts commit f393dd2bbc.

* create helper function to replace node, add comments

* minor refactors
2021-03-18 15:04:59 +00:00
Nick Taylor
f393dd2bbc
Revert "Update storybook autocomplete component (#12980)" (#13027) 2021-03-17 15:59:38 -04:00
Suzanne Aitchison
76a7ed6dbe
Update storybook autocomplete component (#12980) 2021-03-17 11:49:16 -04:00
Nick Taylor
2bba2a6ee4
Added the @components webpack alias to the project (#12808)
* Added the @shared webpack alias to the project.

* Added some documentation.

* Fixed a copy paste error.

* Renamed @shared to @components.

* Update docs/frontend/webpacker.md

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-02-24 16:07:48 +01:00
Nick Taylor
b922b0f319
E2E Test: Initial Adminisitrator Login Flow (#11840)
* Set baseUrl for Cypress tests.

* Fixed login form for tests.

* Added fixture data for initial admin credentials.

* First e2e test.

* Fixed a typo in a comment.

* Using an input of type submit like the login previously had was fine.

* Added a check to ensure user is redirected to the home page.

* Forgot to commit adding @testing-library/cypress

* Renamed and move login flow under loginFlows in integrations.

* Added testing library to support files so it does not need to be imported into every test explicitly by the test writer.

* Added some more Cypress related files that will be required for testing going forward.

* Took onboarding into account when checking the URL post login.
2020-12-11 13:44:18 -05:00
Nick Taylor
8fabccec4e
Add Preact dev tools to development bundles (#11459)
* Now Preact dev tools are injected into development bundles.

* Updated frontend debugging documentation.

* Updated frontend debugging documentation wording.
2020-11-18 14:20:58 +01:00
Rafi
0d2b4c515d
Replace globals with node env (#10767) 2020-10-14 17:05:38 -04:00
Ben Halpern
45fb6504dc
[deploy] Replace HEROKU_SLUG_COMMIT with custom footprint (naive) (#9904)
* Replace HEROKU_SLUG_COMMIT with custom footprint (naive)

* Fully set RELEASE_FOOTPRINT with the expectation of setting it before launch

* Change tests

* Fix cache
2020-08-25 13:47:14 -04:00
Nick Taylor
a7938ed287
Fixed a bunch of linting issues in components (#8921) 2020-06-26 10:26:02 -04:00
Mac Siri
ea7d843f35
[deploy] Update Honeybadger's assetsUrl (#8916) 2020-06-25 18:58:20 -04:00
Mac Siri
967f00793a
Add @honeybadger-io/webpack for source-map upload (#8899) 2020-06-24 20:42:28 -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
rhymes
1112cbf316
[deploy] Update webpacker configuration (#8004) 2020-05-25 12:03:18 -04:00
Nick Taylor
27131f6f42
Request Utility for Frontend (#7317)
* wip

* Added tests.

* Moved request to @utilities/http.

* Now the CSRF token is retrieved properly.
2020-04-22 07:58:15 -04:00
Nick Taylor
5ba10c96a2
Add webpack aliases for Crayons components (#6958)
* Added webpack alias for @crayons.

* Added @crayons to eslint import/no-unresolved rule ignore list.

* Added path mappings for VS Code for webpack aliases.
2020-03-31 07:16:29 -04:00
Nick Taylor
1eeb472b91
Now webpack logs only display errors on Travis (#6897) 2020-03-27 08:12:28 -04: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
Nick Taylor
ee9b1f58b9
Enabled ERB support for webpacker (#6166) [deploy] 2020-02-19 08:58:37 -05:00
Mac Siri
ce965bcedf Reduce Airbrake's error output (#628)
* Remove chmod for after_deploy

* Fix lint

* Ignore Pundit::NotAuthorizedError

* Update Travis config

* Turn off Travis' pr notification

* Add CommonsChunkPlugin to Webpacker
2018-07-27 09:04:52 -07:00
Nick Taylor
9d55c5f854 Nick/task/dx/vscode chrome debugger (#538)
* Now you can attach to debug the front-end with VS Code.

* Added Chrome Debugger extension to suggested extensions.
2018-07-03 10:11:11 -04:00
Mac Siri
8d38fe56fd Remove precompilation related codes (#414) 2018-06-11 11:54:38 -04:00
Ben Halpern
645de032df
Rearchitect chat channel subscriptions (#409)
* Update chat and add precompilation paths

* Update chat and add precompilation paths

* Adjust assets.rb

* Remove inconsistent test

* Fix check for pathname in chat

* Rearchitect chat channel subscriptions
2018-06-08 18:38:53 -04:00
Ben Halpern
98d84d2456
Update chat and add precompilation paths (#406)
* Update chat and add precompilation paths

* Update chat and add precompilation paths

* Adjust assets.rb
2018-06-08 15:31:48 -04:00
Mac Siri
7cb65649e4 Update chat app (#326)
* Fix spacing

* Update webpacker gem to 3.5

* Add custom preact-compact config

* Add babel-loader to resolve a weird issue

* Add react-textarea-autocomplete

* Move 2 dependencies into devDependencies

* Add babel-eslint & eslint-plugin-babel

* Refactor chat

* Add fixed width to chat's channels

* Add timestamp for chat

* Fix long word issue

* Add showTimestamp options to chat

* Add profile image to chat

* Make profile image in chat circle

* Improve message send logic

* Add proper user session handling for chat

* Choose profile user image source for chat

* Adjust user's text color

* Fix lint
2018-05-21 13:19:56 -04:00
Nick Taylor
21b24f12fe Enabled source maps for local front-end development. (#225) 2018-04-23 13:49:02 -04:00
Mac Siri
301c6080e3 Initial commit 2018-02-28 16:11:08 -05:00