Add the `inert` boolean attribute to the global HTML attribute
group and to the SSR boolean attributes list. This allows users
to set `inert` on any HTML element, matching the HTML spec.
Fixes#5455
* fix autofill events
* ignore the wrong type of event like we do in desktop
* check the event type before dispatch instead of panicing on downcast
* clean up conversion
* remove example
* pull out shared event list
* pull in deserialize_raw
* unified event list
* prettier comment
* restore test
* restore alias
* normal doc comments
* move over comments
* minimize diff
* remove alias, was moved into the macro
* allow `--server` only builds!
* rollback example
* capture `/:route` routes
* fix: properly implement file uploads in forms
* implement desktop form uploads
* Performant serialization of form bytes
* finish up file stuff
* cleanups
* add request headers to streaming context
* remove some unwraps
overhaul dioxus fullstack using a new implementation of server_fn
This PR is a complete rewrite of dioxus fullstack designed to improve compatibility with axum and to fix a number of compilation errors based on feature flag unification plumbing through macros.
* Remove invalid global data attribute
Removes the non-existent global 'data' attribute from HTML global
attributes that was referencing broken MDN documentation. HTML
specification only supports data-* custom attributes and the
<data> element, not a global 'data' attribute.
Fixes#4241
* fix other attributes using datas
---------
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
* Switch to owned listener type
* remove html event workaround
* fix event conversion
* keep track of the origin scope
* fix clippy
* fix docs
* Use "ListenerCallback" instead of "ListenerCb"
* Add a small example
---------
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
* adhox: Fix Clippy lints in const-serialize etc.
Fix the clippy lints that were preventing building:
* const-serialize/src/lib.rs
* core/src/nodes.rs
* fullstack/src/serve_config.rs
* adhoc: Change the way to satisfy the lint for 1.85
The lint for pointer comparison is only in 1.85. The solution
uses a mechanism that was only stabilized with 1.85. Instead
of using that solution, will just allow the lint on this
function for now. Once the MSRV of Dioxus is updated to 1.85
or above, this can be changed to use the recommeneded solution.
* adhoc: Fix the 'cargo make test' tests
There were a number of tests failing to compile and/or run.
Fixed those that could be meaningfully fixed. Those that were
incomplete examples that could not be fixed are marked as
'ignore'.
* adhoc: GitIgnore test results in playwright tests
* fix wry rollback
---------
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
* Add the `onvisible` event using the IntersectionObserver
* Add a visible example
This example is based on https://codepen.io/ryanfinni/pen/VwZeGxN
* Remove web-sys CustomEvent feature for html package
* update js bindings and hash
* Use dioxus doc instead of lorem ipsum
* Fix clippy warning
* Add get_target method to the event data
* Make `get_time` return an Instant instead of a f64
* fix merge conflicts, compilinga
* remove target
* small nits
* serialzie as time_ms
* fix timing, works on desktop
* remove latent nits, fix hash
* box size clippy
* fix browserlist cargo.lock
---------
Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
* add a default head method through eval
* remove the old document trait
* implement document for each platform
* pull out document into a dedicated crate to cut down on shared dependencies
---------
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
* Implement Rc generational pointers
* Clean up error handling a bit
* start adding tests
* Simplify a few types
* Separate Rc and normal generational boxes
* Add tests for rc drop and read
* Move over the pointer instead of the data in ReadOnlySignal props
* Fix panic on ref drop and release mode builds
* final rc signal cleanup
* use rc generational boxes for event handlers as well
* add a regression test for read only signal cloning
* merge main
---------
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
* Fix hot reloading components with keys
* include component formatted segment keys, but not dynamic component value
* extend each head component with the corresponding element
* Allow spreading custom attributes into components
* Fix component_literal_dyn_idx index
* add a new test for hot reloading components with keys
* FIx script without body warning and rendering styles with a href set
* fix clippy
* Add the capability to handle resize event for web target
* Add the capability to handle resize event for desktop target
* Return all the sizes, not just the first one
* Fix conversion from platform to generic ResizedData for liveview
* Update the generated interpreter js code base
* Fix clippy warnings
* Fix inconsistent use of block_size and inline_size
* Rename `onresized` event to `onresize`
* Remove the the special-casing logic from the binding logic
* Propagating the resize events using CustomEvent
* Fix case convention in core ts
* revert changes to unified bindings
* Cleanup as suggested
* add a resize example
* Fix desktop resize events
* remove tracing from resize example
* use the raw resize entry so we can downcast on web
* remove unused ResizeEventDetail
---------
Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
* add prevent default methods to the event
* sync prevent default almost working
* sync prevent default working
* Move event handling into the runtime
* update core tests
* restore desktop file dialog
* implement prevent default on web
* add a hint about the new prevent default method
* fix web prevent default
* Fix CTRL+click on links
* fix values memorize in place test
* Fix a few more tests
* Add a playwright test for sync prevent default
* Fix core doc tests
* create a deprecated VirtualDom::handle_event
* fix macos imports in desktop
* Fix onmounted event
* Fix liveview support
* switch to RefCell for metadata
* Remove println
* remove prevent default attribute
* remove web specific link behavior
* Fix liveview links
* more liveview fixes for link
* Fix merge conflicts
* Fix clippy
* use the new prevent default in the file upload example
* create the dynamic value pool
* assign ids to dynamic formatted segments
* separate the rendering and literal pools
* rsx output compiles again
* more examples compiling with new rsx expansion
* update template body explanation
* all workspace examples compile
* fix formatted segments in keys
* start hot reload diffing
* fix component literal hot reloading
* start integrate new hot reloading with the CLI
* simple hot reloads working
* Fix hot reloading blocks with components
* implement hot reloading for if chains
* Fix hot reloading after a template requires a full rebuild
* Fix hot reloading any attribute values
* remove unsafe from hot reload utils
* Fix hot reloading empty rsx
* add more hot reloading tests
* reorganize hot reload module
* fix web hydration
* fix empty rsx nodes in autoformatting
* fix tests
* remove path sorting logic from core
* make template names more consistent in debug mode
* fix quote_as_hot_reload_literal for explicitly typed literals
* fix can_be_shorthand for string literals
* fix formatted single dynamic expression
* Fix usize component properties and playwright tests
* remove default implementation for TemplateBody
* add a bunch more comments for diffing, scoring and why this scoring system is optimal
* use head elements and new manganis syntax in examples
* only enable desktop workspace example scraping during a dioxus release
---------
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>