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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: FluentProfileMenu child content not displaying when clicked #1850

Closed
martingagne opened this issue Apr 13, 2024 · 5 comments
Closed

fix: FluentProfileMenu child content not displaying when clicked #1850

martingagne opened this issue Apr 13, 2024 · 5 comments
Labels
triage New issue. Needs to be looked at

Comments

@martingagne
Copy link

馃悰 Bug Report

The FluentProfileMenu component in the Fluent UI Blazor library is not displaying the child content when clicked.

馃捇 Repro or Code Sample

The code can be found in the following GitHub repository: https://github.com/martingagne/fluentblazor-profilemenu

馃 Expected Behavior

When the FluentProfileMenu is clicked, the child content, which includes the user's name and email, should be displayed.

馃槸 Current Behavior

The FluentProfileMenu is visible in the UI, but when clicked, the child content does not show.

image

馃實 Your Environment

OS & Device: Windows 11 on PC
Browser: Firefox, Edge
.NET and Fluent UI Blazor library Version: .NET 8 and Fluent UI Blazor 4.6.1

@microsoft-github-policy-service microsoft-github-policy-service bot added the triage New issue. Needs to be looked at label Apr 13, 2024
@vnbaaij
Copy link
Collaborator

vnbaaij commented Apr 13, 2024

I don't have time to look at this now.

In the mean time you can compare with the code in de demo site (which is working) which is here in the repo in the examples folder.

@martingagne
Copy link
Author

Thank you, Vincent (@vnbaaij)! I'm quite new to Blazor and even newer to Fluent UI. I've dedicated a couple hours to this issue and I'm still not making progress. I've double-checked the Fluent UI setup, so maybe it's something else I鈥檓 not seeing. I'll take a little break and revisit it with fresh eyes -- perhaps I'll spot something I missed. There鈥檚 no rush on this. Whenever you're able to take a look and share any advice, I would greatly appreciate it. Enjoy your weekend!

@vnbaaij
Copy link
Collaborator

vnbaaij commented Apr 13, 2024

Found it. You created the site with all the default settings. So with .NET 8 you then get SSR as the standard render mode.... For the ProfileMenu to work, you need interactivity.
(on purpose not spelling out what you need to do to fix it so you can keep learning stuff 馃槈. Enjoy your weekend too!)

@vnbaaij vnbaaij closed this as completed Apr 13, 2024
@gryzorr
Copy link

gryzorr commented May 1, 2024

"On purpose not spelling out what you need to do to fix it so you can keep learning stuff"
I'm a beginer in Balzor and Fluent UI so sorry for my questions.
I spent some hours to understand that and It seams that Fluent UI controls can only work in full serverside or clientside rendering mode. Isn't it?
I have also generated app using Your Template but with per Page/Component rendering mode and indeed when FluentProfileMenu is placed in Layout it doesn't work (on Page it works). Unfortunately, it is not enough to add @renderingmode to component itself (beginner's solution).
I have switched to full serverside rendering and now it works but I have strange behavior.
Each time I'm opening menu, page's content is resizing because scrollbars are showing for a moment.
On attached video it blinks only once but it's not true. It blinks every time.
https://github.com/microsoft/fluentui-blazor/assets/77838774/0f8ac5a7-c2d8-4bf8-9efe-4ad7d3eb80e2
By the way. Your Example page is great but too hard to understand at the moment :-).
I will try to use some techniques that You use there in my project.

@vnbaaij
Copy link
Collaborator

vnbaaij commented May 2, 2024

I spent some hours to understand that and It seams that Fluent UI controls can only work in full serverside or clientside rendering mode. Isn't it?
Most of them render fine in SSR mode but need indeed interactivity to be fully functional. Take for example the DataGrid in our templates on the Weather page. It displays the weather data fine, but you can't sort by clicking on the headers as that code cannot be run without interactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage New issue. Needs to be looked at
Projects
None yet
Development

No branches or pull requests

3 participants