-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the ability to follow links (#173)
* #170 Follow Links - Added the ability to follow links. For this we added another Variant to the BlitzEvent Enum and also made DocumentLike return an Option<DocumentEvent> which currently just has one Variant for following links. I consider this a working POC, which needs to be fleshed out. I didn't invest any time to make sure the DioxusSide still works. It most likely won't because of the change in the trait definition. * #170 Follow Links Instead of bloating the document with another optional Event on `DocumentLike`'s' `handle_event` method, we introduce a `NavigationProvider` similar to the existing `NetProvider`. Currently it only has one method for navigating to a new page, but this may change in the future. * #170 Incorporate feedback and make the whole workspace compile again * #170 make the freestanding `resolve_url` function return an Option<Url> instead of panicking when parsing is not possible * #170 make examples/screenshot run again!
- Loading branch information
Showing
14 changed files
with
125 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
pub mod net; | ||
|
||
pub mod navigation; | ||
|
||
mod devtools; | ||
pub use devtools::Devtools; | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/// A provider to enable a document to bubble up navigation events (e.g. clicking a link) | ||
pub trait NavigationProvider: Send + Sync + 'static { | ||
fn navigate_new_page(&self, url: String); | ||
} | ||
|
||
pub struct DummyNavigationProvider; | ||
|
||
impl NavigationProvider for DummyNavigationProvider { | ||
fn navigate_new_page(&self, _url: String) { | ||
// Default impl: do nothing | ||
} | ||
} |
This file contains 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
This file contains 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