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

Missing component: Tooltip #12

Open
esso23 opened this issue Apr 6, 2020 · 5 comments
Open

Missing component: Tooltip #12

esso23 opened this issue Apr 6, 2020 · 5 comments

Comments

@esso23
Copy link
Contributor

esso23 commented Apr 6, 2020

Can't find the Tooltip component. I wanna make sure it's not just me being unable to find it. If it's not the case I would try implementing it.

@skclusive
Copy link
Owner

great. it is not yet available. please go ahead and implement.

currently components support title attribute which can be used to get native Tooltip.

we would need to implement the way implemented in material-ui https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/Tooltip/Tooltip.js

I guess the Tooltip component depends on one more important component https://github.com/mui-org/material-ui/tree/master/packages/material-ui/src/Popper. so we would need to implement this also.

And finally we would like to create demos and documentation as here.

https://material-ui.com/components/tooltips/

I am glad that you are interest to contribute. thanks. please proceed.

@skclusive skclusive mentioned this issue Apr 9, 2020
@esso23
Copy link
Contributor Author

esso23 commented May 27, 2020

@skclusive Hi, I'm currently working on this, but I have a problem. I'm not a JSInterop guru and I can't figure out how you include JS files without manually including them in _Host.cshtml.
I currently have some JS bundled with popper.js source using rollup as it's done in Script project, but I don't know how to send that script to the client.

Any advice would be appreciated
Thanks

@skclusive
Copy link
Owner

skclusive commented May 28, 2020

@esso23 great. you can bundle popper.js and custom scripts and componentize the script content as component.

ex:

https://github.com/skclusive/Skclusive.Material.Component/blob/master/Script/src/ScriptHelpers/ScriptHelpersScript.cs

TooltipHelpersScript.cs

public class TooltipHelpersScript : Scripted
{
      public TooltipHelpersScript(): base("TooltipHelpersScript")
      {
      }

      protected override string GetScript()
      {
          return
            @"!function(){console.log('popper.js and custom introp minified bundled code')}();";
      }
}

then we could all the Tooltip related script component here.

https://github.com/skclusive/Skclusive.Material.Component/blob/master/Material/src/MaterialScripts.razor

MaterialScripts.razor

<ScriptHelpersScript />
<DomHelpersScript />
<TooltipHelpersScript />

this way it would be included by default. for standalone installation, we could document the 'TooltipHelpersScript' import.

let me know, if you require more details. excited and looking forward.

@esso23
Copy link
Contributor Author

esso23 commented May 28, 2020

Do you have some build tool to copy the script to the .cs file?

@skclusive
Copy link
Owner

no. that would be good. but i used to manually copy.

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