Comments (4)
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.
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.
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.
@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 defaultdiv
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)
- Closing issue when using powerselect inside a dialog HOT 3
- Docs for using Tailwind HOT 4
- Implement Disclosure component HOT 7
- Bump `@embroider/macros` HOT 5
- Feedback welcome
- Transitions are throwing errors in Fastboot
- Move menu focus trap to containing element
- Implement <ComboBox> component HOT 2
- Build is broken due to external dependency hell HOT 10
- release config broken: Could not infer "repo" from the "package.json" file. HOT 2
- Click on `dialog.Overlay` does not close the modal HOT 1
- TypeError: can't convert value to string
- BUG: click outside <Dialog /> should be allowed HOT 6
- `<Transition>` with `<Dialog>` breaks clicking the overlay to close HOT 3
- The active `Listbox` option doesn't scroll into view when using keyboard arrows
- `<Switch>` component should propagate `event` when toggling
- Support Ember v5 HOT 2
- Still active? HOT 4
- Combobox seems to emit invalid `onChange` events HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-headlessui.