docbrown/spec
rhymes 99ddd31058
Pin posts to feed (#13807)
* Add SiteConfig.feed_pinned_article and validation

* Display pinned article at the top of feed

* Add (basic) functionality to pin/unpin post

* Admins can pin other users posts as well

* Hide the button if looking at the non pinned post

* Add pinned/unpinned snackbar message

* Rename SiteConfig usage to Settings::General

* Add pinned article to the Admin articles index

* Show the pin post button when there's no pinned article

* Move pinning to a separate controller

* Fix SiteConfig reference

* Hide PinController actions to unauthorized users

* PinnedArticlesController#show action and refactor some of the code

* Add Modal interaction

* Fix modal-pinned checkbox interaction

* Fixed pin/unpin post

* Add ArticleDecorator#pinned? specs

* Add PinnedArticlePolicy and PinnedArticlesController specs

* Add ability to actually pin an article from the admin after submit

* Add partial Cypress pin/unpin spec

* Fix pinned article and add basic Cypress interaction tests

* Add Crayons styling to modal

* Only render the pinned article on the default Feed page

* Use persisted?

* Add some comments

* Update app/javascript/articles/Article.jsx

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

* Update app/javascript/packs/homePageFeed.jsx

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

* Fix Cypress tests

* Update app/javascript/admin/controllers/article_controller.js

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>

* Fix pinning in article show page

* Used PinnedArticle domain model

* Fix spec

* Update cypress/integration/adminFlows/articles/pinArticle.spec.js

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

* Update cypress/integration/adminFlows/articles/pinArticle.spec.js

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

* Update cypress/integration/adminFlows/articles/pinArticle.spec.js

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

* Update cypress/integration/adminFlows/articles/pinArticle.spec.js

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

* Update cypress/integration/adminFlows/articles/pinArticle.spec.js

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

* Update cypress/integration/articleFlows/pinArticle.spec.js

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

* Update cypress/integration/articleFlows/pinArticle.spec.js

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

* Update app/views/admin/articles/index.html.erb

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

* Fix merge woes

* Add missing article pin post flows

* Add missing admin article flows

* Add Unpin to Admin as well

* Add Audit::Log entries for pin/unpin actions

* Update app/controllers/stories/feeds_controller.rb

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

* Do not rate limit in E2E tests

* Use .find instead of .filter

* Rename ArticleIdValidator to ExistingArticleIdValidator

* Treat draft and deleted articles the same

* Make sure posts can be pinned after the pinned article is unpublished or deleted

* Use .get directly

* Fix spec and fix PinnedArticlesController#show

* Strengthen pinArticle Cypress tests

* Add Cypress test heading guard

* Add another Cypress test heading guard

* Remove duplicate validator

* Try using the Tools: header instead of the article title

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
Co-authored-by: Michael Kohl <citizen428@dev.to>
2021-06-04 10:54:53 +02:00
..
black_box Remove <provider>_created_at columns (#13264) 2021-04-29 10:24:16 -05:00
controllers/concerns 15 minute fix: Add default argument to JsonApiSortParam (#13369) 2021-04-14 10:32:07 +07:00
decorators Pin posts to feed (#13807) 2021-06-04 10:54:53 +02:00
factories Settings: Correctly display profile field static values (#13887) 2021-06-01 16:16:15 +02:00
fixtures ✂️ Remove the approvals gem ✂️ (#12978) 2021-03-19 13:28:06 -07:00
generator Add service generator (#11265) 2020-11-10 09:09:35 +07:00
helpers Replacing granular admin email settings with one default email (#13853) 2021-05-28 12:17:08 +03:00
initializers Bump rubocop from 1.15.0 to 1.16.0 (#13894) 2021-06-02 09:11:38 -04:00
lib Bump rubocop from 1.15.0 to 1.16.0 (#13894) 2021-06-02 09:11:38 -04:00
liquid_tags Rename SiteConfig to Settings::General (#13573) 2021-05-21 14:45:37 +02:00
mailers Replacing granular admin email settings with one default email (#13853) 2021-05-28 12:17:08 +03:00
models Pin posts to feed (#13807) 2021-06-04 10:54:53 +02:00
policies Pin posts to feed (#13807) 2021-06-04 10:54:53 +02:00
queries Have specs run without Redis and refactor ConsumerApp and Device (#13647) 2021-05-07 08:03:16 +02:00
refinements Update data exporter to handle admin send (#10274) 2020-10-26 18:00:56 -04:00
requests Pin posts to feed (#13807) 2021-06-04 10:54:53 +02:00
routing ✂✂✂ Remove shop_url from SiteConfig ✂✂✂ (#13773) 2021-05-18 09:03:05 +07:00
serializers/search Cleanup search classes and serializers (#13645) 2021-05-05 09:20:59 -04:00
services Pin posts to feed (#13807) 2021-06-04 10:54:53 +02:00
support Bump rubocop from 1.15.0 to 1.16.0 (#13894) 2021-06-02 09:11:38 -04:00
system Bump rubocop from 1.15.0 to 1.16.0 (#13894) 2021-06-02 09:11:38 -04:00
tasks Bump rubocop-rails from 2.9.1 to 2.10.0 (#13655) 2021-05-05 14:16:44 -07:00
uploaders Fix Ruby 2.7 kwargs' warnings & misc spec warnings (#13256) 2021-04-06 16:57:59 -04:00
view_objects [15 min fix] Fallback to the image URL if Cloudinary/Imgproxy are not configured (#13767) 2021-05-19 15:03:20 +02:00
views Rename SiteConfig to Settings::General (#13573) 2021-05-21 14:45:37 +02:00
workers Detect animated images in articles asynchronously (#13766) 2021-06-01 10:34:04 +02:00
rails_helper.rb Replacing granular admin email settings with one default email (#13853) 2021-05-28 12:17:08 +03:00
spec_helper.rb [15-minute fix] Don't allow markdown to use CSS classes (#13282) 2021-04-07 11:40:39 -04:00