Coder Social home page Coder Social logo

Comments (4)

roomman avatar roomman commented on May 25, 2024 1

I raised a similar point in this PR with code examples of how the Ember invocation differs the official docs: #129 (comment)

I feel like someone needs to decide if we are mirroring the official implementation or not. 🧐

from ember-headlessui.

far-fetched avatar far-fetched commented on May 25, 2024

hey 👋
You can pass tagName argument to override the default div element:
https://github.com/GavinJoyce/ember-headlessui/blob/master/ember-headlessui/addon/components/transition.js#L39-L41

from ember-headlessui.

NullVoxPopuli avatar NullVoxPopuli commented on May 25, 2024

I think we should mirror the output and behavior, but not necessarily the implementation. There are a ton of anti patterns in the react implementation, for example.

That said, we don't need a div in a component, but then what do you animate?
Animations in ember are what you'd find on MDN, which need an element to animate.

The implementation i think would be best would be for Transition to yield a modifier that you can then place on the element you want to animate. That way it's clear what is being animated.

from ember-headlessui.

barryofguilder avatar barryofguilder commented on May 25, 2024

@NullVoxPopuli oh, I like the idea of it yielding a modifier! I'm not exactly sure how the React implementation works when it doesn't render an element. I'm assuming that it applies the transitions to the child element.

hey 👋 You can pass tagName argument to override the default div element: https://github.com/GavinJoyce/ember-headlessui/blob/master/ember-headlessui/addon/components/transition.js#L39-L41

Yeah, but that doesn't work if you try to pass something like an empty string to mimic the React Fragment (which doesn't render an element).

from ember-headlessui.

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.