* don't shift on normal props updates
would remove focus from elements and fire other
dom mutation events we don't need or want
* rename mode -> creation_mode
it's not updated when the component finishes hydration
* rename node_ref to internal_ref for consistency
* fix the bug, should return internal_ref as node_ref gets unset during reconciliation
* also no need to shift during hydration props update
* debug: encode hydration invariant
* fix: next_sibling of descendents not updated
* add test case for regression
* address review and add one more test
* partially undo #2673
VList again has a DerefMut implementation
the internal fully_keyed state now has an "indeterminate" variant
instead of being a bool, this recomputes it during reconciliation
* add Copy impl to FullyKeyedState
* Delay props.
* Fix next sibling change not synced.
* Use shifting instead.
* Update docs, minor adjustments.
* More predictable props update.
* Delay longer.
* Only delay props during hydration.
this should avoid having to manually call recheck_fully_keyed
* add mutable accessor to children
* fix workflow
* fix markdown example
* remove recheck_fully_keyed
* rework a bunch of feature flags to be more principled
* fixup of Collectable
* silence clippy
* unfix Mountable trait
leads to bundle size increase, so stick to the optimized version
* use required-features for function_router
* use --all-features in various places
* disable tokio dependency on wasm tests again
* add some #[inline] annotations
* merge one more feature annotations
* fixup: remove a line connected to trace_hydration
* RenderFn can be be directly Fn() now.
* Switch switch to function component.
* Make Link a function component.
* Remove non-exhaustive.
* Add migration guide.
* Update Website Docs.
* Fix CI.
* Pushing to Navigator no longer requires an owned instance.
* Fix CI.
* Fix code size.
* Further optimisation.
* Attributes: Fix apply_diff_index_maps
The old algorithm simply stops when key name/order changes, which
is simply wrong.
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
* add test case for test for bug #2653
* remove pr-flow, run all the tests when asked
* make tests that were never run pass
* run tests cargo make properly
* use wasm-pack-base test for running wasm tests
* cargo make config should be good
* update CI
* Separate hydration and render queue.
* Revert "Fix issue with node refs and hydration (#2597)"
This reverts commit 469cc341c340bd0093d9233847f523b66a18fd90.
* Priority Render.
* Add some tests.
* Add more tests.
* Add test result after click.
* Fix test comment.
* Fix test timing.
* Restore test.
* Once AtomicBool, now a Cell.
* Prefer use_future.
* Revealing of Suspense always happen after the component has re-rendered itself.
* Shifting should register correct next_sibling.
* Revert to HashMap.
* cargo +nightly fmt.
* Fix comment.
* Optimise Code size?
* Add comment if assertion fails.
* Revert "Merge branch 'hydration-4' into fc-prepared-state"
This reverts commit 427b087d4db6b2e497ad618273655bd18ba9bd01, reversing
changes made to 109fcfaa127aefc5fa3c697e254fe2c049292be2.
* Revert "Revert "Merge branch 'hydration-4' into fc-prepared-state""
This reverts commit f1e408958d94cb13813ce75aa6f0aad06c9fa3e8.
* Redo #2957.
* Add `VTag::into_children`
Currently, VTag supports `children` and `children_mut`, but not `into_children` to complete the pattern. This is useful if someone wishes to destructively acquire the children of a VTag to reparent them to a different VTag.
* Repair broken doc comment on `VTag::children_mut`
* Remove spaces between functions
when we not explicitly portaling into the shadow, we
should bubble up to the host element and continue.
This fixes custom elements internally using open SD
* Make Function Component to Implement BaseComponent.
* Remove IntoComponent.
* Inline some methods.
* Move some logic out of proc macro.
* Move position of the self generics.
* Discourage direct implementation `FunctionComponent` & `#[doc(hidden)]`.
* Add `use_suspending_future` hook to make consuming futures as suspense easier
* Add test
* fmt
* use_suspending_future -> use_future
* use_future takes a closure
* Fix issue with node refs and hydration
When a component is contained in a component, the
inner reconciles, which used to replace the NodeRef,
which left a badly linked one in the outer Hydration render state.
Now, keep a stable internal_ref besides the user-passed node_ref.
The internal_ref never gets replaced as long as the BComp lives.
* Use AttrValue instead of &'static str in Attributes::IndexMap
* avoid monomorphization to reduce binary size
* fmt & `#[inline(always)]`s
* more attempts to reduce the code size
* make clippy happy
* implement event handling with multiple subtree roots
* add listeners to all subtree roots
* move host element to Registry
* add BSubtree argument
* surface level internal API for BSubtree
* cache invalidation & document limitations
* Update portal documentation
* Add test case for hierarchical event bubbling
* add shadow dom test case
* add button to portals/shadow dom example
* change ShadowRootMode in example to open
BSubtree controls the element where listeners are registered.
we have create_root and create_ssr
Async event dispatching is surprisingly complicated.
Make sure to see #2510 for details, comments and discussion
takes care of catching original events in shadow doms
* Bring changes to this branch.
* Child components always render after parents.
* Cleanup residual Portal references.
* Fix after merge.
* Fix trybuild.
* Opt for usize.
* Strip Generics.
* take instead of replace, first instead of front.
* Fix const function component.
* Show Properties on the function definition.
* Filter certain doc attributes to be applied to type alias. More precise warnings.
* Implement macro-based hook.
* Add fail case.
* Function Component no longer a type alias.
* Clippy!
* Force 'static on generics.
* Fix clippy!
* Fix clippy and trybuild.
* Fix clippy and trybuild.
* Fix clippy.
* BaseComponent was not sealed properly.
* Adjust prelude.
* Public API should use IntoComponent for better ergonomics.
* Fix race condition.
* Fix trybuild.
* Add tests for Link component
* Include query parameters in href of Link component
* Add test cases for HashRouter and basename option
* Fix test name, format, clippy
* Ignore clippy warnings for test helpers
* detach destructures now
* add failing keyed-list issue
* crude port to the new bundle infrastructure
* port over the infrastructure
the new bcomp is especially nice and lost a few unwraps owed to not having
to reserve space for a scope before rendering.
Note also that bsuspense has been slimmed a bit, storing the suspended flag
implicitly in the state.
some naming is not perfect yet and has to be adjusted still.
* mass rename: apply -> reconcile
* get rid of move_before in favor of shift
* generate id directly when creating a new scope
* bundle for text nodes
* work on naming: ancestor -> bundle
* slightly optimize list reconciler, add doccomments
* address review
* add internal documentation
* address review comments
rename fields in bsuspense
convert to gloo::events
* move even more stuff into dom_bundle to scope exports
- app_handle and layout_tests are now in there
- items are publically re-exported in crate::dom_bundle
- dom_bundle itself is private
- btag and bcomp get their own submodules
- bcomp now contains the lifecycle and scope impls
* move replace into Reconcilable
* move lifecycle and scope back into html as per review
* move back Value and InputFields into html
* actually only type-check format args in production
* fix documentation link
* move btag_impl up into containing module
* shift comps immediately
shifting the rendered Nodes does not tie into the lifecycle,
as such it can happen immediately
* use list-bundle in tag-bundle
* fix cargo make tests
* improve 05_swap benchmark
* fix a blunder where I swapped operands
* fix naming of BNode variants