DioxusNativeApplication requires each window's document to be exactly DioxusDocument

Open
#1,495 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
backend

Research direction

Read dioxus_application.rs and trace the three downcast_doc_mut::<DioxusDocument>() call sites, then inspect the Document trait and DioxusDocument implementation. Decide how a wrapper exposes its inner Dioxus document through the proposed trait or method; done means all three application paths work with a wrapping document without panicking or skipping Dioxus work.

Written by the indexing model from the issue text.

Description

A-Dioxus-Native A-Shell C-Usability I-Crash

DioxusNativeApplication downcasts each window's document to DioxusDocument (window.downcast_doc_mut::<DioxusDocument>() in dioxus_application.rs, three places), so a window whose document is a type wrapping a DioxusDocument (to add app-level behaviour around Document::handle_ui_event or poll) panics or skips the Dioxus work.

Expected: the application reaches the inner DioxusDocument through a trait (AsMut<DioxusDocument>, or a method on Document returning Option<&mut DioxusDocument>), so wrappers keep working.

Dominant language
Rust
Stars
4.5k
Forks
281
Avg merge
6h 6m
Merged PRs (30d)
184

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DioxusLabs/blitz

All issues in DioxusLabs/blitz

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.