Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger onMount callbacks in same order as child components #2752

Conversation

colincasey
Copy link
Contributor

Fix for #2281. Reorders the render callbacks so that they still get called in the same order by the scheduler but child components are handled in the right order by using shift() instead of pop()

@Rich-Harris
Copy link
Member

Thank you! This would need a test before it can be merged, would you be able to add one? It'd be something similar to this, except with multiple components: https://github.com/sveltejs/svelte/tree/master/test/runtime/samples/lifecycle-render-order

skip_if_ssr: true,

test({ assert, component, target }) {
assert.deepEqual(order, [
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this the order you'd expect here @Rich-Harris?

…ings

* master: (66 commits)
  -> v3.4.3
  always add raw property to text nodes
  flesh out in/out transition tutorial chapter (sveltejs#2792)
  code style
  fix test
  fix tests
  Fix CRUD example to allow changing input values.
  Fixes sveltejs#2714
  treat requestAnimationFrame as a noop on the server
  site: actions tutorial: destroy is not required (sveltejs#2776)
  Allow binding of <details> open
  site: add /faq redirect to GitHub wiki FAQ
  fix case sensitive import name, improve tsconfig
  type declarations for bundled files
  convert everything to TypeScript
  check for unknown props when creating component
  cleanup, improve comments
  typecheck npm script
  workarond for estree-walker related typings conflict
  compile/render-dom and other remaining typings
  ...
…ings

* master: (35 commits)
  Fix overwrite of 'offset' value in reactive statement
  fix slide example
  typos
  update svelte-repl (fixes download button)
  update svelte-repl
  update svelte-repl version
  use better eliza package
  gitignore workers
  add compiler typings to list of published files
  improve typings for animate, easing, transition, motion and internal apis
  update bundler worker
  fix gitignore
  fix types for easing functions
  fix build order
  generate internal-exports file
  update gitignore
  update folder structure - sveltejs#2790
  bump estree-walker to fix some svelte.walk bugs
  bundle locally
  -> v3.4.4
  ...
@Rich-Harris Rich-Harris merged commit a9193fd into sveltejs:master Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants