From 2d1d15eb7db06a946d992d762434857ad5e911a7 Mon Sep 17 00:00:00 2001 From: Thrishank <86158204+thrishank@users.noreply.github.com> Date: Wed, 13 Mar 2024 21:06:06 +0530 Subject: [PATCH] Fix: Ensure Footer Visibility on Smaller Screens (#489) ### Summary #468 Issue This pull request addresses an issue where the footer was not rendering on smaller screens due to the d-none class. The visibility of the footer is crucial for providing a seamless user experience across different devices. ### Changes Made - Removed the d-none class from the div in the footer folder index file, enabling the footer to be visible on smaller screens. ### Why The d-none class was unintentionally hiding the footer on smaller screens, affecting the overall user experience. This change ensures consistent visibility across all screen sizes. The d-none class in Bootstrap is a utility class that sets an element to display: none! important;, effectively hiding it. ### ScreenShots **before** ![Screenshot 2024-02-25 163600](https://github.com/apertium/apertium-html-tools/assets/86158204/1d59046e-2041-436d-9986-f10baf35dce9) **After** ![Screenshot 2024-02-25 163441](https://github.com/apertium/apertium-html-tools/assets/86158204/e115ded4-47ce-428e-b7fc-702ad2125242) - Tested on various devices and screen sizes. - Ensured the removal of the d-none class did not introduce any unintended side effects. This PR is ready for review. Your feedback is appreciated! --- .../footer/__tests__/index.test.tsx | 2 +- src/components/footer/index.tsx | 62 ++++++++++--------- 2 files changed, 34 insertions(+), 30 deletions(-) diff --git a/src/components/footer/__tests__/index.test.tsx b/src/components/footer/__tests__/index.test.tsx index 10cb9fcdb..35ef28845 100644 --- a/src/components/footer/__tests__/index.test.tsx +++ b/src/components/footer/__tests__/index.test.tsx @@ -108,7 +108,7 @@ describe('Footer', () => { it('opens about dialog on desktop', () => { renderFooter(); - userEvent.click(screen.getAllByRole('button', { name: 'Help_Improve-Default' })[1]); + userEvent.click(screen.getAllByRole('button', { name: 'Help_Improve-Default' })[0]); expect(screen.getByRole('dialog').textContent).toMatchInlineSnapshot( `"About_Apertium-Default×CloseWhat_Is_Apertium-DefaultApertium-Default"`, diff --git a/src/components/footer/index.tsx b/src/components/footer/index.tsx index 5998f155c..41d0102f9 100644 --- a/src/components/footer/index.tsx +++ b/src/components/footer/index.tsx @@ -38,27 +38,37 @@ const FooterNav_ = ({ const { t } = useLocalization(); return ( -