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

Sidebar is hidden by default and nav items are not visible #751

Closed
Geetha-Ravindran opened this issue Jun 12, 2024 · 14 comments
Closed

Sidebar is hidden by default and nav items are not visible #751

Geetha-Ravindran opened this issue Jun 12, 2024 · 14 comments

Comments

@Geetha-Ravindran
Copy link

When application is displayed in full screen, the sidebar is not visible. So the nav items are hidden too. We have to minimise the application to see the hamburger menu and then click on it to see all the nav items. Any way to keep the hamburger menu visible always?

@gvreddy04
Copy link
Contributor

@Geetha-Ravindran Thank you for using BlazorBootstrap. Please share a screenshot for better understanding your issue.

Versions (please complete the following information):

  • .NET Version: [e.g. .NET 6, .NET 7, .NET 8]
  • BlazorBootstrap: [e.g. 2.0.0, 2.1.0, 2.2.0]
  • Blazor WebAssembly / Server: [e.g. WebAssembly, Server]
  • Blazor Interactive Render Mode: [e.g. Auto, Server, WebAssembly, None]
  • Blazor Interactivity Location: [e.g. Global, Per page/component]

Sample code
Sample code to reproduce the issue.

@Cjoshua2
Copy link

Cjoshua2 commented Jul 18, 2024

@gvreddy04 I am also experiencing this issue.

.NET Version : 8
BlazorBootstrap: 2.2.0
Blazor WASM
Render mode : WebAssembly/None
Interactivity location : Global.

Result :
image

Expected result :
image

@gvreddy04
Copy link
Contributor

gvreddy04 commented Jul 19, 2024

@Cjoshua2 @Geetha-Ravindran Please share a screen recording for better understanding of the issue.

Also share the following details:

Browser:
Browser version:
Laptop/Desktop screen display size:

@sys-bh
Copy link

sys-bh commented Aug 20, 2024

I have the same experience, the menu does not render unless you shrink the browser down, open the hamburger. I've taken the out of the box Blazor Server App template and replaced the NavMenu with the Sidebar2 example code from here to reproduce the problem: https://demos.blazorbootstrap.com/sidebar2

.NET Version: .NET 8
BlazorBootstrap: v3.0.0-preview.3
Blazor WebAssembly / Server: Server
Blazor Interactive Render Mode: Server
Blazor Interactivity Location: Per page/component]
Browser: Chrome
Browser version: Version 127.0.6533.120 (Official Build) (64-bit)
Laptop/Desktop screen display size: Desktop - all screen sizes when hamberger is not visible

@gvreddy04
Copy link
Contributor

@Geetha-Ravindran @sys-bh @Cjoshua2 Thank you for using BlazorBootstrap. We will prioritize this issue and include it in the 3.0.0 release.

@gvreddy04
Copy link
Contributor

@Geetha-Ravindran @sys-bh @Cjoshua2 Can you attach a screen recording of the issue?

@gvreddy04 gvreddy04 self-assigned this Aug 20, 2024
@gvreddy04 gvreddy04 added this to the 3.0.0 milestone Aug 20, 2024
@sys-bh
Copy link

sys-bh commented Aug 20, 2024 via email

@gvreddy04
Copy link
Contributor

@sys-bh This is very helpful. Thanks for your time.

@gvreddy04
Copy link
Contributor

@sys-bh Please try the following sample code and let me know.

Before:

image

After:

MainLayout.razor

@inherits LayoutComponentBase
<div class="bb-page">

    <LeftMenu @rendermode="InteractiveServer" />

    <main>
        <div class="bb-top-row px-4 d-flex justify-content-end">
            <a href="https://docs.microsoft.com/aspnet/" target="_blank">About</a>
        </div>

        <article class="content px-4">
            <div class="py-2">@Body</div>
        </article>
    </main>

</div>

<div id="blazor-error-ui">
    An unhandled error has occurred.
    <a href="" class="reload">Reload</a>
    <a class="dismiss">🗙</a>
</div>

Screenshot

image

@sys-bh
Copy link

sys-bh commented Aug 21, 2024

I get the same problem. Menu does not show initially but does after I shrink the browser, click the hamberger

image

My left menu:
@Inject NavigationManager NavigationManager

<Sidebar2 Href="/"
@ref="menu"
IconName="IconName.RocketTakeOff"
Title="FundSys"
BadgeText="v6.0"
DataProvider="Sidebar2DataProvider"
Width="250" />

@gvreddy04
Copy link
Contributor

@sys-bh Please share a GitHub repo to reproduce the issue with minimal code. I'll investigate.

@sys-bh
Copy link

sys-bh commented Aug 22, 2024

The bug is related to misplacing the css links in files in App.razor. To reproduce the behaviror move the Blazor generated styles.css above the bootstrap and blazor bootstrap css links.

**<link rel="stylesheet" href="BlazorApp1.styles.css" />**
    
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css" rel="stylesheet" />
<link href="_content/Blazor.Bootstrap/blazor.bootstrap.css" rel="stylesheet" />

<link rel="stylesheet" href="bootstrap/bootstrap.min.css" />
<link rel="stylesheet" href="app.css" />
<link rel="icon" type="image/png" href="favicon.png" />
<HeadOutlet />

image

@sys-bh
Copy link

sys-bh commented Aug 22, 2024

@gvreddy04, thanks for your time helping to uncover the problem. Once I built out a minimal code sample, rulling out browser & version issues I compared the placement of resources in the sample to my app and uncovered the problem as described above.

@gvreddy04
Copy link
Contributor

@sys-bh Please let me know if you have any other questions or need further assistance. I'll close this bug now.

@gvreddy04 gvreddy04 removed this from the 3.0.0 milestone Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants