-
Notifications
You must be signed in to change notification settings - Fork 1
#227 -- Support Transition Directive on Components #230
base: main
Are you sure you want to change the base?
Conversation
…ning into lots of errors with importing a custom preprocessor into the svelt.config.js as well as getting things to play nicely with the svelte for vs code extension.
✅ Deploy Preview for unicorn-ui ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
… work for passing to the preprocessor group [] in svelte.config.js); made adjustments to the preprocessor currently in svelte.config.js.
the preprocessor concept seems to be working, removing the Transition compilation error (though there's still a type error for the return type of the transition function). also still getting this error when trying to import the transition preprocessor into svelte.config.js:
|
update: after looking more thoroughly at the svelte source code it looks like we could use their exported runtime transitions / animation functions (i.e. create_bidirectional_transition()) to create and add the animation to the stylesheet of the component. Latest push has a somewhat hardcoded example of doing this with route test (/test/+page.svelte) and it works! If this is a desirable route, then we'll need to of course handle all the edge cases, recursion, etc... |
… create_bidirectional_transition() in an onMount() -- right now it is working for the div in test +page.svelte but not for <Box>.
…of Box in test +page.svelte.
…lte internal import; updating TransitionPreprocessor class and tests.
…too existing onMount() or creating new one as well as adding a generic import for svelte/internal; added these to the setup in svelte.config.js for testing.
…, also added directly to svelte.config.js for testing with routes/test/+page.svelte -- now looks for ref and creates/binds if not found.
… components with transition directives.
…ach transition.
see #227 (comment)