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

setting PopupRenderPosition seems to have no effect? #632

Open
fluffynuts opened this issue Jan 17, 2023 · 6 comments
Open

setting PopupRenderPosition seems to have no effect? #632

fluffynuts opened this issue Jan 17, 2023 · 6 comments

Comments

@fluffynuts
Copy link

Since the popup is obscuring some of the navigation I have on my site, I do:

services.AddMiniProfiler(opts =>
{
	opts.PopupRenderPosition = RenderPosition.BottomRight;
});

but the popup still renders top-right. Indeed, if I set to RenderPosition.Left or RenderPosition.BottomLeft neither of these is observed either. Is there something I'm missing here?

@rumplin
Copy link

rumplin commented Feb 8, 2023

By the looks it seems you are using the ASP.NET Core version https://miniprofiler.com/dotnet/AspDotNetCore
PopupRenderPosition property is used by ASP.NET https://miniprofiler.com/dotnet/AspDotNet

Check the bottom of the ASP.NET Core page, there is well documented how to place the tags to _Layout.cshtml document.

@fluffynuts
Copy link
Author

fluffynuts commented Feb 9, 2023

then I'd suggest that the dotnet / netstandard version of the library shouldn't have this property available, if it can't be applied? eg something like

public class MiniProfilerOptions
{
  #if !NETSTANDARD
    public RenderPosition PopupRenderPosition { get; set; }
  #endif
}

because otherwise you're going to get a bunch of stupid questions like mine, surely?

Also, I specifically skipped out on the attributes because I was hoping for a central source of truth - I have areas in this app, so I have multiple _Layout.cshtml files

(thanks for getting back to me on this though)

@NickCraver
Copy link
Member

@fluffynuts I just tried this in the samples and cannot repro (e.g. the setting works) - are you sure it's not set specifically on the tag helper in the page or something overriding it?

@fluffynuts
Copy link
Author

hm, having a quick look (vscode, not my main machine) I see a lot of <mini-profiler position="RenderPosition.Right" so I'll have to double-check tomorrow (ie, remove that attrib) because i have to believe in your testing (: Thanks for the tip (:

@NickCraver
Copy link
Member

Welcome! If that doesn't help let's dig deeper :)

@fluffynuts
Copy link
Author

Ok, so I've looked into this again, and even if I take out all the attributes where I set position, and set position as anything other than RenderPosition.Right, I still get the overlay at the top right. I've tried RenderPosition.Left at setup time, as well as attempting to force it in the actual view, but the results still come out on the top-right, with the class name mp-right applied. I'm not sure what else to try? I have a feeling those last position attributes were from me fiddling the same some time last year and giving up - this project has been through an upgrade from asp.net mvc4 to asp.net core 7.0, so I had far more pressing concerns 😅

This is what I get, btw:
image

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

No branches or pull requests

3 participants