Commit graph

234 commits

Author SHA1 Message Date
Mac Siri
8e50e58844 Add list-style to Widget (#1448)
* Add list

* Remove retry
2019-01-04 17:48:12 -05:00
rhymes
de5b889445 Fix Rubocop Style/MixinUsage and cleanup prefix_all_images (#1451)
* Use sanitizer to strip HTML tags

* Fix Style/MixinUsage

* Cleanup prefix_all_images

* Stay under 25 lines of code
2019-01-04 14:20:53 -05:00
Arun Kumar
08c070b7e3 Fix block delimiters Rubocop offense (#1456) 2019-01-03 16:45:28 -05:00
Jess Lee
4214bcbbf6 Add user status to internal/users (#1444)
* wip

* add indiviual user partial

* remove unnecessary attributes

* wip

* add indiviual user partial

* remove unnecessary attributes

* remove mentorship matching from view

* fix linting

* add mentor matching method back and refine test

* remove duplicate mentee descriptions

* Update app/controllers/internal/users_controller.rb

Co-Authored-By: jessleenyc <jessleenyc@gmail.com>
2019-01-03 16:44:43 -05:00
Arun Kumar
80a23ba403 Fix rubocop offenses (#1452) 2019-01-03 09:23:38 -05:00
rhymes
dbf5fc63ad Fix Rubocop Security/Open (#1447)
* Re-run rubocop autogen config

* Fix Layout/* violations

* Fix Security/Open and use HEAD if GET is not needed
2019-01-02 16:35:19 -05:00
rhymes
6553f08d94 Rubocop cleanups (#1415)
* Update rubocop-todo.yml with new violations

* Fix Layout/EmptyLine* rules

* Fix Layout/Indentation* rules

* Fix remaining Layout/* rules

* Fix Lint/DuplicateMethods by removing unused accessor

* Fix Lint/IneffectiveAccessModifier

* Fix Lint/MissingCopEnableDirective

* Re-run rubocop auto gen config

* Fix Layout/RescueEnsureAlignment

* Fix Naming/* rules

* Fix some RSpec/* rules

* Fix typos

* Fix RSpec/LetBeforeExamples

* Series should only be an attr_writer, not an attr_accessor

* Fix RSpec/InstanceVariable

* Fix RSpec/InstanceVariable

* Fix RSpec/RepeatedDescription and RSpec/RepeatedExample

* Fix Style/ClassAndModuleChildren

* Fix Style/ConditionalAssignment

* Fix some Style/* rules

* Trigger Travis CI build because failing tests are not failing locally

* Revert "Fix Style/ClassAndModuleChildren"

This reverts commit 1686801d8a1516ba1894f79e24401a20dea65f99.
2019-01-02 11:20:02 -05:00
Ben Halpern
c6644f9e97
Create tag liquid tag (#1417)
* Create tag liquid tag

* Add tag embed to editor guide
2018-12-29 12:12:18 -05:00
Ben Halpern
fc0175b18d
Refactor articles api controller (#1409)
* Refactor articles api controller

* Modify authorization logic in api
2018-12-27 16:47:04 -05:00
Ben Halpern
e4c120db5d
Replace dev.to with APP_DOMAIN config in a few places (#1406)
* Replace dev.to with APP_DOMAIN config in a few places

* Modify some tests
2018-12-26 18:13:05 -05:00
Andy Zhao
0a8f9ca654 Fix URL Validations and Update Admin Dashboard (#1392)
* Validate for trailing slash instead of strict validation

* Remove unused sign_in_count field

* Add profile URLs to edit view

* Add profile URLs to admin controller params

* Add profile URLs to edit view

* Clean up index and search views for user

* Move around user fields to make more sense

* Display more informative label

* Remove name_of_user field in favor of new display label

* Fix typo

* Remove duplication for website, employer, and Mastodon URLs

* Add score to comment params

* Remove unused name_of_user field views

* Fix typo for medium url
2018-12-26 18:00:02 -05:00
Ben Halpern
2bb48d27c4
Add two-year-club auto-rewarder (#1383) 2018-12-20 16:53:22 -05:00
Ashwin Vaswani
fbdd80d5fc Add headings to header tags (#1003)
* updating all headers to have h* tags, or changing elements

* Remove commented out binding.pry

* Remove unused page

* Use article instead of div for consistency

* Update snapshot with new section tag

* Use h4 tags again for new views
2018-12-19 16:47:44 -05:00
Jess Lee
c2a85540f0 Fix tag mod spec (#1365)
* fix slug typo

* fix specs
2018-12-19 14:35:15 -05:00
Jess Lee
1d2a6def4a Add tag moderation info page (#1360)
* clarifies tag edit form and updates photo

* add better image

* add tag moderation route and page info

* adds labor module for assigning bulk tag moderators

* Apply Peter's changes from code review

Co-Authored-By: jessleenyc <jessleenyc@gmail.com>

* fix typo

Co-Authored-By: jessleenyc <jessleenyc@gmail.com>

* replace with cloudinary image links

* add specs
2018-12-19 09:27:55 -05:00
Andy Zhao
cf36025a16 Fix reactions rendering on notifications (#1362)
* Use more specific find for looking for reactions

* Use basic notification tests

* Test for proper reaction button rendering

* Use the proper user for reaction test
2018-12-18 20:58:31 -05:00
Andy Zhao
8fb35e84c2 Add title to organization profile page (#1355)
* Add test for page title

* Add organization name as title
2018-12-18 17:14:23 -05:00
Andy Zhao
88cd4c13f3 Remove all flipflop related code (#1358)
* Remove all flipflop related code

* Undo an amend

* Comment out one last test

* Remove last test
2018-12-18 16:01:18 -05:00
Mac Siri
06e0cbabbb Revert "Replace Flipflop with Sail (#841)"
This reverts commit 21870e805a.
2018-12-18 13:44:40 -05:00
Vinicius Stock
21870e805a Replace Flipflop with Sail (#841)
* Replace Flipflop with Sail

* Address PR comments

* Bump sail version to latest

* Bump Sail to latest version

* Move setting creation to config/sail.yml

* Bump Sail to latest version

* Use correct limit for cast_type in schema

* Update Sail's route
2018-12-18 12:42:30 -05:00
Ben Halpern
28736cda20
Add missing title attribute to user profile page (#1349)
* Add missing title attribute

* Add spec

* Fix test
2018-12-17 15:04:00 -05:00
Andy Zhao
b3f2789eb2 Check if author_id is nil before querying for author (#1325)
* Check if author_id is nil before querying for author

* Remove some legacy code

* Remove tests that test for unused functionality
2018-12-15 12:44:45 -05:00
Andy Zhao
cf060d09e9 Visit a page before visiting the delete confirm page (#1326) 2018-12-13 17:20:01 -05:00
Anna Buyanova
074d50d2b7 Stories views reorganization (#1317)
* Added stories feature specs

* Structure feature specs

* Spec for the articles by tag page

* Spec for clicking "week" button on the tag page

* Reorganize stories views

* Feature spec for displaying sponsors on tag page

* Increase allowed rspec example length

* Spec for the users comments view

* Articles by tag: reeplace view code with rendering partials
2018-12-13 14:54:02 -05:00
Mac Siri
56ec3e55a2 Refactor Reaction (#1320)
* Refactor Reaction's spec

* Create singleton class in Reaction

* Refactor Reaction
2018-12-13 14:24:33 -05:00
Mac Siri
72eb2fc7b6 Revert "Extract background jobs from Reaction (#1312)" [ci skip]
This reverts commit cd54bece92.
2018-12-12 17:10:42 -05:00
Mac Siri
cd54bece92 Extract background jobs from Reaction (#1312)
* Refactor Reaction

* Update reaction_spec

* Extract update_reactable to job class

* Create ApplicationJob

* Rename Engagement::UpdateReactableJob to ReactionCascadeJob

* Rename ReactionCascadeJob to Reaction::UpdateRecordsJob

* Refactor Reaction::UpdateRecordsJob

* Remove unused method

* Change module to class
2018-12-12 16:41:31 -05:00
Ben Halpern
14bba5e4d5
Adjust button style/placement on desktop (#1288)
* Adjust button style/placement on desktop

* Change opacity on side comments

* Adjust css for side article actions

* Adjust opacity

* Adjust opacity

* Adjust opacity

* Fix test language

* Remove opacity deal
2018-12-11 13:08:43 -05:00
dependabot[bot]
f115cca714 Bump capybara from 3.10.0 to 3.12.0 (#1294)
* Bump capybara from 3.10.0 to 3.12.0

Bumps [capybara](https://github.com/teamcapybara/capybara) from 3.10.0 to 3.12.0.
- [Release notes](https://github.com/teamcapybara/capybara/releases)
- [Changelog](https://github.com/teamcapybara/capybara/blob/master/History.md)
- [Commits](https://github.com/teamcapybara/capybara/compare/3.10.0...3.12.0)

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

* Update spec
2018-12-10 16:06:21 -05:00
rhymes
96d01b20a2 Use allow/allowed instead of whitelist (#1296)
* Use allow/allowed instead of whitelist

* Remove duplication in comment
2018-12-10 13:16:16 -05:00
Jibran Kalia
f569f33e4f [WIP] Really simple calculate reading time function (#1283)
* Really simple calculate reading time function

* Move parse_it so that the number of methods in MarkdownParser is at 20

* Added test and default value for reading time
2018-12-09 13:42:32 -05:00
Andy Zhao
afce7acbf6 Fix profile's path for comment (#1280)
* Use user path instead of comment path, oops

* Fix typo

* Add 3 retries to capybara failing spec
2018-12-07 13:11:27 -05:00
Anna Buyanova
7b1c4084a8 Basic feature specs for the stories (#1269)
* Added stories feature specs

* Structure feature specs

* Spec for the articles by tag page

* Disable example length for feature specs

* Spec for clicking "week" button on the tag page
2018-12-07 10:32:38 -05:00
Jess Lee
f96bc7c6f3 Revert banisher (#1274)
* remove stalebot from milestone issues

* simplify banisher
2018-12-06 13:44:53 -05:00
Ben Halpern
6b96201265
[WIP] Allow mods to remove tags and send user notification (#1252)
* Initial tag adjustments

* Finalize tag adjustments and tag adjustments controller

* Fix schema.rb

* Finalize tag removal logic

* Adjust edge cases/tests for tag adjustment moderation

* Adjust tag adjustments spec
2018-12-04 16:45:32 -05:00
Michael Kohl
ffd24f791e Add Mastodon URL to profile (#1137) 2018-12-04 13:24:53 -05:00
Ben Halpern
651ab3ce35
Add point weights for tag follows (#1229)
* Add point weights for tag follows

* Adjust num articles to initially show up on home page

* Fix schema.rb

* Adjust follow policy spec

* Adjust dashboard styling for follow points form
2018-11-30 15:36:58 -05:00
Andy Zhao
32ed3ced11 Fix raw tag (#1215)
* Fix raw tag

* Remove constant first to prevent warning
2018-11-29 15:18:24 -05:00
Jason Yu
3af90f1d0e remove punctuations in header anchor links (#1219)
* remove punctuations in header anchor links

* remove punctuations first

* added test case for punctuation headings
2018-11-29 15:16:09 -05:00
Andy Zhao
8b9aa98f64 Add retry in case sign in failed for whatever reason (#1221) 2018-11-29 13:39:48 -05:00
Ben Halpern
011e267769
Update mentor matching page (#1218)
* Update mentor matching page

* Update mentorship relationship spec
2018-11-28 19:02:47 -05:00
Ben Halpern
759d7540a7
Add guard to stop negative notifications (#1200) 2018-11-26 12:34:38 -05:00
Anna Buyanova
c1eb30e02a Make less sql queries when loading comments (#1197) 2018-11-26 10:51:38 -05:00
Ben Halpern
031a3bd751
Fix parsing error in header tags. (#1180)
* Strip HTML from anchor link in header names

* Skip one test which is not passing for unknown reasons
2018-11-22 12:48:46 -05:00
Jess Lee
e36cf51a9e Refine Banish User (#1168)
* add banish user test

* refactor banish user wip

* banish user wip - bust comment cache synchronously

* add more spec scenarios

* Update Banish#strip_user_profile

* Refactor specs
2018-11-21 16:55:26 -05:00
rhymes
915e2d77b6 Export articles/posts (#576)
* Add EditorConfig file for all editors

* Add article export service

* Add setting to request an export of all articles

* On the outside they are called posts

* Add articles exported email to mailer and service

* Refactor to one public method and test flags

* Trigger the export if it was requested and send the email

* Recreated migration file with generic export fields

* Rename fields and switch to a whitelist

* Refactor ArticleExportService into a more generic structure

* Rename articles_exported_email to export_email

* Fix notify mailer spec

* Rename Exporter::Exporter to Exporter::Service

* Remove commented out line

* Removed body_html, coordinates and updated_at from export

* Invert DJ config

* Update spec
2018-11-21 11:13:36 -05:00
Gabriel Lebec
1e2749be24 feat(markdown): add ids to headers (#713)
* feat(markdown): add anchors for headers

* Fix markdown anchors impl and spec

* Fixes tests for markdown anchors

* Use name for anchors instead of IDs

* Fix approval file

* Remove emojis in links and hyphenate only spaces
2018-11-20 18:17:07 -05:00
Ben Halpern
115e52c748
Move follow and reaction aggregation into Notification model to avoid… (#1164)
* Move follow and reaction aggregation into Notification model to avoid re-compute

* Ugh. Fixing schema

* Update tests

* Skip some tests in notifications_spec
2018-11-20 15:00:21 -05:00
Mac Siri
912b6e75f2 Remove focus [ci skip] 2018-11-20 11:12:18 -05:00
Andy Zhao
044de6a8b5 Make reads controller async and sanitize notification titles (#1158) 2018-11-19 19:33:00 -05:00