From 4070d0c8bd52f6e6a0a6bd31a36082b0af579ca0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antti=20Jalom=C3=A4ki?= Date: Fri, 23 Jan 2026 23:30:00 +0200 Subject: [PATCH] docs: fix grammar and typos in comments and documentation (#5254) * docs: fix grammar and typos in comments and documentation * docs: use British English style for e.g. and i.e. (no trailing comma) Changed from American English style (e.g.,) to British English style (e.g.) for consistency with the rest of the codebase." --- .github/ISSUE_TEMPLATE/bug_report.md | 8 ++++---- examples/07-fullstack/through_reqwest.rs | 2 +- notes/RELEASING.md | 8 ++++---- packages/cli-harnesses/README.md | 2 +- packages/cli/src/build/request.rs | 2 +- packages/cli/src/cli/component.rs | 4 ++-- packages/cli/src/logging.rs | 4 ++-- packages/cli/src/serve/output.rs | 2 +- packages/cli/src/serve/runner.rs | 2 +- packages/cli/src/tailwind.rs | 2 +- packages/const-serialize/src/const_vec.rs | 2 +- packages/dioxus/src/launch.rs | 2 +- packages/document/docs/eval.md | 2 +- packages/fullstack-server/src/serverfn.rs | 2 +- packages/fullstack/src/payloads/stream.rs | 2 +- packages/interpreter/src/lib.rs | 4 ++-- packages/rsx-hotreload/src/diff.rs | 4 ++-- packages/stores/src/scope.rs | 2 +- packages/subsecond/subsecond/src/lib.rs | 4 ++-- 19 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 2009db631..3d06a8007 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -26,10 +26,10 @@ Steps to reproduce the behavior: **Environment:** -- Dioxus version: -- Rust version: -- OS info: -- App platform: +- Dioxus version: +- Rust version: +- OS info: +- App platform: **Questionnaire** diff --git a/examples/07-fullstack/through_reqwest.rs b/examples/07-fullstack/through_reqwest.rs index f80405d97..965e955c3 100644 --- a/examples/07-fullstack/through_reqwest.rs +++ b/examples/07-fullstack/through_reqwest.rs @@ -1,4 +1,4 @@ -//! This example demonstrates that dioxus server functions can be be called directly as a Rust +//! This example demonstrates that dioxus server functions can be called directly as a Rust //! function or via an HTTP request using reqwest. //! //! Dioxus server functions generated a REST endpoint that can be called using any HTTP client. diff --git a/notes/RELEASING.md b/notes/RELEASING.md index a871824a7..0d2a33409 100644 --- a/notes/RELEASING.md +++ b/notes/RELEASING.md @@ -1,6 +1,6 @@ # Releasing Dioxus -Dioxus is big and requires a lot of hand-holding to release. This guide is accurate as of of Dec 17, 2024. As we improve the release process, we'll update this guide. +Dioxus is big and requires a lot of hand-holding to release. This guide is accurate as of Dec 17, 2024. As we improve the release process, we'll update this guide. ## Checklist @@ -34,18 +34,18 @@ This involves making sure the metadata of the crates is correct before we publis 18. [ ] Go to the [template repo](http://github.com/dioxusLabs/dioxus-template) and make sure a branch exists for the new major version. IE a v0.5, v0.6, v0.7, etc branch. If it doesn't exist, create it. This *needs* to exist for `dx new` to work. It's likely that this already exists since we tend to try `dx new` frequently before releasing. 19. [ ] If performing a major release, make sure all the links in `dioxus` are updated to point to the new version. This involves basically CTRL-F'ing for `/0.6/` and replacing it with `/0.7/` etc. 20. [ ] It's likely that docsite links might not be updated just yet. If nightly docs are released, there shouldn't need to be any changes. It's fine to bypass the link checker for now, but you should be ready to fix links once the docsite is ready. Any links that are broken are "frozen in time" and will need to be fixed. We can't change links in published crates, so if the link never exists, it's just broken forever. -21. [ ] Inform "VIP" community projects that that a final RC is out (ie projects like [Freya](http://freyaui.dev)) so their authors can test new versions. +21. [ ] Inform "VIP" community projects that a final RC is out (i.e. projects like [Freya](http://freyaui.dev)) so their authors can test new versions. ### Releasing the workspace: 1. [ ] Make sure all latent commits have been merged into the `main` branch and pushed to github. -2. [ ] Ensure you've published a pre-release of the same code (only necessary for for major releases... patch releases are generally fine to skip a prerelease) +2. [ ] Ensure you've published a pre-release of the same code (only necessary for major releases... patch releases are generally fine to skip a prerelease) 3. [ ] Make sure the version you're releasing is correct (see above) 4. [ ] Make sure you're on the `main` branch (cargo workspaces publish requires you to be on the main branch) 5. [ ] Make sure you have [`cargo-workspaces` installed](https://crates.io/crates/cargo-workspaces). There are other tools but this one is the one we've used in the past. It has some small bugs but is generally reliable. This tool is important because it coordinates the release order of the crates since they depend on each other. Eventually cargo itself will have this functionality, I believe. Unfortunately, there's no way to "dry-run" a workspace publish since crates rely on each other and won't succeed if their dependencies aren't published. 6. [ ] Run the release: `cargo workspaces publish --publish-as-is --allow-dirty --no-git-push --no-individual-tags`. This will publish the crates to crates.io. It might take a while. Only `jkelleyrtp` currently has sufficient rate-limits to publish all the crates at once. If any crate fails, you might need to fix the problems manually and then run the command again. If an error occurs, you might also need to reset the most recent git commit and wipe the tag. `git reset --hard HEAD~1` and `git tag -d `. Be careful with these commands, especially if you're on the `main` branch. 7. [ ] Once the release is up, commit the most recent changes to the `main` branch and push it. -8. [ ] Also push the tag to the `main` branch. eg `git push origin v0.6.0` +8. [ ] Also push the tag to the `main` branch, e.g. `git push origin v0.6.0` 9. [ ] Verify crates.io is showing the new version 10. [ ] Verify `docs.rs` builds the new docs for each crate. IE go to `https://docs.rs/crate/dioxus/latest` and ensure there's no errors. We've had issues before with docs.rs [not building properly](https://docs.rs/crate/dioxus/0.6.0). 11. [ ] Verify you can create a new project with the new version and it works. IE `dx new app`. Do a dry-run of building a new app to make sure it works and no obvious errors are present. diff --git a/packages/cli-harnesses/README.md b/packages/cli-harnesses/README.md index f397af1d1..01b677dec 100644 --- a/packages/cli-harnesses/README.md +++ b/packages/cli-harnesses/README.md @@ -23,7 +23,7 @@ corresponds to the feature in their cargo.toml. So, - `dx serve --desktop` will enable the `desktop` feature In this case, we set default-features to false and then add back the default features that -aren't renderers, and then add the feature for the given renderer (ie web/desktop/mobile). +aren't renderers, and then add the feature for the given renderer (i.e., web/desktop/mobile). We call this "no-default-features-stripped." There are a few cases where the user doesn't need to pass a platform. diff --git a/packages/cli/src/build/request.rs b/packages/cli/src/build/request.rs index 1fd53edd5..ef073abf6 100644 --- a/packages/cli/src/build/request.rs +++ b/packages/cli/src/build/request.rs @@ -1195,7 +1195,7 @@ impl BuildRequest { // // { "artifact":"target/debug/deps/libdioxus_core-4f2a0b3c1e5f8b7c.rlib", "emit":"link" } // - // There are other outputs like depinfo that we might be interested in in the future. + // There are other outputs like depinfo that we might be interested in the future. if let Ok(artifact) = serde_json::from_str::(&line) { if artifact.emit == "link" { output_location = Some(artifact.artifact); diff --git a/packages/cli/src/cli/component.rs b/packages/cli/src/cli/component.rs index e8fca683c..1ac537d34 100644 --- a/packages/cli/src/cli/component.rs +++ b/packages/cli/src/cli/component.rs @@ -333,11 +333,11 @@ impl ComponentCommand { /// If both values are None, the default registry will be used #[derive(Clone, Debug, Parser, Default, Serialize, Deserialize)] pub struct RemoteComponentRegistry { - /// The url of the the component registry + /// The url of the component registry #[arg(long)] git: Option, - /// The revision of the the component registry + /// The revision of the component registry #[arg(long)] rev: Option, } diff --git a/packages/cli/src/logging.rs b/packages/cli/src/logging.rs index 70ba6ac08..e20d60280 100644 --- a/packages/cli/src/logging.rs +++ b/packages/cli/src/logging.rs @@ -663,7 +663,7 @@ impl TraceController { } } - // If we have "safe" error, we we need to log it + // If we have "safe" error, we need to log it if let Ok(Err(err)) = &res { self.record_backtrace( err, @@ -1081,7 +1081,7 @@ where }; // If the event has the captured panic attached, we record it through capture_backtrace directly. - // Otherwise, we wont have a backtrace to work with, so we just log the event as a telemetry event. + // Otherwise, we won't have a backtrace to work with, so we just log the event as a telemetry event. if let Some(error) = visitor.captured_panic { self.record_backtrace( error.error.as_ref(), diff --git a/packages/cli/src/serve/output.rs b/packages/cli/src/serve/output.rs index 8641ecce1..e23334b96 100644 --- a/packages/cli/src/serve/output.rs +++ b/packages/cli/src/serve/output.rs @@ -292,7 +292,7 @@ impl Output { }); } - // Toggle the more modal by swapping the the terminal with a new one + // Toggle the more modal by swapping the terminal with a new one // This is a bit of a hack since crossterm doesn't technically support changing the // size of an inline viewport. KeyCode::Char('/') => { diff --git a/packages/cli/src/serve/runner.rs b/packages/cli/src/serve/runner.rs index 37c23619e..016d3c48d 100644 --- a/packages/cli/src/serve/runner.rs +++ b/packages/cli/src/serve/runner.rs @@ -46,7 +46,7 @@ pub(crate) struct AppServer { pub(crate) client: AppBuilder, pub(crate) server: Option, - // Related to to the filesystem watcher + // Related to the filesystem watcher pub(crate) watcher: Box, pub(crate) _watcher_tx: UnboundedSender, pub(crate) watcher_rx: UnboundedReceiver, diff --git a/packages/cli/src/tailwind.rs b/packages/cli/src/tailwind.rs index f668f64ed..39d052b29 100644 --- a/packages/cli/src/tailwind.rs +++ b/packages/cli/src/tailwind.rs @@ -222,7 +222,7 @@ impl TailwindCli { let arch = match target_lexicon::HOST.architecture { target_lexicon::Architecture::X86_64 if platform == "windows" => "x64.exe", target_lexicon::Architecture::X86_64 => "x64", - // you would think this would be arm64.exe, but tailwind doesnt distribute arm64 binaries + // you would think this would be arm64.exe, but tailwind doesn't distribute arm64 binaries target_lexicon::Architecture::Aarch64(_) if platform == "windows" => "x64.exe", target_lexicon::Architecture::Aarch64(_) => "arm64", _ => return None, diff --git a/packages/const-serialize/src/const_vec.rs b/packages/const-serialize/src/const_vec.rs index 4c3c9a4a2..e24c9fe23 100644 --- a/packages/const-serialize/src/const_vec.rs +++ b/packages/const-serialize/src/const_vec.rs @@ -6,7 +6,7 @@ use crate::ConstReadBuffer; const DEFAULT_MAX_SIZE: usize = 2usize.pow(10); /// [`ConstVec`] is a version of [`Vec`] that is usable in const contexts. It has -/// a fixed maximum size, but it can can grow and shrink within that size limit +/// a fixed maximum size, but it can grow and shrink within that size limit /// as needed. /// /// # Example diff --git a/packages/dioxus/src/launch.rs b/packages/dioxus/src/launch.rs index 60949880c..b51ec1218 100644 --- a/packages/dioxus/src/launch.rs +++ b/packages/dioxus/src/launch.rs @@ -80,7 +80,7 @@ enum KnownPlatform { Other(LaunchFn), } -#[allow(clippy::redundant_closure)] // clippy doesnt doesn't understand our coercion to fn +#[allow(clippy::redundant_closure)] // clippy doesn't understand our coercion to fn impl LaunchBuilder { /// Create a new builder for your application. This will create a launch configuration for the current platform based on the features enabled on the `dioxus` crate. // If you aren't using a third party renderer and this is not a docs.rs build, generate a warning about no renderer being enabled diff --git a/packages/document/docs/eval.md b/packages/document/docs/eval.md index b23e1dc3d..178fde55d 100644 --- a/packages/document/docs/eval.md +++ b/packages/document/docs/eval.md @@ -44,7 +44,7 @@ fn app() -> Element { // You can pass initial data to the eval function by formatting it into the JavaScript code. const LOOP_COUNT: usize = 10; let eval = document::eval(&format!(r#"for(let i = 0; i < {LOOP_COUNT}; i++) {{ - // You can receive values asynchronously with the the `await dioxus.recv()` method. + // You can receive values asynchronously with the `await dioxus.recv()` method. let value = await dioxus.recv(); console.log("Received", value); }}"#)); diff --git a/packages/fullstack-server/src/serverfn.rs b/packages/fullstack-server/src/serverfn.rs index a98b1cfca..2c6ee689f 100644 --- a/packages/fullstack-server/src/serverfn.rs +++ b/packages/fullstack-server/src/serverfn.rs @@ -113,7 +113,7 @@ impl ServerFunction { response.headers_mut().extend(headers); } - // it it accepts text/html (i.e., is a plain form post) and doesn't already have a + // if it accepts text/html (i.e., is a plain form post) and doesn't already have a // Location set, then redirect to Referer if accepts_html { if let Some(referrer) = referrer { diff --git a/packages/fullstack/src/payloads/stream.rs b/packages/fullstack/src/payloads/stream.rs index a38390bd1..fa4caff6e 100644 --- a/packages/fullstack/src/payloads/stream.rs +++ b/packages/fullstack/src/payloads/stream.rs @@ -89,7 +89,7 @@ pub type ChunkedTextStream = Streaming; /// ## Browser Support for Streaming Input /// /// Browser fetch requests do not currently support full request duplexing, which -/// means that that they do not begin handling responses until the full request has been sent. +/// means that they do not begin handling responses until the full request has been sent. /// /// This means that if you use a streaming input encoding, the input stream needs to /// end before the output will begin. diff --git a/packages/interpreter/src/lib.rs b/packages/interpreter/src/lib.rs index 5736ae034..17a066a85 100644 --- a/packages/interpreter/src/lib.rs +++ b/packages/interpreter/src/lib.rs @@ -40,12 +40,12 @@ pub mod minimal_bindings { #[wasm_bindgen(module = "/src/js/hydrate.js")] extern "C" { - /// Register a callback that that will be called to hydrate a node at the given id with data from the server + /// Register a callback that will be called to hydrate a node at the given id with data from the server pub fn register_rehydrate_chunk_for_streaming( closure: &wasm_bindgen::closure::Closure, js_sys::Uint8Array)>, ); - /// Register a callback that that will be called to hydrate a node at the given id with data from the server + /// Register a callback that will be called to hydrate a node at the given id with data from the server pub fn register_rehydrate_chunk_for_streaming_debug( closure: &wasm_bindgen::closure::Closure< dyn FnMut(Vec, js_sys::Uint8Array, Option>, Option>), diff --git a/packages/rsx-hotreload/src/diff.rs b/packages/rsx-hotreload/src/diff.rs index a89c67742..0084669b6 100644 --- a/packages/rsx-hotreload/src/diff.rs +++ b/packages/rsx-hotreload/src/diff.rs @@ -48,11 +48,11 @@ //! - Hot reloading `Component { "hello" }`: //! - Try to hot reload the component body `"hello"` with the dynamic pool from `"{text}"`: Success with 1 unused dynamic item //! - Try to hot reload the component body `"hello"` with the dynamic pool from `"hello"`: Success with 0 unused dynamic items -//! - We use the the template that leaves the least unused dynamic items in the pool - `"hello"` +//! - We use the template that leaves the least unused dynamic items in the pool - `"hello"` //! - Hot reloading `Component { "{text}" }`: //! - Try to hot reload the component body `"{text}"` with the dynamic pool from `"{text}"`: Success with 0 unused dynamic items //! - The `"hello"` template has already been hot reloaded, so we don't try to hot reload it again -//! - We use the the template that leaves the least unused dynamic items in the pool - `"{text}"` +//! - We use the template that leaves the least unused dynamic items in the pool - `"{text}"` //! //! Greedy algorithms are optimal when: //! - The step we take reduces the problem size diff --git a/packages/stores/src/scope.rs b/packages/stores/src/scope.rs index b4c9541c9..d0ceb15ed 100644 --- a/packages/stores/src/scope.rs +++ b/packages/stores/src/scope.rs @@ -17,7 +17,7 @@ use dioxus_signals::{ /// - A tree of subscriptions used to make the store reactive. /// /// The `SelectorScope` contains a view into the lock (`Lens`) and a path into the subscription tree. When -/// the selector is read to, it will track the current path in the subscription tree. When it it written to +/// the selector is read to, it will track the current path in the subscription tree. When it is written to /// it marks itself and all its children as dirty. /// /// When you derive the [`Store`](dioxus_stores_macro::Store) macro on your data structure, diff --git a/packages/subsecond/subsecond/src/lib.rs b/packages/subsecond/subsecond/src/lib.rs index a07e33b51..0497f2570 100644 --- a/packages/subsecond/subsecond/src/lib.rs +++ b/packages/subsecond/subsecond/src/lib.rs @@ -132,7 +132,7 @@ //! //! ```rust //! fn main() { -//! // Changes to the the `for` loop will cause an unwind to this call. +//! // Changes to the `for` loop will cause an unwind to this call. //! subsecond::call(|| { //! for x in 0..5 { //! // Changes to the `println!` will be isolated to this call. @@ -271,7 +271,7 @@ pub fn call(mut f: impl FnMut() -> O) -> O { } // We use an AtomicPtr with a leaked JumpTable and Relaxed ordering to give us a global jump table -// with very very little overhead. Reading this amounts of a Relaxed atomic load which basically +// with very little overhead. Reading this amounts of a Relaxed atomic load which basically // is no overhead. We might want to look into using a thread_local with a stop-the-world approach // just in case multiple threads try to call the jump table before synchronization with the runtime. // For Dioxus purposes, this is not a big deal, but for libraries like bevy which heavily rely on