docbrown/app/javascript/packs/base.js
Nick Taylor 86eb75cee7
Report a Message in Connect (#12229)
* Frontend Ready for Connect Report Abuse

* add feedback api

* js defination fix

* Added Hooks to the Component

* add json response in feedback

* Block popup added

* fix render issue

* Made changes in internal view

* change error message

* Added few design changes =

* add test cases

* Update app/javascript/chat/actions/requestActions.js

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

* add PR suggestions

* add backend test cases

* report abuse form close

* Update app/javascript/chat/actions/requestActions.js

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

* Update app/javascript/chat/ReportAbuse/index.jsx

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

* add test cases

* Update app/javascript/chat/ReportAbuse/index.jsx

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

* Update app/javascript/chat/ReportAbuse/index.jsx

Co-authored-by: Marcy Sutton <holla@marcysutton.com>

* Update app/javascript/chat/ReportAbuse/index.jsx

Co-authored-by: Marcy Sutton <holla@marcysutton.com>

* group the fieldset

* fix report abuse api

* fix test case

* fix request test case

* fix typo

* cleaned up markup in report abuse component.

* Fixed spacing between abuse options.

* Fixed wording in report abuse confirmation.

* Removed unnecessary data-testid and aria-label attributes.

* Added some top margin to the report abuse form.

* Update app/javascript/chat/message.jsx

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

* Added a legend to the the fieldset.

* Update app/javascript/chat/actions/requestActions.js

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

Co-authored-by: Sarthak <7lovesharma7@gmail.com>
Co-authored-by: Narender Singh <narender2031@gmail.com>
Co-authored-by: Marcy Sutton <holla@marcysutton.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Michael Kohl <citizen428@dev.to>
2021-01-19 12:07:47 -05:00

30 lines
986 B
JavaScript

import {
initializeMobileMenu,
setCurrentPageIconLink,
getInstantClick,
} from '../topNavigation/utilities';
function getPageEntries() {
return Object.entries({
'notifications-index': document.getElementById('notifications-link'),
'chat_channels-index': document.getElementById('connect-link'),
'moderations-index': document.getElementById('moderation-link'),
'stories-search': document.getElementById('search-link'),
});
}
const menus = [...document.getElementsByClassName('js-hamburger-trigger')];
const moreMenus = [...document.getElementsByClassName('js-nav-more-trigger')];
getInstantClick().then((spa) => {
spa.on('change', () => {
const { currentPage } = document.getElementById('page-content').dataset;
setCurrentPageIconLink(currentPage, getPageEntries());
});
});
const { currentPage } = document.getElementById('page-content').dataset;
setCurrentPageIconLink(currentPage, getPageEntries());
initializeMobileMenu(menus, moreMenus);