CollActionteam / collaction_website

CollAction Website
https://www.collaction.org
GNU General Public License v3.0
5 stars 2 forks source link

Enhancing Mobile Responsiveness #69

Closed margaretmwaura closed 1 year ago

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
website ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 9, 2023 at 3:53PM (UTC)
CollActionOfficial commented 1 year ago
  1. pasting the same piece of code on 5 different places is code duplication, which should be prevented where possible. @Xazin Do you perhaps have a suggestion on how Margaret could fix this?
  2. Decreasing screen width now yields the image below instead of the burger in the top right corner
image
dastrong commented 1 year ago

Regarding the duplication mentioned above, just refactor to something like this:

// extract the close behavior into a separate function
const closeNavbar = () => setNavbar(false);

// remove the legacyBehavior prop & add the event handlers to the Next link
<NextLink
  href="..."
  className="..."
  onClick={closeNavbar}
  onKeyPress={closeNavbar}
>
  {t('app:navbar.projects')}
</NextLink>

Other tasks:

CollActionOfficial commented 1 year ago

@margaretmwaura How's it going?

margaretmwaura commented 1 year ago

@margaretmwaura How's it going?

Will give an update to this by EOD

margaretmwaura commented 1 year ago

Regarding the duplication mentioned above, just refactor to something like this:

// extract the close behavior into a separate function
const closeNavbar = () => setNavbar(false);

// remove the legacyBehavior prop & add the event handlers to the Next link
<NextLink
  href="..."
  className="..."
  onClick={closeNavbar}
  onKeyPress={closeNavbar}
>
  {t('app:navbar.projects')}
</NextLink>

Other tasks:

  • add a transparent border on the open/close button to stop the layout shift it gets when focused
  • the (a & button) elements in the mobile menu need to be styled for mobile as well

Hi @dastrong , this has helped, thank you, you can review again

margaretmwaura commented 1 year ago
  1. pasting the same piece of code on 5 different places is code duplication, which should be prevented where possible. @Xazin Do you perhaps have a suggestion on how Margaret could fix this?
  2. Decreasing screen width now yields the image below instead of the burger in the top right corner
image

This has been resolved, kindly review again

tomsiebring commented 1 year ago

Looks good to me! what do you think @dastrong ?

CollActionOfficial commented 1 year ago

@dastrong

dastrong commented 1 year ago

@dastrong

Yup, LGTM.