Megabit / Blazorise

Blazorise is a component library built on top of Blazor with support for CSS frameworks like Bootstrap, Tailwind, Bulma, AntDesign, and Material.
https://blazorise.com/
Other
3.29k stars 533 forks source link

What is Blazorise.Title used for? #1399

Closed Jinjinov closed 3 years ago

Jinjinov commented 4 years ago

Blazorise.Title is in conflict with the new .NET 5 Microsoft.AspNetCore.Components.Web.Extensions.Head.Title

I am just curious what is Blazorise.Title used for?

stsrki commented 4 years ago

Good catch. I had to look it up 😅

It seems it should be used as a component for headings <h1> - <h6>. But it seems it's a duplicate of an existing <Heading> component so <Title> should probably be removed.

Jinjinov commented 4 years ago

Thanks :)

Blazorise.Link is also in conflict with Microsoft.AspNetCore.Components.Web.Extensions.Head.Link

But I guess it is too late to change Blazorise.Link to something else :)

stsrki commented 4 years ago

Yeah, Linkshould stay like it is. It is, and will be used more than Microsoft.AspNetCore.Components.Web.Extensions.Head.Link which can only be used only in the head section of an _Host.cshtml and in that case just write a full path. It's a lot easier :)

Jinjinov commented 4 years ago

Microsoft.AspNetCore.Components.Web.Extensions.Head can be used in Index.razor and in any child component - I am using it successfully in a Blazor WASM project to change Bootswatch https://bootswatch.com/ themes:

<Link rel="stylesheet" href="@("https://stackpath.bootstrapcdn.com/bootswatch/4.5.2/" + bootswatchTheme + "/bootstrap.min.css")" />

I don't think it is meant to be used only in Pages/_Host.cshtml or wwwroot/index.html - see https://docs.microsoft.com/en-us/aspnet/core/blazor/fundamentals/additional-scenarios?view=aspnetcore-5.0#influence-html-head-tag-elements - of course I could be wrong :)

But I agree that Blazorise.Link will be used more :)

stsrki commented 4 years ago

It's stated in their documentation

When rendered, the Title, Link, and Meta components add or update data in the HTML <head> tag elements:

I haven't tried the new Link component but as far as I know, it's used for stuff like <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.12.0/css/all.css">.

jasonhill commented 3 years ago

Are there any plans to remove Blazorise.Title to avoid this conflict with the Head component?