From 497f494ef3131a3d8817284fb7ff54a9f5bfa23d Mon Sep 17 00:00:00 2001 From: Rajat Talesra Date: Mon, 9 Jan 2023 20:18:28 +0530 Subject: [PATCH] Removed nav related classes from feedback tabs (#18924) * Removed bootstrap from listing_categories, listings, navigation_links * Removed not-used bootstrap classes from admin/tags * Removed bootstrap from admin/settings * Fix collapse glitch in profile-fields * Feedback partial progress * Feedback partial progress * Removed form-control * Replaced card with crayons-card * Fixed profile field UI * Removed collapse hide and show classes * Removed collapse hide and show classes * Removed collapse hide and show classes * Nit height fix * Nit width fix * Updated tests * Removed nav related classes from feedback tabs * Remove btn-classes from commets too. * Removed row and col-12 classes * Removed bootstrap classes from Authentication * Removed bootstrap classes from Mascot * Removed bootstrap classes from Onboarding * Removed bootstrap classes from lock/unlock discussions * Notes design changes * Removed bootstrap classes from Organization * Removed bootstrap classes from Organization * Remove alert bootstrap class from admin.html.erb * Fixed tab_pane related code * Enable click listener on notice * Enable click listener on notice * Applied suggested changes * close bootstrap class removed * Removed element completely --- .../stylesheets/components/notices.scss | 13 ++++ .../admin/controllers/notice_controller.js | 12 ++++ .../_feedback_message.html.erb | 72 +++++++++++++++---- .../admin/feedback_messages/_style.html.erb | 6 ++ app/views/admin/podcasts/edit.html.erb | 2 +- .../settings/forms/_authentication.html.erb | 4 +- .../admin/settings/forms/_campaign.html.erb | 4 +- .../admin/settings/forms/_mascot.html.erb | 2 +- .../admin/settings/forms/_onboarding.html.erb | 4 +- .../admin/users/index/_organizations.html.erb | 4 +- .../articles/discussion_lock_confirm.html.erb | 8 ++- .../discussion_unlock_confirm.html.erb | 2 +- app/views/layouts/admin.html.erb | 9 ++- 13 files changed, 111 insertions(+), 31 deletions(-) create mode 100644 app/javascript/admin/controllers/notice_controller.js diff --git a/app/assets/stylesheets/components/notices.scss b/app/assets/stylesheets/components/notices.scss index 677475ea2..35140e814 100644 --- a/app/assets/stylesheets/components/notices.scss +++ b/app/assets/stylesheets/components/notices.scss @@ -21,4 +21,17 @@ &--info { background: rgba(var(--brand), 0.1); } + + &--close { + float: right; + font-size: var(--fs-2xl); + font-weight: var(--fw-bold); + line-height: 1; + color: var(--base); + text-shadow: 0 1px 0 var(--base-inverted); + opacity: var(--opacity-50); + padding: 0; + border: 0; + background-color: transparent; + } } diff --git a/app/javascript/admin/controllers/notice_controller.js b/app/javascript/admin/controllers/notice_controller.js new file mode 100644 index 000000000..237687b4a --- /dev/null +++ b/app/javascript/admin/controllers/notice_controller.js @@ -0,0 +1,12 @@ +import { Controller } from '@hotwired/stimulus'; + +export default class NoticeController extends Controller { + static targets = ['noticeZone']; + + closeNotice() { + document.getElementById('notice-container').addEventListener('click', (event) => { + event.preventDefault(); + document.getElementById('notice-container').remove(); + }) + } +} diff --git a/app/views/admin/feedback_messages/_feedback_message.html.erb b/app/views/admin/feedback_messages/_feedback_message.html.erb index 8f73bfb46..eb4a66c1f 100644 --- a/app/views/admin/feedback_messages/_feedback_message.html.erb +++ b/app/views/admin/feedback_messages/_feedback_message.html.erb @@ -105,19 +105,19 @@

Email Form:

-