Coder Social home page Coder Social logo

Easier usage of tooltip about spartan HOT 7 CLOSED

alexciesielski avatar alexciesielski commented on August 16, 2024 3
Easier usage of tooltip

from spartan.

Comments (7)

alexciesielski avatar alexciesielski commented on August 16, 2024 1

Yes, that is what I'm suggesting.

Keep the existing functionality but add a way to simply pass in a string and call it a day (like matTooltip does it)

from spartan.

goetzrobin avatar goetzrobin commented on August 16, 2024 1

We are taking this approach to mimic the RadixUI behavior. Personally, I also prefer it because it let's me avoid having an ng-template with a ref to it, which I pass to the tooltip. I am open to supporting both, but want to keep the hlm-tooltip for now to stay consistent with this approach we used in other components.

from spartan.

goetzrobin avatar goetzrobin commented on August 16, 2024

@alexciesielski maybe we can support both? I'd like to keep the template way to support something like adding a button. But I also see that it's a lot easier to simply pass in a string and call it a day

from spartan.

alexciesielski avatar alexciesielski commented on August 16, 2024

So can I go ahead with this? Or will it end up like the table PR? 😅

from spartan.

goetzrobin avatar goetzrobin commented on August 16, 2024

No you can go ahead and add this. Still owe you a review/decision with that. Haven't had much toke to spend on spartan lately, unfortunately.

from spartan.

alexciesielski avatar alexciesielski commented on August 16, 2024

Would you have anything against renaming hlmTooltipTrigger to just hlmTooltip? Similar to matTooltip?
It looks weird to me to pass a string to the trigger, and it would be aligned with how Material does it, too.

image

from spartan.

alexciesielski avatar alexciesielski commented on August 16, 2024

Also I'm not sure if we even need to wrap the whole thing inside a hlm-tooltip component for when using a TemplateRef? It should be possible to just pass it into the directive and have it handle everything? Or is there something I am missing for what the wrapping component does?

My proposal would be to just have a single brn/hlmTooltip directive, that takes both a string and a TemplateRef and renders them, without having to wrap the whole thing in another hlm-tooltip component.

from spartan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.