Giter VIP home page Giter VIP logo

Comments (10)

waterplea avatar waterplea commented on June 15, 2024 1

Sure. We will fix this bug before moving to 4.0 and new controls. It's just a tip for those who need it now.

from taiga-ui.

Drogenix avatar Drogenix commented on June 15, 2024 1

@waterplea I can try to fix this one. Do we know any possible reasons of why this bug happens?

from taiga-ui.

waterplea avatar waterplea commented on June 15, 2024 1

@waterplea I can try to fix this one. Do we know any possible reasons of why this bug happens?

This is most likely a bug with Angular animations. You can try removing angular animation from radio and instead use CSS transform to scale it.

from taiga-ui.

waterplea avatar waterplea commented on June 15, 2024

As a workaround for now, you can start switching to the new radio component which is planned to replace current one:
https://taiga-ui.dev/experimental/radio

from taiga-ui.

EricPoul avatar EricPoul commented on June 15, 2024

But it's a workaround only for plain radio. Labeled radio and radio block still use non-experimental radion under the hood.

from taiga-ui.

Drogenix avatar Drogenix commented on June 15, 2024

You can try removing angular animation from radio and instead use CSS transform to scale it.

This is work. And i also found that tuiParentAnimation cause this bug. I don't know exactly why, for some reason it's just blocks child animation. I removed tuiScaleAnimation, CSS animation looks like this:

@keyframes scaleIn {
    0%{
        transform: scale(0);
    }
    100%{
        transform: scale(1);
    }
}
radio.mp4

from taiga-ui.

waterplea avatar waterplea commented on June 15, 2024

Parent animation is there to kick in :leave animations — it's a long standing Angular bug. What if you add the same line to kick in :enter animations in TUI_PARENT_ANIMATION? Would that fix the issue? Not that it's better than CSS solution, just want to fix tuiParentAnimation as well, if possible.

from taiga-ui.

Drogenix avatar Drogenix commented on June 15, 2024

Parent animation is there to kick in :leave animations — it's a long standing Angular bug. What if you add the same line to kick in :enter animations in TUI_PARENT_ANIMATION? Would that fix the issue? Not that it's better than CSS solution, just want to fix tuiParentAnimation as well, if possible.

Yeah, i know about this bug. I added this in TUI_PARENT_ANIMATION, but it has zero effect:

transition(`:enter`, [query(`* <=> *`, [animateChild()], {optional: true})]),

And also, what is the :scope selector? I see this for the first time

transition(`:leave`, [query(`:scope > *`, [animateChild()], {optional: true})]),

from taiga-ui.

waterplea avatar waterplea commented on June 15, 2024

Yeah, I meant to try that. Ok, if it doesn't work then let's leave it at that. :scope selector is kinda like this in CSS:
https://developer.mozilla.org/en-US/docs/Web/CSS/:scope

from taiga-ui.

waterplea avatar waterplea commented on June 15, 2024

As for the CSS animation — remove ngIf so this .t-mark is always there and just toggle some class like .t-mark_visible and use transition instead of animation. This way to would work both ways.

from taiga-ui.

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.