Fix typos (#972)

* Update twenty-twenty

Due to engine PR #1566

* Fix typos
This commit is contained in:
Adam Chalmers
2023-11-01 17:34:54 -05:00
committed by GitHub
parent 2e419907e6
commit fdbfd0c4b6
31 changed files with 32 additions and 24 deletions

3
.codespellrc Normal file
View File

@ -0,0 +1,3 @@
[codespell]
ignore-words-list: crate,everytime
skip: **/target,node_modules,build

View File

@ -222,6 +222,11 @@ jobs:
if: matrix.os == 'ubuntu-latest' if: matrix.os == 'ubuntu-latest'
run: xvfb-run yarn test:e2e run: xvfb-run yarn test:e2e
typos: # Edit .codespellrc to change this CI job's configuration.
runs-on: ubuntu-latest
steps:
- name: Check for typos
uses: codespell-project/actions-codespell@v2
publish-apps-release: publish-apps-release:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@ -104,7 +104,7 @@ To spin up up tauri dev, `yarn install` and `yarn build:wasm-dev` need to have b
yarn tauri dev yarn tauri dev
``` ```
Will spin up the web app before opening up the tauri dev desktop app. Note that it's probably a good idea to close the browser tab that gets opened since at the time of writting they can conflict. Will spin up the web app before opening up the tauri dev desktop app. Note that it's probably a good idea to close the browser tab that gets opened since at the time of writing they can conflict.
The dev instance automatically opens up the browser devtools which can be disabled by [commenting it out](https://github.com/KittyCAD/modeling-app/blob/main/src-tauri/src/main.rs#L92.) The dev instance automatically opens up the browser devtools which can be disabled by [commenting it out](https://github.com/KittyCAD/modeling-app/blob/main/src-tauri/src/main.rs#L92.)

View File

@ -68,7 +68,7 @@ async fn login(app: tauri::AppHandle, host: &str) -> Result<String, InvokeError>
}; };
// Open the system browser with the auth_uri. // Open the system browser with the auth_uri.
// We do this in the browser and not a seperate window because we want 1password and // We do this in the browser and not a separate window because we want 1password and
// other crap to work well. // other crap to work well.
tauri::api::shell::open(&app.shell_scope(), auth_uri.secret(), None) tauri::api::shell::open(&app.shell_scope(), auth_uri.secret(), None)
.map_err(|e| InvokeError::from_anyhow(e.into()))?; .map_err(|e| InvokeError::from_anyhow(e.into()))?;

View File

@ -92,7 +92,7 @@ export const TextEditor = ({
// Here we initialize the plugin which will start the client. // Here we initialize the plugin which will start the client.
// When we have multi-file support the name of the file will be a dep of // When we have multi-file support the name of the file will be a dep of
// this use memo, as well as the directory structure, which I think is // this use memo, as well as the directory structure, which I think is
// a good setup becuase it will restart the client but not the server :) // a good setup because it will restart the client but not the server :)
// We do not want to restart the server, its just wasteful. // We do not want to restart the server, its just wasteful.
const kclLSP = useMemo(() => { const kclLSP = useMemo(() => {
let plugin = null let plugin = null

View File

@ -26,7 +26,7 @@ export class Codec {
} }
} }
// FIXME: tracing effiency // FIXME: tracing efficiency
export class IntoServer export class IntoServer
extends Queue<Uint8Array> extends Queue<Uint8Array>
implements AsyncGenerator<Uint8Array, never, void> implements AsyncGenerator<Uint8Array, never, void>

View File

@ -120,7 +120,7 @@ class KclManager {
constructor(engineCommandManager: EngineCommandManager) { constructor(engineCommandManager: EngineCommandManager) {
this.engineCommandManager = engineCommandManager this.engineCommandManager = engineCommandManager
const storedCode = localStorage.getItem(PERSIST_CODE_TOKEN) const storedCode = localStorage.getItem(PERSIST_CODE_TOKEN)
// TODO #819 remove zustand persistance logic in a few months // TODO #819 remove zustand persistence logic in a few months
// short term migration, shouldn't make a difference for tauri app users // short term migration, shouldn't make a difference for tauri app users
// anyway since that's filesystem based. // anyway since that's filesystem based.
const zustandStore = JSON.parse(localStorage.getItem('store') || '{}') const zustandStore = JSON.parse(localStorage.getItem('store') || '{}')
@ -262,7 +262,7 @@ class KclManager {
format() { format() {
this.code = recast(parse(kclManager.code)) this.code = recast(parse(kclManager.code))
} }
// There's overlapping resposibility between updateAst and executeAst. // There's overlapping responsibility between updateAst and executeAst.
// updateAst was added as it was used a lot before xState migration so makes the port easier. // updateAst was added as it was used a lot before xState migration so makes the port easier.
// but should probably have think about which of the function to keep // but should probably have think about which of the function to keep
async updateAst( async updateAst(

View File

@ -1345,7 +1345,7 @@ describe('nests binary expressions correctly', () => {
], ],
}) })
}) })
it('should nest properly with two opperators of equal precedence', () => { it('should nest properly with two operators of equal precedence', () => {
const code = `const yo = 1 + 2 - 3` const code = `const yo = 1 + 2 - 3`
const { body } = parse(code) const { body } = parse(code)
expect((body[0] as any).declarations[0].init).toEqual({ expect((body[0] as any).declarations[0].init).toEqual({
@ -1382,7 +1382,7 @@ describe('nests binary expressions correctly', () => {
}, },
}) })
}) })
it('should nest properly with two opperators of equal (but higher) precedence', () => { it('should nest properly with two operators of equal (but higher) precedence', () => {
const code = `const yo = 1 * 2 / 3` const code = `const yo = 1 * 2 / 3`
const { body } = parse(code) const { body } = parse(code)
expect((body[0] as any).declarations[0].init).toEqual({ expect((body[0] as any).declarations[0].init).toEqual({

View File

@ -2,5 +2,5 @@ The std is as expected, tools that are provided with the language.
For this language that means functions. For this language that means functions.
However because programatically changing the source code is a first class citizen in this lang, there needs to be helpes for adding and modifying these function calls, However because programmatically changing the source code is a first class citizen in this lang, there needs to be helpers for adding and modifying these function calls,
So it makes sense to group some of these together. So it makes sense to group some of these together.

View File

@ -664,7 +664,7 @@ export class EngineCommandManager {
}, },
}) })
// Inisialize the planes. // Initialize the planes.
this.initPlanes().then(() => { this.initPlanes().then(() => {
// We execute the code here to make sure if the stream was to // We execute the code here to make sure if the stream was to
// restart in a session, we want to make sure to execute the code. // restart in a session, we want to make sure to execute the code.
@ -887,7 +887,7 @@ export class EngineCommandManager {
} }
endSession() { endSession() {
// TODO: instead of sending a single command with `object_ids: Object.keys(this.artifactMap)` // TODO: instead of sending a single command with `object_ids: Object.keys(this.artifactMap)`
// we need to loop over them each individualy because if the engine doesn't recognise a single // we need to loop over them each individually because if the engine doesn't recognise a single
// id the whole command fails. // id the whole command fails.
Object.entries(this.artifactMap).forEach(([id, artifact]) => { Object.entries(this.artifactMap).forEach(([id, artifact]) => {
const artifactTypesToDelete: ArtifactMap[string]['commandType'][] = [ const artifactTypesToDelete: ArtifactMap[string]['commandType'][] = [

View File

@ -50,7 +50,7 @@ async function testingSwapSketchFnCall({
} }
} }
describe('testing swaping out sketch calls with xLine/xLineTo', () => { describe('testing swapping out sketch calls with xLine/xLineTo', () => {
const bigExampleArr = [ const bigExampleArr = [
`const part001 = startSketchOn('XY')`, `const part001 = startSketchOn('XY')`,
` |> startProfileAt([0, 0], %)`, ` |> startProfileAt([0, 0], %)`,
@ -178,7 +178,7 @@ describe('testing swaping out sketch calls with xLine/xLineTo', () => {
constraintType: 'horizontal', constraintType: 'horizontal',
}) })
const expectedLine = "xLine({ length: -0.86, tag: 'abc4' }, %)" const expectedLine = "xLine({ length: -0.86, tag: 'abc4' }, %)"
// hmm "-0.86" is correct since the angle is 104, but need to make sure this is compatiable `-myVar` // hmm "-0.86" is correct since the angle is 104, but need to make sure this is compatible `-myVar`
expect(newCode).toContain(expectedLine) expect(newCode).toContain(expectedLine)
// new line should start at the same place as the old line // new line should start at the same place as the old line
expect(originalRange[0]).toBe(newCode.indexOf(expectedLine)) expect(originalRange[0]).toBe(newCode.indexOf(expectedLine))
@ -268,7 +268,7 @@ describe('testing swaping out sketch calls with xLine/xLineTo', () => {
}) })
}) })
describe('testing swaping out sketch calls with xLine/xLineTo while keeping variable/identifiers intact', () => { describe('testing swapping out sketch calls with xLine/xLineTo while keeping variable/identifiers intact', () => {
// Enable rotations #152 // Enable rotations #152
const variablesExampleArr = [ const variablesExampleArr = [
`const lineX = -1`, `const lineX = -1`,

View File

@ -108,7 +108,7 @@ const part001 = startSketchOn('XY')
|> line([myVar, 1], %) // ln-should use legLen for y |> line([myVar, 1], %) // ln-should use legLen for y
|> line([myVar, -1], %) // ln-legLen but negative |> line([myVar, -1], %) // ln-legLen but negative
|> line([-0.62, -1.54], %) // ln-should become angledLine |> line([-0.62, -1.54], %) // ln-should become angledLine
|> angledLine([myVar, 1.04], %) // ln-use segLen for secound arg |> angledLine([myVar, 1.04], %) // ln-use segLen for second arg
|> angledLine([45, 1.04], %) // ln-segLen again |> angledLine([45, 1.04], %) // ln-segLen again
|> angledLineOfXLength([54, 2.35], %) // ln-should be transformed to angledLine |> angledLineOfXLength([54, 2.35], %) // ln-should be transformed to angledLine
|> angledLineOfXLength([50, myVar], %) // ln-should use legAngX to calculate angle |> angledLineOfXLength([50, myVar], %) // ln-should use legAngX to calculate angle
@ -163,7 +163,7 @@ const part001 = startSketchOn('XY')
-legLen(segLen('seg01', %), myVar) -legLen(segLen('seg01', %), myVar)
], %) // ln-legLen but negative ], %) // ln-legLen but negative
|> angledLine([-112, segLen('seg01', %)], %) // ln-should become angledLine |> angledLine([-112, segLen('seg01', %)], %) // ln-should become angledLine
|> angledLine([myVar, segLen('seg01', %)], %) // ln-use segLen for secound arg |> angledLine([myVar, segLen('seg01', %)], %) // ln-use segLen for second arg
|> angledLine([45, segLen('seg01', %)], %) // ln-segLen again |> angledLine([45, segLen('seg01', %)], %) // ln-segLen again
|> angledLine([54, segLen('seg01', %)], %) // ln-should be transformed to angledLine |> angledLine([54, segLen('seg01', %)], %) // ln-should be transformed to angledLine
|> angledLineOfXLength([ |> angledLineOfXLength([
@ -471,7 +471,7 @@ async function helperThing(
} }
describe('testing getConstraintLevelFromSourceRange', () => { describe('testing getConstraintLevelFromSourceRange', () => {
it('should devide up lines into free, partial and fully contrained', () => { it('should divide up lines into free, partial and fully contrained', () => {
const code = `const baseLength = 3 const code = `const baseLength = 3
const baseThick = 1 const baseThick = 1
const armThick = 0.5 const armThick = 0.5

View File

@ -15,7 +15,7 @@ app needs these selections to be based on cursors, therefore the app must
be in control of selections. On top of that because we need to set cursor be in control of selections. On top of that because we need to set cursor
positions in code-mirror for selections, both from app logic, and still positions in code-mirror for selections, both from app logic, and still
allow the user to add multiple cursors like a normal editor, it's best to allow the user to add multiple cursors like a normal editor, it's best to
let code mirror control cursor positions and assosiate those source ranges let code mirror control cursor positions and associate those source ranges
with entity ids from code-mirror events later. with entity ids from code-mirror events later.
So it's a lot of back and forth. conceptually the back and forth is: So it's a lot of back and forth. conceptually the back and forth is:
@ -43,7 +43,7 @@ In detail:
1) Click commands are mostly sent in stream.tsx search for 1) Click commands are mostly sent in stream.tsx search for
"select_with_point" "select_with_point"
2) The handler for when the engine sends back entitiy ids calls 2) The handler for when the engine sends back entity ids calls
getEventForSelectWithPoint, it fires an XState event to update our getEventForSelectWithPoint, it fires an XState event to update our
selections is xstate context selections is xstate context
3 and 4) The XState handler for the above uses handleSelectionBatch and 3 and 4) The XState handler for the above uses handleSelectionBatch and
@ -303,7 +303,7 @@ export function resetAndSetEngineEntitySelectionCmds(
selections: SelectionToEngine[] selections: SelectionToEngine[]
): Models['WebSocketRequest_type'][] { ): Models['WebSocketRequest_type'][] {
if (!engineCommandManager.engineConnection?.isReady()) { if (!engineCommandManager.engineConnection?.isReady()) {
console.log('engine connection isnt ready') console.log('engine connection is not ready')
return [] return []
} }
return [ return [

View File

@ -664,8 +664,8 @@ export const modelingMachine = createMachine(
on: { on: {
Cancel: { Cancel: {
target: 'idle', target: 'idle',
// TODO what if we're existing extrude equiped, should these actions still be fired? // TODO what if we're existing extrude equipped, should these actions still be fired?
// mabye cancel needs to have a guard for if else logic? // maybe cancel needs to have a guard for if else logic?
actions: [ actions: [
'edit_mode_exit', 'edit_mode_exit',
'default_camera_disable_sketch_mode', 'default_camera_disable_sketch_mode',

View File

@ -784,7 +784,7 @@ pub enum NonCodeValue {
/// 1 + 1 /// 1 + 1
/// ``` /// ```
/// Now this is important. The block comment is attached to the next line. /// Now this is important. The block comment is attached to the next line.
/// This is always the case. Also the block comment doesnt have a new line above it. /// This is always the case. Also the block comment doesn't have a new line above it.
/// If it did it would be a `NewLineBlockComment`. /// If it did it would be a `NewLineBlockComment`.
BlockComment { BlockComment {
value: String, value: String,

View File

@ -193,7 +193,7 @@ pub trait StdLibFn: std::fmt::Debug + Send + Sync {
} }
fn to_signature_help(&self) -> SignatureHelp { fn to_signature_help(&self) -> SignatureHelp {
// Fill this in based on the current positon of the cursor. // Fill this in based on the current position of the cursor.
let active_parameter = None; let active_parameter = None;
SignatureHelp { SignatureHelp {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB