Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance: Update font size and height of drop down for mobile view #35

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Tanuj1718
Copy link

@Tanuj1718 Tanuj1718 commented Dec 7, 2024

fixes: #34
fixes #27

Description

  1. Improve font size of navbar items for mobile view
  2. Adjust the height of container which was overlapping with navbar items
UIupdate.mp4

Copy link

netlify bot commented Dec 7, 2024

Deploy Preview for landing-ohc ready!

Name Link
🔨 Latest commit d53707b
🔍 Latest deploy log https://app.netlify.com/sites/landing-ohc/deploys/676afc951292100008ecee54
😎 Deploy Preview https://deploy-preview-35--landing-ohc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

components/header.tsx Outdated Show resolved Hide resolved
package-lock.json Outdated Show resolved Hide resolved
@Tanuj1718
Copy link
Author

@rithviknishad I have changed the files as you instructed. Can you please check it or is anything I'm missing?

Copy link
Member

@shivankacker shivankacker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Please reduce the distance between text

@Tanuj1718
Copy link
Author

@shivankacker Is it fine or do I need to adjust more?

Screenshot 2024-12-13 at 10 13 22 PM

@shivankacker
Copy link
Member

@Tanuj1718 a little more would be good. Also we are adding "Timeline" to the header, so make sure it has enough space to accommodate for that too

@Tanuj1718
Copy link
Author

@shivankacker Done as you instructed. Also there is enough space for 'Timeline' tab in both mobile and web view.

Screenshot 2024-12-17 at 8 49 10 PM

@shivankacker
Copy link
Member

@Tanuj1718 lgtm, can you also fix the following bug with the PR:

clicking on an item on the menu is taking you to the corresponding page correctly, but should also close the menu.

@Tanuj1718
Copy link
Author

@Tanuj1718 lgtm, can you also fix the following bug with the PR:

clicking on an item on the menu is taking you to the corresponding page correctly, but should also close the menu.

Done @shivankacker

Copy link
Member

@shivankacker shivankacker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screen.Recording.2024-12-19.at.3.32.00.AM.mov

@Tanuj1718 doesn't seem to be fixed...

@Tanuj1718
Copy link
Author

Tanuj1718 commented Dec 19, 2024

Screen.Recording.2024-12-19.at.3.32.00.AM.mov
@Tanuj1718 doesn't seem to be fixed...

I have done it for supporters and contact tab. Is it not good for products and community tab? Because on hovering it , there is a dropdown menu appears and on clicking one of the options in drop down menu, the menu is getting closed.

Screen.Recording.2024-12-19.at.10.30.59.AM.mov

For PRODUCTS & COMMUNITY tab, menu is getting closed already.

Record_2024-12-19-10-49-01.mp4

@shivankacker
Copy link
Member

@Tanuj1718 working for other options, but clicking on products > CARE does not close the menu. (Sometimes Next js will do a direct page change, where it seems to work, but when it changes the page dynamically, it doesnt. Keep clicking on navbar links to replicate)

@Tanuj1718
Copy link
Author

@Tanuj1718 working for other options, but clicking on products > CARE does not close the menu. (Sometimes Next js will do a direct page change, where it seems to work, but when it changes the page dynamically, it doesnt. Keep clicking on navbar links to replicate)

Done. Please let me know whether it is fine or not.

Screen.Recording.2024-12-19.at.8.50.27.PM.mov

Copy link
Member

@shivankacker shivankacker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tanuj1718 everything works well on mobile, but there are bugs on desktop now

@@ -82,7 +82,7 @@ export default function Header(props: { fixed?: boolean }) {
const navigation: NavigationItem[] = [
{ type: "dropdown", content: "Products", items: productsItems },
{ type: "dropdown", content: "Community", items: communityItems },
{ type: "link", content: "Supporters", href: "/supporters" },
{ type: "section", content: "Supporters", id: "supporters", page: "/supporters" },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change? 🤔

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change? 🤔

Because I want to use the section properties defined in 'switch' statements. Otherwise I have to write those properties in 'link' case.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tanuj1718 a link must be used for links, you should find a way around this without disturbing existing elements

@@ -159,6 +163,7 @@ export default function Header(props: { fixed?: boolean }) {
href={item.page + "#" + item.id}
className={className}
onClick={(e) => {
setMobileMenuOpen(false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should come below the prevent default and stop propagation

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}}
/>
))}
<div className={`${mobileMenuOpen ? "h-12" : "flex flex-row" }`}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes here are possibly causing desktop dropdown to break

Screen.Recording.2024-12-19.at.10.15.00.PM.mov

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes here are possibly causing desktop dropdown to break

Screen.Recording.2024-12-19.at.10.15.00.PM.mov

Yes, you are right. Thank you for pointing out.

Copy link
Member

@shivankacker shivankacker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

  • Did you increase the distance between titles? This seems to be more than it was before 🤔

Rest of the functionality looks good, but some code changes are required

@@ -82,7 +82,7 @@ export default function Header(props: { fixed?: boolean }) {
const navigation: NavigationItem[] = [
{ type: "dropdown", content: "Products", items: productsItems },
{ type: "dropdown", content: "Community", items: communityItems },
{ type: "link", content: "Supporters", href: "/supporters" },
{ type: "section", content: "Supporters", id: "supporters", page: "/supporters" },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tanuj1718 a link must be used for links, you should find a way around this without disturbing existing elements

@@ -159,6 +163,7 @@ export default function Header(props: { fixed?: boolean }) {
href={item.page + "#" + item.id}
className={className}
onClick={(e) => {
setMobileMenuOpen(false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tanuj1718
Copy link
Author

Tanuj1718 commented Dec 24, 2024

image

  • Did you increase the distance between titles? This seems to be more than it was before 🤔

Rest of the functionality looks good, but some code changes are required

Updated the code. Replaced the section with links for 'Supporters' item.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement: Large font size in Mobile View Sidebar Fails to Close on Item Selection in Mobile Version
3 participants