dioxuslabs / docsite Goto Github PK
View Code? Open in Web Editor NEWDioxuslabs.com documentation site
Home Page: https://dioxuslabs.com
Dioxuslabs.com documentation site
Home Page: https://dioxuslabs.com
Page: https://dioxuslabs.com/docs/0.3/guide/en/getting_started/tui.html
The site says "See the widgets example", which leads to a tui
package, when it's now dioxus-tui
.
The line that launches the desktop app configuration of the dioxus app example for setting up Tailwind CSS currently points to ./tailwind.css
when the previous command outputs the tailwind.css
to public/tailwind.css
working on PR now
Development
Run the following command in the root of the project to start the tailwind css compiler:
npx tailwindcss -i ./input.css -o ./public/tailwind.css --watchDesktop
Add a custom head pointing to the generated tailwind CSS file in your
main
. It looks like:dioxus_desktop::launch_cfg( App, dioxus_desktop::Config::new() .with_custom_head(r#"<link rel="stylesheet" href="tailwind.css">"#.to_string()))Launch the dioxus desktop app:
cargo run
The docsite was working until today.
In the browser console (macOS; Brave; guard disabled), I see:
docsite.js:725 ERROR /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/dioxus-web-0.4.0/src/lib.rs:219 Rehydration failed NodeNotFound. Rebuild DOM into element from scratch
inline0.js:255 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'listening')
at run (inline0.js:255:330)
at dioxus_interpreter_js::sledgehammer_bindings::Channel::flush::h3dd42f069636a006 (docsite_bg.wasm:0xaa7cd)
at dioxus_web::dom::WebsysDom::apply_edits::h8dea4df7adec0978 (docsite_bg.wasm:0x7f70a)
at dioxus_web::run_with_props::{{closure}}::hd8fbd61113cac6f4 (docsite_bg.wasm:0x7ed66)
at wasm_bindgen_futures::queue::Queue::new::{{closure}}::h4af736430e73b26a (docsite_bg.wasm:0xe5a45)
at <dyn core::ops::function::FnMut<(A,)>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::h9e889b7261c861ea (docsite_bg.wasm:0x175211)
at __wbg_adapter_63 (docsite.js:332:10)
at real (docsite.js:236:20)
We should add a form to easily submit projects to the Awesome and Made With lists.
Hello again! It looks like the fix for #32 had an unfortunate side-effect: the routes for the blog posts are now reversed!
It looks like the routing is done by index on the array of posts, but because that array has changed its order, the routes now point to the wrong posts. Up to you how to fix it, but I'd suggest using the slug as the unifying key and sorting the posts on render.
The website should show at least some stub mentioning unavailable JavaScript instead of just rending plain white background (or better just deliver server-rendered content).
Combined with hourglass-esque logo, I though it was just very slow to load.
Upon loading, I saw a motto:
User interfaces that run anywhere.
Looks like JS-less web browsers is not an "anywhere".
Render your app entirely on the server.
So why the website (assuming it uses the framework in question) does not use it?
(also the text above is tricky to select - it attemts to drags&drop an element on FF 102.7esr instead of selecting the text).
It seems the links are incorrectly generated, with an additional "getting_started" in between. For example, the "Desktop" link points to /learn/0.4/getting_started/getting_started/desktop
instead of /learn/0.4/getting_started/desktop
https://dioxuslabs.com/reference/platforms/web says:
Add Dioxus with the web features:
$ cargo add dioxus --features web
However cargo add dioxus --features web
results in:
cldfire@jarekspsonalmbp project % cargo add dioxus --features web
Updating crates.io index
Adding dioxus v0.3.1 to dependencies.
error: unrecognized feature for crate dioxus: web
enabled features:
dioxus-core-macro, dioxus-hooks, dioxus-html, dioxus-rsx, hooks, html, macro
Seems to me the default features are set up for a web build as of today.
A 404 Not Found page.
Maybe this? https://dioxuslabs.com/learn/0.4/reference/fullstack/server_functions
On https://dioxuslabs.com/guide/setup.html there is a link to https://dioxuslabs.com/platforms/00-index.html which 404s. It seems like the platforms
section has been moved to the reference (example desktop) but there doesn't actually seem to be any equivalent to the "platforms" index page to actually update this link to currently.
Probably best way to fix would be to make this following into its own section to link to:
We should use App in all of the getting started platform guides to be more consistent with the hackernews guide. Some of the guides already use App, but some like the fullstack guide do not
I've tried the dioxus_fullstack example. As far as I understood it has an underlying axum server, which serves both the static files and the generated APIs made by ServerFn.
Is it possible to separate them for use in dioxus_desktop?
I imagine something like:
I tried to search in the documentation and examples by I haven't found anything so far
At some viewport sizes the sidebar overlaps with the main content:
This was in Arc (Chrome, effectively) with a clientWidth
of 1232 on this page: https://dioxuslabs.com/learn/0.4/getting_started/fullstack.
The CSS is broken on the blog page. It works fine if you navigate to the home page and get to the blog from there.
Steps to reproduce:
Just checking out the new 0.4 release, running through the full stack getting started guide (https://dioxuslabs.com/learn/0.4/getting_started/fullstack) and there are a few issues.
The Web link in "This guide assumes you read the Web getting started guide and installed the Dioxus-cli" goes to a 404.
Setup:
Hot Reload:
Line 123 in 42a65af
The documentation Reference -> UseCoroutine -> Sending Values seems to be wrong. In the last code-block the asnc fn gets an AtomRoot parameter, but use_atom_root(cx) returns a &Rc
To Reproduce
Steps to reproduce the behavior:
Environment
Where does this delay_ms
come from? I don't see it anywhere. Can someone give me a pointer please?
One thing I am missing is a quick way to jump to the github repo of the framework from the website, that would be really nice
This snippet:
Lines 1 to 9 in a97cd40
Does not match the actual implementation and thus it raises some questions from the new-comers:
docsite/src/components/homepage/hero.rs
Lines 46 to 81 in a97cd40
The features section is missing in this guide's Cargo.toml
https://dioxuslabs.com/learn/0.4/getting_started/fullstack
Problem
Clicking on the "JS Benchmark" in Feature-packed examples leads back to the https://dioxuslabs.com/ website.
Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
Clicking on JS Benchmark should show the Benchmark
Screenshots
Questionnaire
In the Getting started page, there's a codesandbox example which doesn't work (I'm not referring to code but literally the example it's not running). There are other examples from codesandbox that doesn't work.
It looks like the new use_state idiom of (variable, set_variable) = use_state(&cx, | | initial_value)
needs to be applied to src/components//.rs
Steps to reproduce:
On https://dioxuslabs.com/blog/introducing-dioxus/ the link to github found here:
This very site is built with Dioxus, and the source code is available here.
is malformed:
https://dioxuslabs.com/blog/introducing-dioxus/github.com/dioxuslabs/docsite
it should probably be something like:
https://github.com/dioxuslabs/docsite
It would be nice if on every page, there would be a button which would open the GitHub editor for that page, since it's just a Markdown file. For example, on guide/your_first_component, the button would lead to docsite/edit/master/docs-src/0.4/en/guide/your_first_component. It would allow anyone to quickly suggest a change without having to manually find that file, or fork the repository.
This wouldn't be sufficient for more complex documentation editing, but it would be perfect for small edits, such as a simple typo/grammar fix.
See https://dioxuslabs.com/guide/setup.html
jump down to linux specifics part...
looks like you switched from markup to ``` markdown half way through that doc....
Didn't have time to do a PR - sorry
The links to the examples under the heading Feature-packed examples on the home page lead to a 404 page on GitHub.
It looks like the examples have been moved to their own repo. E.g. link says https://github.com/dioxuslabs/todomvc instead of https://github.com/dioxuslabs/example-projects/tree/master/todomvc
In "normal" Markdown, a single line break displays a space. Example:
... this line is very long and hard to edit in an editor,
so here's a line break!
displays: ... this line is very long and hard to edit in an editor, so here's a line break!
. This is not the case on the docsite, so there's awkward missing spaces. For example, in cookbook/examples, there's this:
... or you just want to see cool thingsthat you can do with Dioxus, make sure to give these a look!
^^^^^^^^^^
Equivalent Markdown:
... or you just want to see cool things
that you can do with Dioxus, make sure to give these a look!
Getting Started / Liveview - Setup
There is a small but potentially confusing mismatch in the Liveview setup instructions on the Dioxus documentation page. The instructions for creating a new project suggest using cargo new --bin demo followed by cd app, which seems to be inconsistent.
Reproduction steps:
Learning -> Guide
console errors:
INFO /home/runner/.cargo/git/checkouts/dioxus-1e619ce595d3799d/7a7397b/packages/web/src/lib.rs:172 Starting up docsite.js:1071:13
INFO /home/runner/.cargo/git/checkouts/dioxus-1e619ce595d3799d/7a7397b/packages/web/src/lib.rs:207 rebuilding app docsite.js:1071:13
ERROR /home/runner/.cargo/git/checkouts/dioxus-1e619ce595d3799d/7a7397b/packages/web/src/lib.rs:219 Rehydration failed NodeNotFound. Rebuild DOM into element from scratch docsite.js:1068:13
Uncaught (in promise) TypeError: root is undefined
run https://dioxuslabs.com/assets/dioxus/snippets/dioxus-interpreter-js-e5d84ddbe84386fa/inline0.js:255
__wbg_adapter_63 https://dioxuslabs.com/assets/dioxus/docsite.js:331
real https://dioxuslabs.com/assets/dioxus/docsite.js:236
inline0.js:255:325
panicked at 'already borrowed: BorrowMutError', /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-futures-0.4.37/src/task/singlethread.rs:85:37
Stack:
__wbg_get_imports/imports.wbg.__wbg_new_abda76e883ba8a5f/<@https://dioxuslabs.com/assets/dioxus/docsite.js:524:21
logError@https://dioxuslabs.com/assets/dioxus/docsite.js:253:18
__wbg_get_imports/imports.wbg.__wbg_new_abda76e883ba8a5f@https://dioxuslabs.com/assets/dioxus/docsite.js:523:66
console_error_panic_hook::hook::ha10b393455c8fea1@https://dioxuslabs.com/assets/dioxus/docsite_bg.wasm:wasm-function[740]:0xd5d22
core::ops::function::Fn::call::hd3935fca3a953dbf@https://dioxuslabs.com/assets/dioxus/docsite_bg.wasm:wasm-function[8010]:0x187edd
std::panicking::rust_panic_with_hook::h6df5db7ad9f65dc8@https://dioxuslabs.com/assets/dioxus/docsite_bg.wasm:wasm-function[1811]:0x123f2d
std::panicking::begin_panic_handler::{{closure}}::h0d169fa297411d6d@https://dioxuslabs.com/assets/dioxus/docsite_bg.wasm:wasm-function[2254]:0x13852c
std::sys_common::backtrace::__rust_end_short_backtrace::h7fe51fb4d3ba6060@https://dioxuslabs.com/assets/dioxus/docsite_bg.wasm:wasm-function[7993]:0x187e4e
rust_begin_unwind@https://dioxuslabs.com/assets/dioxus/docsite_bg.wasm:wasm-function[3538]:0x15ca6a
core::panicking::panic_fmt::h2d3c5586175098d9@https://dioxuslabs.com/assets/dioxus/docsite_bg.wasm:wasm-function[4614]:0x16f298
core::result::unwrap_failed::h73809cc05a786e48@https://dioxuslabs.com/assets/dioxus/docsite_bg.wasm:wasm-function[2550]:0x142d32
core::cell::RefCell<T>::borrow_mut::ha26e00b5061b58ad@https://dioxuslabs.com/assets/dioxus/docsite_bg.wasm:wasm-function[3794]:0x161bbe
wasm_bindgen_futures::task::singlethread::Task::run::h2875f3fdd31c94db@https://dioxuslabs.com/assets/dioxus/docsite_bg.wasm:wasm-function[2268]:0x138d5c
wasm_bindgen_futures::queue::Queue::new::{{closure}}::h8b8ac32a31b48068@https://dioxuslabs.com/assets/dioxus/docsite_bg.wasm:wasm-function[1833]:0x12517c
<dyn core::ops::function::FnMut<(A,)>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::h34b8c81218256380@https://dioxuslabs.com/assets/dioxus/docsite_bg.wasm:wasm-function[6233]:0x180878
__wbg_adapter_63@https://dioxuslabs.com/assets/dioxus/docsite.js:331:10
real@https://dioxuslabs.com/assets/dioxus/docsite.js:236:20
docsite.js:537:13
Uncaught (in promise) RuntimeError: unreachable executed
__wbg_adapter_63 https://dioxuslabs.com/assets/dioxus/docsite.js:331
real https://dioxuslabs.com/assets/dioxus/docsite.js:236
docsite_bg.wasm:1607698:1
Firefox 116.0 Linux
Linux Manjaro 23.0.0
PS:
i dont why or how, but after i had removed a dioxus-prevent-default
attribute and clicked on that link, everything started to work (even after reload and hard reloads), but re-doing the reproduction steps gets it locked again
We should document how to handle secrets that you want on the server but not on the client. Like API keys. It doesn't have to be a large section, but something about making sure that secrets are cfg
ed out on the server would be useful.
We should add it to the fullstack docs here: https://github.com/DioxusLabs/docsite/tree/master/docs-src/0.4/en/reference/fullstack. It could be in a complete separate chapter or be part of a larger fullstack anti-patterns chapter
On viewing dioxuslabs.com I found that the buttons for switching code snippet showcases were problematic when activated for the first time(Pic1).
Pic1
Normal
After investigations it turns out that
switch (op & 255){...}
: the "case 4" would do els = stack.splice(stack.length - u32buf[u32bufp++]);
which discards <span ...>
from[<div id="main">, <span class="absolute z-10 bottom-0 inset-x-0 h-2 bg-ghmetal">]
, making it [<div id="main">]
.At the https://dioxuslabs.com/learn/0.4/reference/user_input page, there's no mention on how to use input fields with type="file"
.
Trying to print the oninput event using the debug formatting didn't help either, as only empty "value" and "values" fields did show up.
Then I found the existence of the files
field from the docs generated by cargo doc
, in the dioxus::prelude::FormData
. After more searching, I found this other example showing file upload https://github.com/Demonthos/dioxus/blob/master/examples/file_upload.rs
I would suggest documenting the file input feature inside the "user_input" guide page at https://dioxuslabs.com/learn/0.4/reference/user_input page.
Can I help in some way? Be warned that I'm not a native english speaker, so a checking might be needed anyway.
https://dioxuslabs.com/learn/0.4/migration/router
the second block has this comment:
#[derive(Routable, PartialEq, Debug, Clone)]
enum Route {
#[route("/home")]
// This route will render the Home component with the HomeProps props. (make sure you have the props imported)
// You can modify the props by passing extra arguments to the macro:
// #[route("/home", Comp, CompProps)]
Home {},
}
however, I tried doing
#[route("/home", Comp, CompProps)]
and
#[route("/home", CompProps)]
Comp {}
and
#[route("/home", Comp, CompProps)]
Comp {}
and neither one seems to work.
The Diplex global state management library mentioned here
Line 116 in b92993e
Reference: https://dioxuslabs.com/learn/0.4/reference/fullstack/routing
There is missing information on what crate the launch macros originate from.
Ironically, the 404 page has this HTML:
<source type="image/avif" srcset="/static/rustacean-flat-gesture.png">
And the URL there itself leads to the 404 page instead of the expected image (https://dioxuslabs.com/static/rustacean-flat-gesture.png).
The projects linked on https://dioxuslabs.com/awesome can't be left clicked to open in the same tab (instead the page scrolls to the top), only middle click and/or context menu -> open in new tab work. Tested on MacOS, Firefox and Safari.
By "books", I mean the top-level sections in the docs, like Router and CLI.
Some of the tools discussed in the docs could be reorganized into their respective books. This would reduce duplication and be more organized/coherent. Right now, it feels "scattered".
For example, Getting started > Web
, Reference > Web
, Cookbook > Publishing > Web
could all be unified under a "Web" book. This includes all the other renderers, where each book contains all the steps to publish a project using a specific renderer. Additionally, there should be a guide on how to publish the same app on different platforms.
Every book should have a "Reference" section and an "Example project" section, which showcases elements from the Reference. The Router book has this, but the difference between the two sections should be clear. For example, the Router book example project has a Navigation Targets section, but this should be in the Reference, as it's not even included in the final example project code.
For eg., https://dioxuslabs.com/awesome does not have "Awesome" in title, which probably explains why it is not ranking higher in Google search:
On the front page, the release notes should say 2022
, not 2021
.
https://dioxuslabs.com/
This causes the page to be loaded in quirks mode:
This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use โโ.
If I control click on any menu item to open it in a new page it changes the current page to the intended page without changing the url and opens the previous page in a new tab.
control click on "home"
original tab becomes the blog page without changing the url
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.