Migrate dioxus-native and dioxus-native-dom to latest Dioxus main - #758
Open
nicoburns wants to merge 2 commits into
Open
Migrate dioxus-native and dioxus-native-dom to latest Dioxus main#758nicoburns wants to merge 2 commits into
nicoburns wants to merge 2 commits into
Conversation
- Pin all dioxus workspace dependencies to dioxus main rev 24f6a829d (0.8.0-alpha.1) - Port mutation_writer to the new stack-machine WriteMutations API, keeping Blitz-specific behavior (event handler counts, mounted event queueing, data-dioxus-id, subdocument/custom-widget attachment) - Use DioxusState::writer() and ElementId::from_raw in dioxus_document - Add convert_before_input_data to the HtmlEventConverter impl - Update dioxus-native prelude for the new html element vocabulary (dioxus_html::html + elements::prelude::*) - Mark #[store(pub)] extension methods pub per new visibility rules - Replace removed dioxus_elements paths in examples
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Points all
dioxus-*workspace dependencies at Dioxusmain(rev = "24f6a829d", version0.8.0-alpha.1) and migrates the Blitz copies ofdioxus-native/dioxus-native-domto the new APIs.mutation_writer.rs— ported to the new stack-machineWriteMutationsprotocol (the old template/ID-based API —TemplateNode,assign_node_id,create_placeholder, per-mutationElementIdargs — no longer exists). The port mirrors upstream'spackages/native-domimplementation:but keeps Blitz-specific behavior that upstream's copy has dropped or simplified:
WriteOnceAttr<Box<dyn Document>>(anyDocumentimpl, e.g.ScriptDocument) for__webview_documentsubdocuments, vs upstream'sBox<PlainDocument>NodeIdfromblitz-domrather thanusizeDomEventKind::discriminant(),mountedevent queueing,data-dioxus-id,checked-falsy clearing, style-namespace anddangerous_inner_htmlhandlingBlitz's
dioxus_document.rs(subdocument polling,chain: &[NodeId]) andevents.rs(scroll support) are retained; only the API deltas were applied:DioxusState::writer()instead ofMutationWriter::new,ElementId::from_raw(fields are now private), and a new requiredconvert_before_input_datamethod (unimplemented, like the other unsupported events).Fallout from other Dioxus
mainchanges:rsx!now expands elements ashtml::divetc., sodioxus_native::preludere-exportsdioxus_html::{self, html}andelements::prelude::*(mirroring the newdioxus::prelude);dioxus_elementsalias removed#[store(pub)]blocks, so the browser app's store extension methods are markedpubexamples/transforms.rs:dioxus_elements::paths →dioxus_html::stale_node_mapping.rstest:ElementId(raw)→ElementId::from_raw(raw)Verified with
cargo check --workspace --all-targets,cargo clippy --workspace -- -D warnings,cargo fmt, andcargo test --workspace(all passing).Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/344ad63f48e74aa6b30c4a2d0a1556e1
Requested by: @nicoburns
WPT results
No changes in test results compared to
main.Generated by the WPT workflow.