docbrown/app/views/admin
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
..
articles Pin posts to feed (#13807) 2021-06-04 10:54:53 +02:00
badge_achievements Add loading=lazy to image tags (#10888) 2021-05-27 19:01:21 +02:00
badges Add loading=lazy to image tags (#10888) 2021-05-27 19:01:21 +02:00
broadcasts RFC#50-P5 Prepares the admin restructure to be tested (#13114) 2021-04-15 14:53:46 +02:00
chat_channels RFC#50-P5 Prepares the admin restructure to be tested (#13114) 2021-04-15 14:53:46 +02:00
comments Add loading=lazy to image tags (#10888) 2021-05-27 19:01:21 +02:00
configs Replacing granular admin email settings with one default email (#13853) 2021-05-28 12:17:08 +03:00
consumer_apps Clean up SiteConfig (#13738) 2021-05-18 09:38:31 +07:00
data_update_scripts Admin DataUpdateScripts: fix Re-run button label (#13825) 2021-05-21 17:35:09 +02:00
display_ads RFC#50-P5 Prepares the admin restructure to be tested (#13114) 2021-04-15 14:53:46 +02:00
email_messages Upgrade to Ahoy 2.0.x (#13085) 2021-04-06 10:12:32 -05:00
events Add loading=lazy to image tags (#10888) 2021-05-27 19:01:21 +02:00
feedback_messages Rename SiteConfig to Settings::General (#13573) 2021-05-21 14:45:37 +02:00
html_variants Titles & subtitles cleanup (#10508) 2020-10-02 12:37:39 +02:00
invitations Confirmations that users GDPR data was deleted (#11039) 2020-12-14 12:49:45 +03:00
listing_categories RFC#50-P5 Prepares the admin restructure to be tested (#13114) 2021-04-15 14:53:46 +02:00
listings Remove buffer gem and related code: step 1 (#12993) 2021-03-24 09:58:38 +07:00
moderator_actions Override specified line break behaviour on the ID column (#12076) 2021-01-04 16:17:38 -05:00
mods Override specified line break behaviour on the ID column (#12076) 2021-01-04 16:17:38 -05:00
navigation_links Remove superfluous app_url from nav links index (#13302) 2021-04-07 11:50:10 -06:00
organizations Override specified line break behaviour on the ID column (#12076) 2021-01-04 16:17:38 -05:00
overview Remove mentions of creators.forem.com (#13774) 2021-05-17 09:49:36 -04:00
pages crayons-notice accessibility improvements (#13273) 2021-04-14 13:32:57 +01:00
permissions Override specified line break behaviour on the ID column (#12076) 2021-01-04 16:17:38 -05:00
podcasts RFC 50: fix some more hardcoded paths (#13473) 2021-04-26 17:49:54 +02:00
privileged_reactions Override specified line break behaviour on the ID column (#12076) 2021-01-04 16:17:38 -05:00
profile_fields improve keyboard accessibility of modals 12427 10610 (#12511) 2021-02-24 16:01:10 +00:00
response_templates RFC#50-P5 Prepares the admin restructure to be tested (#13114) 2021-04-15 14:53:46 +02:00
secrets RFC#50-P5 Prepares the admin restructure to be tested (#13114) 2021-04-15 14:53:46 +02:00
shared Fix layout shift on active crayons-tabs change. (#13300) 2021-05-12 11:45:36 -04:00
sponsorships RFC#50-P5 Prepares the admin restructure to be tested (#13114) 2021-04-15 14:53:46 +02:00
tags Remove duplicate jquery import, remove jquery-rails and use @rails/ujs (#13891) 2021-06-01 15:28:09 +02:00
tools [deploy] Add a simple image uploader partial (#10884) 2020-10-21 16:41:50 +02:00
users Replacing granular admin email settings with one default email (#13853) 2021-05-28 12:17:08 +03:00
webhook_endpoints [deploy] Adding Crayons to Admin (#10015) 2020-08-31 10:29:06 -04:00
welcome Titles & subtitles cleanup (#10508) 2020-10-02 12:37:39 +02:00