* 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
* Fix Call Generics & FnOnce macro hygiene.
* Add a failure case as well.
* Remove a unused struct in test case.
* Update packages/yew-macro/tests/hook_attr/hook-const-generic-pass.rs
Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com>
* Remove probably unused impl ImplicitClone on Cow<str>
* Remove unused import
* Remove variant Owned for AttrValue for consistency
* Implement ImplicitClone on primitive types
Especially those that are Copy.
* (○`дノ´)ノ┳┳・゚・┻┻・゚・。
* Recover docs as well.
* Make scheduler synchronous for now.
* Disable Component IDs as they are not useful at the moment.
* Minor fixing, amending messages and apply optimisation on batched messages.
* Convert components concept docs from SC to FC
- moved struct components to advanced topics
- added docs about HOC for Suspense and Context
- added a ease-in topic before components that introduces
HTML/CSS/JS in yew
- edit components concept to use function components
* translations
* fix todo links
* fix tests
* spelling bee
* Make a use_hook hook with the new Hook trait.
* Implement Lifetime.
* Rewrites function signature.
* Only apply lifetime if there're other lifetimes.
* Cleanup signature rewrite logic.
* Rewrite hook body.
* Port some built-in hooks.
* Finish porting all built-in hooks.
* Port tests.
* Fix tests.
* Migrate to macro-based hooks.
* Fix HookContext, add tests on non-possible locations.
* Fix stderr for trybuild.
* Add 1 more test case.
* Adjust doc location.
* Pretty print hook signature.
* Fix Items & std::ops::Fn*.
* Add use_memo.
* Optimise Implementation of hooks.
* Use Box to capture function value only.
* Detect whether needs boxing.
* Add args if boxing not needed.
* Enforce hook number.
* Deduplicate use_effect.
* Optimise Implementation.
* Update documentation.
* Fix website test. Strip BoxedHook implementation from it.
* Allow doc string.
* Workaround doc tests.
* Optimise codebase & documentation.
* Fix website test.
* Reduce implementation complexity.
* Destructor is no more.
* Do not detach child element if parent element is about to be detached as well.
* Fix tests.
* Adds ContextHandle in yew::prelude
* Adds ContextHandle in yew::prelude
Added ContextHandle in /yew/src/lib.rs and updated stderr with test-overwrite
* Formats code using cargo fmt
* Revert "Adds ContextHandle in yew::prelude"
This reverts commit abdf21f2d523ac2df56cca3d29f8860dbefc5cc5.
* build up redirects for API docs hosting
* build with all features and documenting config
* fix warnings
* can rustdoc please provide a way to modify the base url?
I want to host the docs at /next/:crate_name, not at /:crate_name ffs
* Don't clean URLs... what is rustdoc doing?
* now it wants to work???
* build a next index page
* unreleased docs banner
* show coverage
* remove ./ ???
* try 2?
* api-docs/ not api-docs-public/
* please
`Model` is ambiguous and not a user-friendly name.
Some of the newer docs are already referring to the root component as
`App`.
This PR follows this naming scheme:
- `App` for a root component
- `MyComponent` for an arbitrary component
This naming is inspired by the React docs.
i18n references were not changed. They need a larger rewrite which will
go in a separate PR.
* Make Html a Result.
* Fix tests.
* Implement Suspense.
* Schedule render when suspension is resumed.
* Shift children into a detached node.
* styled example.
* Update wording a little bit.
* Move hint to hint.
* Add some tests.
* Fix clippy.
* Add docs.
* Add to sidebar.
* Fix syntax highlight.
* Component -> BaseComponent.
* Html -> VNode, HtmlResult = RenderResult<Html>.
* Suspendible Function Component.
* Add a method to create suspension from futures.
* Revert extra changes.
* Fix tests.
* Update documentation.
* Switch to custom trait to make test reliable.
* Fix file permission.
* Fix docs.
* Remove log.
* Fix file permission.
* Fix component name error.
* Make Suspension a future.
* yeet Callback::once
* yeet Callback::reform
* remove passive overrides
Event's passive state will be determined by sane defaults set by Yew
* clippy
* docs
* make CI happy
* Revert "yeet Callback::reform"
This reverts commit 33e7770d
* why?
I literally tick-marked reformat before commit. Does it not use rustfmt???
* Update packages/yew/src/callback.rs
Co-authored-by: Julius Lungys <32368314+voidpumpkin@users.noreply.github.com>
Co-authored-by: Julius Lungys <32368314+voidpumpkin@users.noreply.github.com>
* silence some warnings from derive(Properties)
* for consistency preserve [#deny(..)]
* preserve some attributes on the struct def
adds a test case to check for several warnings
* add #[deny] in test cases to error instead of warning on failure
Co-authored-by: Julius Lungys <32368314+voidpumpkin@users.noreply.github.com>