From 7d0cd92ba915b583dc87d0657083749e1b96c53d Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Wed, 30 Oct 2024 22:09:34 +0100 Subject: [PATCH] Fix typos --- CHANGELOG.md | 4 ++-- crates/core/src/collection/models.rs | 2 +- crates/core/src/collection/openapi/resolve.rs | 2 +- crates/core/src/http/content_type.rs | 2 +- crates/core/src/template/render.rs | 2 +- crates/tui/src/lib.rs | 2 +- crates/tui/src/message.rs | 2 +- crates/tui/src/view/common/actions.rs | 2 +- crates/tui/src/view/common/modal.rs | 2 +- crates/tui/src/view/common/text_window.rs | 4 ++-- crates/tui/src/view/component/internal.rs | 2 +- crates/tui/src/view/component/recipe_pane/authentication.rs | 2 +- crates/tui/src/view/component/recipe_pane/table.rs | 2 +- crates/tui/src/view/draw.rs | 4 ++-- crates/tui/src/view/event.rs | 4 ++-- crates/tui/src/view/test_util.rs | 4 ++-- crates/tui/src/view/util/highlight.rs | 4 ++-- docs/src/api/request_collection/chain.md | 2 +- docs/src/user_guide/key_concepts.md | 2 +- 19 files changed, 25 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c37ed7d..19e87233 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -129,7 +129,7 @@ This release is focused on improving rendering performance. The TUI should gener ### Fixed - Reduce CPU usage while idling - - Previously, Slumber would re-render every 250ms while idling, which could lead to high CPU usage, dependending on what's on the screen. Now it will only update when changes occur, meaning idle CPU usage will be nearly 0 + - Previously, Slumber would re-render every 250ms while idling, which could lead to high CPU usage, depending on what's on the screen. Now it will only update when changes occur, meaning idle CPU usage will be nearly 0 - Fix backlogged events when renders are slow - If renders are being particular slow, it was previously possible for input events (e.g. repeated scrolling events) to occur faster than the UI could keep up. This would lead to "lock out" behavior, where you'd stop scrolling and it'd take a while for the UI to catch up. - Now, the TUI will skip draws as necessary to keep up with the input queue. In practice the skipping should be hard to notice as it only occurs during rapid TUI movements anyway. @@ -354,7 +354,7 @@ The biggest feature in this release is the ability to browse request history. Sl - Folders can now be collapsed in the recipe list ([#155](https://github.com/LucasPickering/slumber/issues/155)) - Improvements to Insomnia import ([#12](https://github.com/LucasPickering/slumber/issues/12)) - Rename `import-experimental` command to `import` - - It's official now! It's still going to get continuted improvement though + - It's official now! It's still going to get continued improvement though - Show `WARN`/`ERROR` log output for CLI commands - Validate recipe `method` field during deserialization instead of on request init - This means you'll get an error on startup if your method is invalid, instead of when you go to run the request diff --git a/crates/core/src/collection/models.rs b/crates/core/src/collection/models.rs index b5b789e5..10a46c1b 100644 --- a/crates/core/src/collection/models.rs +++ b/crates/core/src/collection/models.rs @@ -324,7 +324,7 @@ pub enum Authentication { Bearer(T), } -/// Template for a request body. `Raw` is the "default" variant, which repesents +/// Template for a request body. `Raw` is the "default" variant, which represents /// a single string (parsed as a template). Other variants can be used for /// convenience, to construct complex bodies in common formats. The HTTP engine /// uses the variant to determine not only how to serialize the body, but also diff --git a/crates/core/src/collection/openapi/resolve.rs b/crates/core/src/collection/openapi/resolve.rs index d471f529..d7642c1a 100644 --- a/crates/core/src/collection/openapi/resolve.rs +++ b/crates/core/src/collection/openapi/resolve.rs @@ -175,7 +175,7 @@ impl ReferenceResolver { fn parse_reference( reference: &str, ) -> Result<&str, ResolveError> { - // This reutrns a pretty unhelpful error if the reference has a file at the + // This returns a pretty unhelpful error if the reference has a file at the // beginning. It's a "valid" reference but we don't know how to parse it. // These references are supposed to be valid URIs so we could use a URI // parser instead. diff --git a/crates/core/src/http/content_type.rs b/crates/core/src/http/content_type.rs index 01ea1690..8a8583f7 100644 --- a/crates/core/src/http/content_type.rs +++ b/crates/core/src/http/content_type.rs @@ -149,7 +149,7 @@ pub trait ResponseContent: Debug + Display + Send + Sync { fn prettify(&self) -> String; /// Convert the content to JSON. JSON is the common language used for - /// querying intenally, so everything needs to be convertible to/from JSON. + /// querying internally, so everything needs to be convertible to/from JSON. fn to_json(&self) -> Cow<'_, serde_json::Value>; /// Facilitate downcasting generic parsed bodies to concrete types for tests diff --git a/crates/core/src/template/render.rs b/crates/core/src/template/render.rs index c951b9a9..6114d5ad 100644 --- a/crates/core/src/template/render.rs +++ b/crates/core/src/template/render.rs @@ -142,7 +142,7 @@ impl Template { ); Ok(RenderedChunk { value: value.clone().into_bytes().into(), - // The overriden value *could* be marked + // The overridden value *could* be marked // sensitive, but we're taking a shortcut and // assuming it isn't sensitive: false, diff --git a/crates/tui/src/lib.rs b/crates/tui/src/lib.rs index 6c7fc1a6..9ecf2160 100644 --- a/crates/tui/src/lib.rs +++ b/crates/tui/src/lib.rs @@ -333,7 +333,7 @@ impl Tui { self.messages_tx.clone() } - /// Spawn a task to listen in the backgrouns for quit signals + /// Spawn a task to listen in the background for quit signals fn listen_for_signals(&self) { let messages_tx = self.messages_tx(); self.spawn(async move { diff --git a/crates/tui/src/message.rs b/crates/tui/src/message.rs index 2c78e0cb..f7b442c3 100644 --- a/crates/tui/src/message.rs +++ b/crates/tui/src/message.rs @@ -147,7 +147,7 @@ pub enum Message { }, /// An empty event to trigger a draw when a template preview is done being /// rendered. This is a bit hacky, but it's an explicit way to tell the TUI - /// "we know something in the view has changed asyncronously". + /// "we know something in the view has changed asynchronously". TemplatePreviewComplete, } diff --git a/crates/tui/src/view/common/actions.rs b/crates/tui/src/view/common/actions.rs index a00a1896..1673034e 100644 --- a/crates/tui/src/view/common/actions.rs +++ b/crates/tui/src/view/common/actions.rs @@ -22,7 +22,7 @@ pub struct ActionsModal { } impl ActionsModal { - /// Create a new actions modal, optionall disabling certain actions based on + /// Create a new actions modal, optional disabling certain actions based on /// some external condition(s). pub fn new(disabled_actions: &[T]) -> Self { let on_submit = move |action: &mut T| { diff --git a/crates/tui/src/view/common/modal.rs b/crates/tui/src/view/common/modal.rs index fe4e278d..2525e2b1 100644 --- a/crates/tui/src/view/common/modal.rs +++ b/crates/tui/src/view/common/modal.rs @@ -58,7 +58,7 @@ impl EventHandler for Box { /// Define how a type can be converted into a modal. Often times, implementors /// of [Modal] will be esoteric types that external consumers who want to open -/// a modal aren't concerned about. This trait provides an adapater layer +/// a modal aren't concerned about. This trait provides an adapter layer /// between the type a user might have (e.g. [anyhow::Error]) and the inner /// modal type (e.g. `ErrorModal`). Inspired by `Iterator` and `IntoIterator`. pub trait IntoModal { diff --git a/crates/tui/src/view/common/text_window.rs b/crates/tui/src/view/common/text_window.rs index deafd719..cde34935 100644 --- a/crates/tui/src/view/common/text_window.rs +++ b/crates/tui/src/view/common/text_window.rs @@ -38,7 +38,7 @@ pub struct TextWindow { offset_y: Cell, /// How wide is the visible text area, excluding gutter/scrollbars? window_width: Cell, - /// How tall is the visible text area, exluding gutter/scrollbars? + /// How tall is the visible text area, excluding gutter/scrollbars? window_height: Cell, } @@ -289,7 +289,7 @@ impl<'a> Draw> for TextWindow { Scrollbar { content_length: text_state.height, offset: self.offset_y.get(), - // We substracted the margin from the text area before, so + // We subtracted the margin from the text area before, so // we have to add that back now margin: props.margins.right, ..Default::default() diff --git a/crates/tui/src/view/component/internal.rs b/crates/tui/src/view/component/internal.rs index eab441d9..655aeda2 100644 --- a/crates/tui/src/view/component/internal.rs +++ b/crates/tui/src/view/component/internal.rs @@ -100,7 +100,7 @@ impl Component { let update = child.update_all(context, event); match update { Update::Propagate(returned) => { - // Keep going to the next child. The propgated event + // Keep going to the next child. The propagated event // *should* just be whatever we passed in, but we have // no way of verifying that event = returned; diff --git a/crates/tui/src/view/component/recipe_pane/authentication.rs b/crates/tui/src/view/component/recipe_pane/authentication.rs index ad9ca8ac..f1358314 100644 --- a/crates/tui/src/view/component/recipe_pane/authentication.rs +++ b/crates/tui/src/view/component/recipe_pane/authentication.rs @@ -167,7 +167,7 @@ enum State { username: RecipeTemplate, /// This field is optional in the actual recipe, but it's a lot easier /// if we just replace `None` with an empty template. This allows the - /// user to edit it and makes rendering easier. It's functionaly + /// user to edit it and makes rendering easier. It's functionally /// equivalent when building the request. password: RecipeTemplate, /// Track which field is selected, for editability diff --git a/crates/tui/src/view/component/recipe_pane/table.rs b/crates/tui/src/view/component/recipe_pane/table.rs index 6af50a47..48632f9c 100644 --- a/crates/tui/src/view/component/recipe_pane/table.rs +++ b/crates/tui/src/view/component/recipe_pane/table.rs @@ -88,7 +88,7 @@ where } } - /// Get the set of disabled/overriden rows for this table + /// Get the set of disabled/overridden rows for this table pub fn to_build_overrides(&self) -> BuildFieldOverrides { self.select .data() diff --git a/crates/tui/src/view/draw.rs b/crates/tui/src/view/draw.rs index 332f1c80..9446303b 100644 --- a/crates/tui/src/view/draw.rs +++ b/crates/tui/src/view/draw.rs @@ -5,7 +5,7 @@ use std::{fmt::Display, ops::Deref}; /// Something that can be drawn onto screen as one or more TUI widgets. /// -/// Conceptually this is bascially part of `Component`, but having it separate +/// Conceptually this is basically part of `Component`, but having it separate /// allows the `Props` associated type. Otherwise, there's no way to make a /// trait object from `Component` across components with different props. /// @@ -20,7 +20,7 @@ pub trait Draw { /// Draw the component into the frame. This generally should not be called /// directly. Instead, use /// [Component::draw](crate::view::component::Component::draw), which - /// will handle additional metadata management before defering to this + /// will handle additional metadata management before deferring to this /// method for the actual draw. fn draw(&self, frame: &mut Frame, props: Props, metadata: DrawMetadata); } diff --git a/crates/tui/src/view/event.rs b/crates/tui/src/view/event.rs index 515e9062..5c30c0a5 100644 --- a/crates/tui/src/view/event.rs +++ b/crates/tui/src/view/event.rs @@ -23,7 +23,7 @@ use tracing::trace; pub trait EventHandler { /// Update the state of *just* this component according to the event. /// Returned outcome indicates whether the event was consumed, or it should - /// be propgated to our parent. Use [EventQueue] to queue subsequent events, + /// be propagated to our parent. Use [EventQueue] to queue subsequent events, /// and the given message sender to queue async messages. fn update(&mut self, _: &mut UpdateContext, event: Event) -> Update { Update::Propagate(event) @@ -192,7 +192,7 @@ impl EventQueue { /// /// This is conceptually different from [crate::Message] in that events are /// restricted to the queue and handled in the main thread. Messages can be -/// queued asyncronously and are used to interact *between* threads. +/// queued asynchronously and are used to interact *between* threads. #[derive(derive_more::Debug)] pub enum Event { /// Input from the user, which may or may not correspond to a bound action. diff --git a/crates/tui/src/view/test_util.rs b/crates/tui/src/view/test_util.rs index 51c9de1b..1c249fd6 100644 --- a/crates/tui/src/view/test_util.rs +++ b/crates/tui/src/view/test_util.rs @@ -137,7 +137,7 @@ where /// /// This similar to [update_draw](Self::update_draw), but doesn't require /// you to queue a new event first. This is helpful in the rare occasions - /// where the UI needs to respond to some asyncronous event, such as a + /// where the UI needs to respond to some asynchronous event, such as a /// callback that would normally be called by the main loop. pub fn drain_draw(&mut self) -> PropagatedEvents { let propagated = self.drain_events(); @@ -255,7 +255,7 @@ impl PropagatedEvents { ) } - /// Get propgated events as a slice + /// Get propagated events as a slice pub fn events(&self) -> &[Event] { &self.0 } diff --git a/crates/tui/src/view/util/highlight.rs b/crates/tui/src/view/util/highlight.rs index 8e40ffb3..5b222ad4 100644 --- a/crates/tui/src/view/util/highlight.rs +++ b/crates/tui/src/view/util/highlight.rs @@ -36,7 +36,7 @@ pub fn highlight(content_type: ContentType, mut text: Text<'_>) -> Text<'_> { .entry(content_type) .or_insert_with(|| get_config(content_type)); - // Each line in the input correponds to one line in the output, so we + // Each line in the input corresponds to one line in the output, so we // can mutate each line inline for line in &mut text.lines { // Join the line into a single string so we can pass it to the @@ -165,7 +165,7 @@ impl HighlightName { } /// Join all text in a line into a single string. For single-span lines (the -/// most common scneario by far), we'll just return the one span without a +/// most common scenario by far), we'll just return the one span without a /// clone. fn join_line<'a>(line: &Line<'a>) -> Cow<'a, str> { if line.spans.is_empty() { diff --git a/docs/src/api/request_collection/chain.md b/docs/src/api/request_collection/chain.md index ac8e5ea8..4bb91bac 100644 --- a/docs/src/api/request_collection/chain.md +++ b/docs/src/api/request_collection/chain.md @@ -60,7 +60,7 @@ password: --- # Prompt the user to select a value from a static list fruit: - souce: !select + source: !select message: Select Fruit options: - apple diff --git a/docs/src/user_guide/key_concepts.md b/docs/src/user_guide/key_concepts.md index 00aa2c08..feac20f0 100644 --- a/docs/src/user_guide/key_concepts.md +++ b/docs/src/user_guide/key_concepts.md @@ -8,7 +8,7 @@ The collection is the main form of configuration. It defines a set of request re ## [Request Recipe](../api/request_collection/request_recipe.md) -A recipe defines which HTTP requests Slumber can make. A recipe generally correponds to one endpoint on an API, although you can create as many recipes per endpoint as you'd like. +A recipe defines which HTTP requests Slumber can make. A recipe generally corresponds to one endpoint on an API, although you can create as many recipes per endpoint as you'd like. ## [Template](./templates.md)