Commit graph

7686 commits

Author SHA1 Message Date
Ben Halpern
c5960f4640
Make mod button only show up for trusted user (#11856) 2020-12-11 07:51:04 -05:00
Molly Struve
5f5bdb4a32
Refactor:Remove old teams from CODEOWNERS and update general teams (#11850) 2020-12-11 06:49:01 -06:00
dependabot[bot]
bcadebb3ef
Bump ini from 1.3.5 to 1.3.7 (#11858)
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-10 22:37:43 -05:00
Ridhwana
23235c2276
feat: update the contact email address in the database (#11848) 2020-12-10 12:35:46 -06:00
Jacob Herrington
563a2c5a22
Fix misleading comment (#11847)
I'm updating this comment based on @citizen428's feedback.

https://github.com/forem/forem/pull/11836#discussion_r539811288
2020-12-10 12:34:23 -06:00
Mac Siri
6a150d11c5
Update aspect ratio of images on the Admin's config page (#11527) 2020-12-10 09:21:52 -05:00
Jacob Herrington
f2722f8701
Don't attempt to call summary on profile during onboarding (#11836) 2020-12-10 08:55:46 -05:00
Nick Taylor
e28b75b19a
Fixed eslint/jest configurations for cypress. (#11841) 2020-12-10 12:48:37 +01:00
Michael Kohl
1729cf02ad
Move Twilio from labor to services (#11824)
* Move Twilio from labor to services

* Update usage
2020-12-10 10:21:09 +07:00
Michael Kohl
59e2f5a025
Remove app/labor/color_from_image.rb (#11825)
* Remove app/labor/color_from_image.rb

* Remove miro gem

* Delete TODO
2020-12-10 10:08:06 +07:00
Nick Taylor
02f0a9ca1d
Add Cypress for end to end testing (E2E) (#11835)
* Added eslint plugin/rules for Cypress.

* Added Cypress to the project for end to end testing.

* Added ~/.cache folder to cache Cypress binary on Travis.
2020-12-09 17:08:20 -05:00
Joe Doss
e91dffb1a5
Just use the master branch for now. (#11834) 2020-12-09 13:55:25 -06:00
Fernando Valverde
c2982ef0fc
Ensure Article's username method returns a downcased string (#11813)
* Adds a lower() query to the DB in Stories#show

* Restructure spec

* bypass article callbacks in order to test edge case

* Fixes spec

* Change the approach to unsure downcase path in Article model

* Move .downcase call to set_caches before_save callback

* Adds data update script for fixing offending Article paths

* Moves model tests to correct block

* Apply suggestions from code review

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-12-09 12:56:40 -06:00
Mac Siri
b00ebc2778
Disable duplicate resave data upgrade script (#11829) 2020-12-09 12:20:30 -05:00
Joe Doss
eee63068dc
Scope PR comment bot to only run when the PR is opened. (#11830) 2020-12-09 10:44:04 -06:00
Jacob Herrington
692acd3cb2
Render Profile Fields on user profiles (#11485)
* Render left sidebar attributes on profile

* Display header profile fields

* Make changes to protect DEV data

* Don't render DEV header fields twice

* Wrap profile UI changes in a FeatureFlag

* Add spec to test mulitple display areas

* Use select over reject

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

* Move comment for documentation generators

* Update dev profile fields csv data

Co-authored-by: Michael Kohl <me@citizen428.net>
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2020-12-09 09:41:11 -06:00
Alex
8598ed090e
Create services for busting pages, tags, events, and podcasts (#11812)
* Create bust_page service and spec

* Specify spec with .once

* Create bust_tag service and spec

* Create bust_event service and spec

* Create bust_podcast service and spec
2020-12-09 10:37:02 -05:00
Joe Doss
67342a4edf
Add github.event.comment.author_association == 'CONTRIBUTOR' to if statement (#11822)
This should be the last PR to get the `/ci` and `/rebase` commands working in
GitHub Actions. The issue is that our membership settings for `forem/forem` have
everyone set to 'CONTRIBUTOR' instead of 'MEMBER' or 'OWNER'.

Adding github.event.comment.author_association == 'CONTRIBUTOR' should fix this
issue.

I also cleaned up all action files to make the main name of the workflow as
succinct as possible to better organize the left menut of the GitHub Actions
page.

This PR won't fix the issues with the "Run forem/build-containers pipeline"
job in buildkite.yml but I will address those issues in another  PR.
2020-12-09 08:36:57 -06:00
Joe Doss
66dc8081b1
Update buildkite.yml (#11821)
Uncomments if statement as I was able to get the info I needed out of the debug statement. Using admin privs to re-enable the if statement sans tests.
2020-12-08 18:37:16 -06:00
Joe Doss
5edff0182f
Update buildkite.yml (#11820)
Admin merging to disable the conditional for a quick test. TravisCI tests do not need to run for this PR.
2020-12-08 18:31:20 -06:00
Joe Doss
a8b9e9ab95
Add debug to actions. (#11819) 2020-12-08 18:12:06 -06:00
Joe Doss
4504ac15ec
GitHub Action bug fixes (#11816)
* Update if statement w/r/t github.event.issue.pull_request conditional and update
cirrus-actions/rebase to 1.4.

* Fix running the PR comment workflow so it only runs if

github.event.pull_request.head.repo.full_name != github.repository

How neat!
2020-12-08 16:54:28 -06:00
Ben Halpern
1c81978da2
Fix admin header links (#11811) 2020-12-08 14:46:55 -06:00
Ben Halpern
6389dae3c0
Fix feed dropdown (#11810) 2020-12-08 15:32:53 -05:00
Fernando Valverde
0ac3e83b0c
Remove resource_admin dashboards (Administrate) (#11792)
* First cleanup commit

* Email messages preview

* Tweak tests

* spec typo fix

* Remove lingering Administrate Fields & Abuse report link fix

* Add missing gemfile lock update

* Extract email_messages into its own controller & add test
2020-12-08 12:38:13 -06:00
Ben Halpern
686b174012
Add onboarding param to safe list (#11814) 2020-12-08 13:34:53 -05:00
Ridhwana
7a9629172d
Profile generalization for the onboarding workflow (#11629)
* feat: v1 of the profile form

* feat: fix inputs and create a handleChange event

* feat: update the submit values to represent values from the form

* feat: ensure that errors and success is handled on send

* refactor: remove unused code

* feat: replace the old profile form with a new one

* fix: use the renames file

* refactor: safety net for groups

* chore: fix code climate issue

* tests: amend + add tests

* test: fix broken spec

* feat: update the setup for the test

* tests: refactored them to move the fake response into the before all

* feat: clunky way to quickly cater for color field since it was a quick and easy implementation

* feat: add a field.description to the color field

* refactor: pull some duplicate code into a new function

* chore: cater for a textarea field

* overflow issue

* refactor: use FormField instead of manual divs

* Update spec/requests/users_onboarding_spec.rb

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Update spec/requests/users_onboarding_spec.rb

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* refactor: move out of method and into a constant

* refactor: user_onboarding_update to be more readable

* refactor: use current.save instead of declaring a new variable

* refactor: remove explicit check for bookean

* refactor: use request from '@utilities/http' instead :)

* refactor: no need for if with destructured groups

* refactor: move color field to its own component

* chore: remove colorfield now thats its a component

* fix: forgot about field

* feat: a text area component

* chore: remove textField function in favor of component

* refactor: checkbox refactor

* refactor: add a switch statement

* chore: move into a more organized folder

* fix: move the handler to props and off from field

* fix: add a conditional so we dont hit an error undefined method `success?' for nil:NilClass

* refactor: change from component to function

* feat: add a key attribute

* refactor: add role for readers

* refactor: remove unnecessary guard clauses

* refactor: use function instead of an arrow

* chore: document components

* test

* padding

* fixes

* test: fix the tests by using more general matchers

Co-authored-by: Paweł Ludwiczak <ludwiczakpawel@gmail.com>
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-12-08 19:53:00 +02:00
Alex
d0eb582236
Add bust_article service (#11788)
* Add bust_article service

* Make timestamps lambdas

* Remove nil safe operators

* Updated bust_article specs

* Add spec for TIMEFRAMES and relative time
2020-12-08 11:56:43 -05:00
Joe Doss
bb849bf319
Try to fix GitHub Action conditionals again... (#11807) 2020-12-08 10:38:09 -06:00
John Losito
c55dacf598
Check github actions weekly with dependabot (#11779)
* Check github actions weekly with dependabot

* Update dependabot.yml
2020-12-08 11:36:25 -05:00
Ben Halpern
2c96c14021
Use static error files in serviceworker (#11806)
* Use static error files in serviceworker

* Bump static cache version
2020-12-08 11:20:23 -05:00
Ridhwana
bae2571ad6
Replace the "setup onboarding profile fields" temp rake task with a data update script (#11800)
* feat: replace the temp rake task with a data update script

* oops we need a user
2020-12-08 17:50:43 +02:00
Joe Doss
71ad902315
Fix YAML so it is actually valid GitHub Action YAMLs. (#11801) 2020-12-08 09:48:49 -06:00
Joe Doss
08447cfea2
Update buildkite.yml (#11799) 2020-12-08 09:02:09 -06:00
ludwiczakpawel
73e560f7a2
Updating navigation (especially mobile) (#10424)
* .

* .

* .

* .

* .

* specs

* specs

* .

* .

* merge

* moving cheese around

* layout

* .

* merge

* Fixed invalid selector for search.

* Fixed issue with URL not updating after a search.

* do things better

* kinda merge

* whoops

* whoops

* .

* .

* im a backend developer

* tooltips 1.0.1

* tooltips 1.0.1

* fix

* specs

* .

* reduce the spacing

* schema drop

* reverts

* revert

* reverts

* revert

* drop unused nav

* drop unused nav

* drop unused nav

* drop unused nav

* typos

* paths fixes

* speeding up JS

* js

* search

* Reworked initializeTopBarIcons.js

* Reworked initializeNavigation.js

* Small refactor and updated exported function API docs.

* Fixed a bug I created when refactoring the top navigation icons.

* sidebar nav links

* spec

* Fixed issues with logged out experience for top nav icons.

* Small refactor of top nav icons.

* Small refactor and added some API docs.

* Added @testing-library/dom

* Added tests for top navigation utilities.

* spec

* spec

Co-authored-by: Nick Taylor <nick@dev.to>
2020-12-08 15:59:21 +01:00
Joe Doss
58b7906fe6
GitHub workflow for /ci trigger (#11794)
* GitHub workflow for /ci trigger

Add in GitHub workflow for adding the `ci` label to the PR and running Buildkite
pipeline(s).

The `ci` label will allow the PR to be built on push without havinvg to continuously
issue the `/ci` trigger from a Forem team member.

```
build.pull_request.repository.fork != true || build.pull_request.labels includes "ci"
```

Also using the `/ci` trigger will run the initial pipeline builds too.

* Fix YAML formatting and typos.

* Add note to PR template.

* Conditionally add a comment to a new PR when it originates from a third-party
fork with a note about having to wait for manual approval for our CI to run on
their PR.

* Update .github/PULL_REQUEST_TEMPLATE.md

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update .github/workflows/pr.yml

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Adjust if statement to include OWNERS and do startsWith instead of contains.

Co-authored-by: Michael Kohl <citizen428@dev.to>
2020-12-08 08:32:47 -06:00
Andy Zhao
5ae4650e46
Invalidate cache for all org users' profiles (#11796) 2020-12-08 07:56:13 -05:00
rhymes
7eb7cef1b9
Upgrade Admin to Stimulus 2.0 (#11776)
* Upgrade Stimulus to 2.0

* Convert ArticleController to use Stimulus 2

* Convert ModalController to Stimulus 2

* Convert BufferController to Stimulus 2

* Convert ConfigController to use Stimuus 2

* Convert ImageUploadController to Stimulus 2

* Convert Reaction controller to Stimulus 2
2020-12-08 10:43:56 +01:00
Dominic Duffin
9bb62598a4
Fix Mod Center compatibility issue with dark themes (Date column) (#11795) 2020-12-08 10:33:25 +01:00
rhymes
9870021eec
Fix broken experience level button in moderation panel (#11797) 2020-12-08 10:20:35 +01:00
Mac Siri
ce9272c914
Remove @storybook/components from yarn.lock (#11789) 2020-12-08 08:49:52 +01:00
Sarthak Sharma
6dee5edd0e
🚀 Ability to allow tag moderators to create chat channels (#9741)
* 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

* UI completed for Create Channel

* API for create channel & invitations

* 🚀 Combining Backend and Frontend

* Test cases added

* UI completed for Create Channel

* API for create channel & invitations

* 🚀 Combining Backend and Frontend

* Test cases added

* fix suggestions

* add test cases

* replace mod_relations_admin to tag_moderator

* fix test cases

* refactor and fix code climate issues

* Update app/controllers/chat_channel_memberships_controller.rb

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

* fix suggestions

* renaming the methods

* Update app/javascript/chat/chat.jsx

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

* Update app/javascript/chat/components/createChatModal.jsx

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

* add jsDoc and add validation

* add PR suggestions

* renmae the file name to  PascalCase

* add styled component

* refactor channel button component

* fix specs

* fix code smell issues

* fix file name issue

* handle error message

* add jsDoc

* Update app/controllers/chat_channels_controller.rb

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

* refactor chat_channel_helpers

* update old hash to new hash

* Update app/javascript/chat/components/ChannelButton.jsx

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

* Update app/views/chat_channels/index.html.erb

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

* fix syntax error

* Update app/views/chat_channels/index.html.erb

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

* Policies changed

* The Disable Button issue 🐞

* Fixing Disabled button Issue 🐞

* New group doesn't show up 🐞

Co-authored-by: Narender Singh <narender2031@gmail.com>
Co-authored-by: Michael Kohl <me@citizen428.net>
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-12-08 13:10:36 +07:00
Michael Kohl
5c2f27baed
Remove timeframer from app/labor (#11782)
* Move file

* Update usages

* Simplify
2020-12-08 12:52:33 +07:00
Michael Kohl
62c107c948
Move profile initialization to after_initialize hook (#11783)
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2020-12-08 12:49:51 +07:00
Jacob Herrington
b7eec54dac
Fix Rspec warning regarding specific error class (#11787) 2020-12-07 18:28:42 -06:00
Ridhwana
19a048ecec
Deployment Task: Update onboarding fields prior to #11629 (#11704) 2020-12-07 14:57:18 -05:00
Ben Halpern
31b83a4511
Remove concept of "ongoing" field tests and clarify a/b test instructions/expectations. (#11734)
* Remove concept of 'ongoing' field tests

* Fix specs

* Feeds spec

* Fix spec

* Fix style issues

* More details on field tests
2020-12-07 13:52:54 -05:00
rhymes
2ab0719501
Use custom, dynamic, error pages (#11744)
* Use ErrorsController to render error pages

* Hide GitHub bug report prompt from anything other than dev.to and forem.dev

* Update service worker to use 404 and 500

* Other fixes
2020-12-07 18:55:41 +01:00
rhymes
f6d73fea8d
[Hotfix] Allow blank values for payment_pointer (#11786) 2020-12-07 18:18:40 +01:00
dependabot-preview[bot]
bd9e83de6c
Bump store_attribute from 0.8.0 to 0.8.1 (#11769)
* Bump store_attribute from 0.8.0 to 0.8.1

Bumps [store_attribute](https://github.com/palkan/store_attribute) from 0.8.0 to 0.8.1.
- [Release notes](https://github.com/palkan/store_attribute/releases)
- [Changelog](https://github.com/palkan/store_attribute/blob/master/CHANGELOG.md)
- [Commits](https://github.com/palkan/store_attribute/compare/v0.8.0...v0.8.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Bump store_attribute from 0.8.0 to 0.8.1 (Update vendor/cache)

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-12-07 15:09:44 +01:00