Fix typos (#972)
* Update twenty-twenty Due to engine PR #1566 * Fix typos
3
.codespellrc
Normal file
@ -0,0 +1,3 @@
|
||||
[codespell]
|
||||
ignore-words-list: crate,everytime
|
||||
skip: **/target,node_modules,build
|
5
.github/workflows/ci.yml
vendored
@ -222,6 +222,11 @@ jobs:
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
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:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -104,7 +104,7 @@ To spin up up tauri dev, `yarn install` and `yarn build:wasm-dev` need to have b
|
||||
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.)
|
||||
|
||||
|
@ -68,7 +68,7 @@ async fn login(app: tauri::AppHandle, host: &str) -> Result<String, InvokeError>
|
||||
};
|
||||
|
||||
// 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.
|
||||
tauri::api::shell::open(&app.shell_scope(), auth_uri.secret(), None)
|
||||
.map_err(|e| InvokeError::from_anyhow(e.into()))?;
|
||||
|
@ -92,7 +92,7 @@ export const TextEditor = ({
|
||||
// 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
|
||||
// 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.
|
||||
const kclLSP = useMemo(() => {
|
||||
let plugin = null
|
||||
|
@ -26,7 +26,7 @@ export class Codec {
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: tracing effiency
|
||||
// FIXME: tracing efficiency
|
||||
export class IntoServer
|
||||
extends Queue<Uint8Array>
|
||||
implements AsyncGenerator<Uint8Array, never, void>
|
||||
|
@ -120,7 +120,7 @@ class KclManager {
|
||||
constructor(engineCommandManager: EngineCommandManager) {
|
||||
this.engineCommandManager = engineCommandManager
|
||||
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
|
||||
// anyway since that's filesystem based.
|
||||
const zustandStore = JSON.parse(localStorage.getItem('store') || '{}')
|
||||
@ -262,7 +262,7 @@ class KclManager {
|
||||
format() {
|
||||
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.
|
||||
// but should probably have think about which of the function to keep
|
||||
async updateAst(
|
||||
|
@ -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 { body } = parse(code)
|
||||
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 { body } = parse(code)
|
||||
expect((body[0] as any).declarations[0].init).toEqual({
|
||||
|
@ -2,5 +2,5 @@ The std is as expected, tools that are provided with the language.
|
||||
|
||||
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.
|
||||
|
@ -664,7 +664,7 @@ export class EngineCommandManager {
|
||||
},
|
||||
})
|
||||
|
||||
// Inisialize the planes.
|
||||
// Initialize the planes.
|
||||
this.initPlanes().then(() => {
|
||||
// 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.
|
||||
@ -887,7 +887,7 @@ export class EngineCommandManager {
|
||||
}
|
||||
endSession() {
|
||||
// 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.
|
||||
Object.entries(this.artifactMap).forEach(([id, artifact]) => {
|
||||
const artifactTypesToDelete: ArtifactMap[string]['commandType'][] = [
|
||||
|
@ -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 part001 = startSketchOn('XY')`,
|
||||
` |> startProfileAt([0, 0], %)`,
|
||||
@ -178,7 +178,7 @@ describe('testing swaping out sketch calls with xLine/xLineTo', () => {
|
||||
constraintType: 'horizontal',
|
||||
})
|
||||
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)
|
||||
// new line should start at the same place as the old line
|
||||
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
|
||||
const variablesExampleArr = [
|
||||
`const lineX = -1`,
|
||||
|
@ -108,7 +108,7 @@ const part001 = startSketchOn('XY')
|
||||
|> line([myVar, 1], %) // ln-should use legLen for y
|
||||
|> line([myVar, -1], %) // ln-legLen but negative
|
||||
|> 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
|
||||
|> angledLineOfXLength([54, 2.35], %) // ln-should be transformed to angledLine
|
||||
|> angledLineOfXLength([50, myVar], %) // ln-should use legAngX to calculate angle
|
||||
@ -163,7 +163,7 @@ const part001 = startSketchOn('XY')
|
||||
-legLen(segLen('seg01', %), myVar)
|
||||
], %) // ln-legLen but negative
|
||||
|> 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([54, segLen('seg01', %)], %) // ln-should be transformed to angledLine
|
||||
|> angledLineOfXLength([
|
||||
@ -471,7 +471,7 @@ async function helperThing(
|
||||
}
|
||||
|
||||
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 baseThick = 1
|
||||
const armThick = 0.5
|
||||
|
@ -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
|
||||
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
|
||||
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.
|
||||
|
||||
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
|
||||
"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
|
||||
selections is xstate context
|
||||
3 and 4) The XState handler for the above uses handleSelectionBatch and
|
||||
@ -303,7 +303,7 @@ export function resetAndSetEngineEntitySelectionCmds(
|
||||
selections: SelectionToEngine[]
|
||||
): Models['WebSocketRequest_type'][] {
|
||||
if (!engineCommandManager.engineConnection?.isReady()) {
|
||||
console.log('engine connection isnt ready')
|
||||
console.log('engine connection is not ready')
|
||||
return []
|
||||
}
|
||||
return [
|
||||
|
@ -664,8 +664,8 @@ export const modelingMachine = createMachine(
|
||||
on: {
|
||||
Cancel: {
|
||||
target: 'idle',
|
||||
// TODO what if we're existing extrude equiped, should these actions still be fired?
|
||||
// mabye cancel needs to have a guard for if else logic?
|
||||
// TODO what if we're existing extrude equipped, should these actions still be fired?
|
||||
// maybe cancel needs to have a guard for if else logic?
|
||||
actions: [
|
||||
'edit_mode_exit',
|
||||
'default_camera_disable_sketch_mode',
|
||||
|
@ -784,7 +784,7 @@ pub enum NonCodeValue {
|
||||
/// 1 + 1
|
||||
/// ```
|
||||
/// 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`.
|
||||
BlockComment {
|
||||
value: String,
|
||||
|
@ -193,7 +193,7 @@ pub trait StdLibFn: std::fmt::Debug + Send + Sync {
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
SignatureHelp {
|
||||
|
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 77 KiB |
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 94 KiB |
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 84 KiB |
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 77 KiB |
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |