From: Ambroise C Date: Fri, 3 Mar 2023 13:50:17 +0000 (+0100) Subject: SONAR-18600 Remove unused frontend deprecated functions X-Git-Tag: 10.0.0.68432~173 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1d1ea2ccf5f5066f13f864a5813a4de7d1b61dc3;p=sonarqube.git SONAR-18600 Remove unused frontend deprecated functions --- diff --git a/server/sonar-web/src/main/js/helpers/__tests__/pages-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/pages-test.ts index 67fab94e449..4d8a23d7a4e 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/pages-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/pages-test.ts @@ -18,10 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { - addNoFooterPageClass, addSideBarClass, addWhitePageClass, - removeNoFooterPageClass, removeSideBarClass, removeWhitePageClass, } from '../pages'; @@ -29,7 +27,6 @@ import { describe('class adders', () => { it.each([ [addSideBarClass, 'sidebar-page'], - [addNoFooterPageClass, 'no-footer-page'], [addWhitePageClass, 'white-page'], ])('%s should add the class', (fct, cls) => { const toggle = jest.spyOn(document.body.classList, 'toggle'); @@ -41,7 +38,6 @@ describe('class adders', () => { describe('class removers', () => { it.each([ [removeSideBarClass, 'sidebar-page'], - [removeNoFooterPageClass, 'no-footer-page'], [removeWhitePageClass, 'white-page'], ])('%s should add the class', (fct, cls) => { const toggle = jest.spyOn(document.body.classList, 'toggle'); diff --git a/server/sonar-web/src/main/js/helpers/pages.ts b/server/sonar-web/src/main/js/helpers/pages.ts index a4315742ea2..d179f32c812 100644 --- a/server/sonar-web/src/main/js/helpers/pages.ts +++ b/server/sonar-web/src/main/js/helpers/pages.ts @@ -19,7 +19,6 @@ */ const CLASS_SIDEBAR_PAGE = 'sidebar-page'; const CLASS_WHITE_PAGE = 'white-page'; -const CLASS_NO_FOOTER_PAGE = 'no-footer-page'; export function addSideBarClass() { toggleBodyClass(CLASS_SIDEBAR_PAGE, true); @@ -29,12 +28,6 @@ export function addWhitePageClass() { toggleBodyClass(CLASS_WHITE_PAGE, true); } -export function addNoFooterPageClass() { - /* eslint-disable-next-line no-console */ - console.warn('DEPRECATED: addNoFooterPageClass() was deprecated.'); - toggleBodyClass(CLASS_NO_FOOTER_PAGE, true); -} - export function removeSideBarClass() { toggleBodyClass(CLASS_SIDEBAR_PAGE, false); } @@ -43,12 +36,6 @@ export function removeWhitePageClass() { toggleBodyClass(CLASS_WHITE_PAGE, false); } -export function removeNoFooterPageClass() { - /* eslint-disable-next-line no-console */ - console.warn('DEPRECATED: removeNoFooterPageClass() was deprecated.'); - toggleBodyClass(CLASS_NO_FOOTER_PAGE, false); -} - function toggleBodyClass(className: string, force: boolean) { document.body.classList.toggle(className, force); if (document.documentElement) {