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

[ENH] - MarkupString doesn't work in Labels HelpText #4200

Closed
vnetonline opened this issue Apr 29, 2024 · 2 comments
Closed

[ENH] - MarkupString doesn't work in Labels HelpText #4200

vnetonline opened this issue Apr 29, 2024 · 2 comments

Comments

@vnetonline
Copy link
Contributor

vnetonline commented Apr 29, 2024

Oqtane Info

Version - 5.1.1
Render Mode - Static
Interactivity - Server
Database - SQL Server

Describe the bug

  • MarkupString doesn't work in Labels HelpText

<Label Class="col-sm-3" For="name" HelpText="Enter a <b>name</b> of the Entity" ResourceKey="Name">Name: </Label>

Expected Behavior

  • Label's HelpText should have the ability to have MarkupString

Steps To Reproduce

  • Try the above code

Anything else?

  • Should we use Bootstrap ToolTip.
@sbwalker
Copy link
Member

@vnetonline we could certainly enhance the Label component to allow HTML in the tooltips.

The reason why the Bootstrap Tooltip was not used is because in Bootstrap, tooltips are opt-in for performance reasons and rely on JavaScript. This means that anywhere where Bootstrap tooltips are used you need to execute JavaScript code to enable the tooltips. Since Oqtane is based on Blazor, the goal was to minimize the usage of JavaScript as much as possible. In addition, developers may want to use a different CSS framework than Bootstrap on their own custom pages. So a pure CSS option was included instead for tooltips which is not dependent on Bootstrap or JavaScript.

@sbwalker
Copy link
Member

Supporting HTML tags within the tooltip content seems much more complicated than expected:

https://blog.logrocket.com/creating-beautiful-tooltips-with-only-css/

I am not interested in taking on a JavaScript dependency just to support HTML in tooltips so unless a simple solution can be found I would be inclined to close this enhancement as "not supported"

@sbwalker sbwalker changed the title [BUG] - MarkupString doesn't work in Labels HelpText [ENH] - MarkupString doesn't work in Labels HelpText May 7, 2024
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

2 participants