Skip to content

[UI] Some navbar items are missing in moblie screen #5813

Open
@amitamrutiya

Description

@amitamrutiya

Description

Link: HomePage
I noticed that on the homepage when switching to mobile view, some navbar items are not appearing:

  • Pricing
  • News
  • Recent Announcement
  • Discussion Forum

These items are not displayed in mobile view, making it impossible to navigate to these pages via the navbar.

Expected Behavior

The displayed items are the same for both mobile and desktop views.

Screenshots

image

Environment:

  • Host OS: Linux
  • Browser: Firefox

If you find this issue valid I want to work on this.


Contributor Resources and Handbook

The layer5.io website uses Gatsby, React, and GitHub Pages. Site content is found under the master branch.

Join the Layer5 Community by submitting your community member form.

Activity

fakegithub01

fakegithub01 commented on Aug 15, 2024

@fakegithub01

@narasimha-1511 I would like to work on this issue .Could you please assign this issue to me ?

ashparshp

ashparshp commented on Aug 16, 2024

@ashparshp
Contributor

Thank you, @amitamrutiya and @fakegithub01. However, @upsaurav12 is already working on the navbar, so let's hear his thoughts on this.

upsaurav12

upsaurav12 commented on Aug 23, 2024

@upsaurav12

@ashparshp @amitamrutiya @fakegithub01 Sorry for late response,
Yes i also think that pricing discussion-forum news should be present in mobile-nav.
but if we notice then we can see that these are the special links ( ie these are represented with arrows-icon)
Screenshot from 2024-08-23 20-46-08
So, we should make these link similar with desktop-view.

amitamrutiya

amitamrutiya commented on Aug 23, 2024

@amitamrutiya
ContributorAuthor

Yeah @upsaurav12, you're right, these are special links. Do you have any other solutions you want to propose without converting them into normal links?

Jaishree2310

Jaishree2310 commented on Jan 8, 2025

@Jaishree2310
Contributor

@vishalvivekm Is this issue still pending or completed?
If it require to complete still then please assign this to me.
Thanks!

rohansen856

rohansen856 commented on Apr 22, 2025

@rohansen856
Contributor

@vishalvivekm @amitamrutiya I would like to work on this issue.
As the links are mentioned as special links they should be added to the mobile nav under the Solutions, Products, Community and Resources section in same manner as in the Desktop nav.
The special links are already present in the /src/sections/General/Navigation/utility/menu-items.js file in actionItems array.
The actionItems are not utilized in the src/sections/General/Navigation/index.js file which cause the links to be not present in the mobile view.

  • The current code of the mobile nav looks like this:
            <div className="mobile-dropdown-container" ref={dropDownRef}>
              <div className="mobile-dropdown">
                <ul className="mobile-collapsed">
                  {Data.menuItems.map((menu, index) => (
                    <li
                      key={index}
                      className={
                        menu.subItems !== undefined
                          ? "mobile-nav-item has-dropdown"
                          : "mobile-nav-item"
                      }
                    >
                      <Link
                        to={menu.path}
                        onClick={changeDropdownState}
                        className="menu-item"
                        activeClassName="nav-link-active"
                      >
                        {menu.name}
                      </Link>
                      <ul>
                        {menu.subItems !== undefined &&
                          menu.subItems.map((subItems, index) => {
                            return (
                              <li key={index} className="mobile-nav-subitem">
                                {subItems.externalLink ? (
                                  <a
                                    href={subItems.path}
                                    target="_blank"
                                    onClick={() => {
                                      changeDropdownState();
                                      closeDropDown();
                                    }}
                                    className="mobile-sub-menu-item"
                                    rel="noreferrer"
                                  >
                                    {subItems.name}
                                  </a>
                                ) : (
                                  <Link
                                    to={subItems.path}
                                    onClick={() => {
                                      changeDropdownState();
                                      closeDropDown();
                                    }}
                                    className="mobile-sub-menu-item"
                                    activeClassName="nav-link-active"
                                  >
                                    {subItems.name}
                                  </Link>
                                )}
                              </li>
                            );
                          })}
                      </ul>
                    </li>
                  ))}
                </ul>
                {!userData && (
                  <div>
                    <ul>
                      <li>
                        <Button
                          id="get-started"
                          $secondary
                          className="banner-btn two"
                          title="Get Started"
                          $url="https://cloud.layer5.io/login"
                          $external={true}
                        />
                      </li>
                    </ul>
                  </div>
                )}
                <div>
                  <ul>
                    <li className="mobile-nav-item">
                      {/* <a href="https://calendar.google.com/calendar/appointments/schedules/AcZssZ3pmcApaDP4xd8hvG5fy8ylxuFxD3akIRc5vpWJ60q-HemQi80SFFAVftbiIsq9pgiA2o8yvU56?gv=true" className="menu-item">Book Demo</a> */}
                      <a href="https://play.meshery.io" className="menu-item">
                        Playground
                      </a>
                    </li>
                  </ul>
                </div>
              </div>
            </div>
  • I plan on Adding the special links in each section like this (reference from src/sections/General/Navigation/utility/ScrollspyMenu.js file):
                 {manu.actionItems.map((actionItem, i) => (
                    (actionItem.actionName === "Join the discussion" ?
                      <a key={i} href={actionItem.actionLink} target="_blank" className="action-link" rel="noreferrer">
                        <span className="readmore-btn">
                          {actionItem.actionName} <IoIosArrowRoundForward />
                        </span>
                      </a>
                      : (<Link key={i} to={actionItem.actionLink} partiallyActive={true} className="action-link">
                        <span className="readmore-btn">
                          {actionItem.actionName} <IoIosArrowRoundForward />
                        </span>
                      </Link>
                      )
                    )
                  ))}

If it's open for contribution I would like to take up this issue. Thanks.

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

Metadata

Metadata

Assignees

Labels

kind/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @Jaishree2310@amitamrutiya@rohansen856@vishalvivekm@upsaurav12

    Issue actions

      [UI] Some navbar items are missing in moblie screen · Issue #5813 · layer5io/layer5