Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
deining committed Nov 2, 2024
1 parent 5a8ce26 commit a5b0180
Show file tree
Hide file tree
Showing 19 changed files with 25 additions and 25 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/collection/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ pub enum Authentication<T = Template> {
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
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/collection/openapi/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ impl ReferenceResolver {
fn parse_reference<T: ComponentKind>(
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.
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/http/content_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,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
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/template/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion crates/tui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,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 {
Expand Down
2 changes: 1 addition & 1 deletion crates/tui/src/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,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,
}

Expand Down
2 changes: 1 addition & 1 deletion crates/tui/src/view/common/actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub struct ActionsModal<T: FixedSelect> {
}

impl<T: FixedSelect> ActionsModal<T> {
/// 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| {
Expand Down
2 changes: 1 addition & 1 deletion crates/tui/src/view/common/modal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl EventHandler for Box<dyn Modal> {

/// 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 {
Expand Down
4 changes: 2 additions & 2 deletions crates/tui/src/view/common/text_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub struct TextWindow {
offset_y: Cell<usize>,
/// How wide is the visible text area, excluding gutter/scrollbars?
window_width: Cell<usize>,
/// How tall is the visible text area, exluding gutter/scrollbars?
/// How tall is the visible text area, excluding gutter/scrollbars?
window_height: Cell<usize>,
}

Expand Down Expand Up @@ -289,7 +289,7 @@ impl<'a> Draw<TextWindowProps<'a>> 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()
Expand Down
2 changes: 1 addition & 1 deletion crates/tui/src/view/component/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ impl<T> Component<T> {
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/tui/src/view/component/recipe_pane/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions crates/tui/src/view/draw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand All @@ -20,7 +20,7 @@ pub trait Draw<Props = ()> {
/// 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);
}
Expand Down
4 changes: 2 additions & 2 deletions crates/tui/src/view/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions crates/tui/src/view/test_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions crates/tui/src/view/util/highlight.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion docs/src/api/request_collection/chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/src/user_guide/key_concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit a5b0180

Please sign in to comment.