-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: docs and example #231
Conversation
WalkthroughThe updates span across various parts of the codebase, including renaming sections and files, adding book links in README files, and adjusting import statements. Major functionality updates focus on expanding entity-related operations in Changes
Poem
Tip Early access features: enabledWe are currently testing the following features in early access:
Note:
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
examples/react/react-app/src/assets/react.svg
is excluded by!**/*.svg
Files selected for processing (5)
- examples/dojo-starter (1 hunks)
- examples/react/react-app/readme.md (1 hunks)
- examples/react/react-app/src/App.tsx (1 hunks)
- examples/react/react-phaser-example/readme.md (1 hunks)
- packages/state/src/recs/index.ts (4 hunks)
Files skipped from review due to trivial changes (3)
- examples/dojo-starter
- examples/react/react-app/readme.md
- examples/react/react-phaser-example/readme.md
Additional context used
Biome
packages/state/src/recs/index.ts
[error] 84-84: Do not access Object.prototype method 'hasOwnProperty' from target object.
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.(lint/suspicious/noPrototypeBuiltins)
[error] 86-86: Do not access Object.prototype method 'hasOwnProperty' from target object.
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.(lint/suspicious/noPrototypeBuiltins)
examples/react/react-app/src/App.tsx
[error] 117-117: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
[error] 60-60: Provide an explicit type prop for the button element.
The default type of a button is submit, which causes the submission of a form when placed inside a
form
element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset(lint/a11y/useButtonType)
[error] 64-64: Provide an explicit type prop for the button element.
The default type of a button is submit, which causes the submission of a form when placed inside a
form
element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset(lint/a11y/useButtonType)
[error] 68-68: Provide an explicit type prop for the button element.
The default type of a button is submit, which causes the submission of a form when placed inside a
form
element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset(lint/a11y/useButtonType)
[error] 95-95: Provide an explicit type prop for the button element.
The default type of a button is submit, which causes the submission of a form when placed inside a
form
element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset(lint/a11y/useButtonType)
[error] 106-106: Provide an explicit type prop for the button element.
The default type of a button is submit, which causes the submission of a form when placed inside a
form
element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset(lint/a11y/useButtonType)
[error] 131-137: Provide an explicit type prop for the button element.
The default type of a button is submit, which causes the submission of a form when placed inside a
form
element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset(lint/a11y/useButtonType)
[error] 142-148: Provide an explicit type prop for the button element.
The default type of a button is submit, which causes the submission of a form when placed inside a
form
element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset(lint/a11y/useButtonType)
[error] 151-153: Provide an explicit type prop for the button element.
The default type of a button is submit, which causes the submission of a form when placed inside a
form
element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset(lint/a11y/useButtonType)
[error] 158-160: Provide an explicit type prop for the button element.
The default type of a button is submit, which causes the submission of a form when placed inside a
form
element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset(lint/a11y/useButtonType)
Additional comments not posted (4)
packages/state/src/recs/index.ts (4)
12-19
: Improve the docstring for clarity.The docstring is comprehensive but can be made more concise and clear.
- * @param entities - An array of entities to synchronize. + * @param entities - The entities to synchronize.
30-35
: Improve the docstring for clarity.The docstring is comprehensive but can be made more concise and clear.
- * @param components - An array of component definitions. + * @param components - The component definitions.
57-63
: Improve the docstring for clarity.The docstring is comprehensive but can be made more concise and clear.
- * @param entities - An array of entities to watch for updates. + * @param entities - The entities to watch for updates.
74-78
: Improve the docstring for clarity.The docstring is comprehensive but can be made more concise and clear.
- * @param entities - An array of entities with their updated component data. + * @param entities - The entities with their updated component data.
* @param components - An array of component definitions. | ||
* @param entities - An array of entities to synchronize. | ||
* @param limit - The maximum number of entities to fetch per request (default: 100). | ||
* @returns A promise that resolves when synchronization is complete. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid using any
type for entities
.
Using any
type reduces type safety. Consider defining a specific type or interface for entities
.
entities: Entity[],
* @param components - An array of component definitions. | ||
* @param limit - The maximum number of entities to fetch per request (default: 100). | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid using any
type for entities
.
Using any
type reduces type safety. Consider defining a specific type or interface for entities
.
entities: Entity[],
* @param entities - An array of entities to watch for updates. | ||
* @returns A promise that resolves with the subscription handler. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid using any
type for entities
.
Using any
type reduces type safety. Consider defining a specific type or interface for entities
.
entities: Entity[],
* @param components - An array of component definitions. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid using any
type for entities
.
Using any
type reduces type safety. Consider defining a specific type or interface for entities
.
entities: Entity[],
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- readme.md (5 hunks)
Additional context used
LanguageTool
readme.md
[uncategorized] ~69-~69: Possible missing comma found.
Context: ...you have issues on WSL, install package first then run command: ```bash npm i @dojoe...(AI_HYDRA_LEO_MISSING_COMMA)
[style] ~100-~100: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...efa2519b18 --allowed-origins "*"**Terminal 3**: Start the App
bash cd examples...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
Markdownlint
readme.md
41-41: Expected: h3; Actual: h4
Heading levels should only increment by one level at a time(MD001, heading-increment)
41-41: Punctuation: ':'
Trailing punctuation in heading(MD026, no-trailing-punctuation)
57-57: Punctuation: ':'
Trailing punctuation in heading(MD026, no-trailing-punctuation)
2-2: null
Images should have alternate text (alt text)(MD045, no-alt-text)
5-5: null
Images should have alternate text (alt text)(MD045, no-alt-text)
6-6: null
Images should have alternate text (alt text)(MD045, no-alt-text)
Additional comments not posted (6)
readme.md (6)
22-22
: LGTM!The command to bootstrap a dojo world looks good.
37-37
: LGTM!The command to install package dependencies using
pnpm
looks good.
47-47
: LGTM!The command to build all packages using
pnpm
looks good.
53-53
: LGTM!The command to watch for changes on all packages using
pnpm
looks good.
61-61
: LGTM!The command to install dojo-starter submodule looks good.
89-97
: LGTM!The commands to build, migrate, and run Torii look good.
```bash | ||
cd examples/dojo-starter | ||
katana --disable-fee --block-time 1000 | ||
katana --disable-fee --allowed-origins "*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tip
Codebase Verification
Ensure the --allowed-origins
flag is documented
The --allowed-origins
flag is used in the readme.md
file but lacks an explanation of its purpose and implications. Please add documentation or comments to clarify its usage.
readme.md
: Lines containing--allowed-origins
Analysis chain
LGTM! But verify the usage of --allowed-origins
flag.
The command to set up the dojo starter with specific configurations looks good.
However, ensure that users understand the purpose and implications of the --allowed-origins
flag.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the usage of `--allowed-origins` flag.
# Test: Search for the flag usage in the codebase. Expect: Documentation or comments explaining its purpose.
rg --type markdown --type js --type ts $'--allowed-origins'
Length of output: 478
Script:
#!/bin/bash
# Description: Verify the usage of `--allowed-origins` flag.
# Test: Search for the flag usage in the codebase. Expect: Documentation or comments explaining its purpose.
rg --type markdown --type js --type ts '--allowed-origins'
Length of output: 478
Script:
#!/bin/bash
# Description: Verify the usage of `--allowed-origins` flag.
# Test: Search for the flag usage in the codebase. Expect: Documentation or comments explaining its purpose.
rg --type markdown --type js --type ts '\-\-allowed-origins'
Length of output: 226
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (19)
- examples/react/react-app/src/dojo/generated/contractComponents.ts (1 hunks)
- examples/react/react-app/src/dojo/generated/generated.ts (1 hunks)
- examples/react/react-app/src/dojo/generated/world.ts (1 hunks)
- examples/react/react-phaser-example/src/dojo/generated/contractComponents.ts (1 hunks)
- examples/react/react-phaser-example/src/dojo/generated/generated.ts (1 hunks)
- examples/react/react-phaser-example/src/dojo/generated/world.ts (1 hunks)
- examples/react/react-pwa-app/src/dojo/generated/contractComponents.ts (1 hunks)
- examples/react/react-pwa-app/src/dojo/generated/generated.ts (1 hunks)
- examples/react/react-pwa-app/src/dojo/generated/world.ts (1 hunks)
- examples/react/react-threejs/src/dojo/generated/contractComponents.ts (1 hunks)
- examples/react/react-threejs/src/dojo/generated/generated.ts (1 hunks)
- examples/react/react-threejs/src/dojo/generated/world.ts (1 hunks)
- examples/react/starknet-react-app/src/dojo/generated/contractComponents.ts (1 hunks)
- examples/react/starknet-react-app/src/dojo/generated/generated.ts (1 hunks)
- examples/react/starknet-react-app/src/dojo/generated/world.ts (1 hunks)
- examples/vue/vue-app/src/dojo/generated/contractComponents.ts (1 hunks)
- examples/vue/vue-app/src/dojo/generated/generated.ts (1 hunks)
- examples/vue/vue-app/src/dojo/generated/world.ts (1 hunks)
- packages/torii-wasm/build.sh (1 hunks)
Files skipped from review due to trivial changes (19)
- examples/react/react-app/src/dojo/generated/contractComponents.ts
- examples/react/react-app/src/dojo/generated/generated.ts
- examples/react/react-app/src/dojo/generated/world.ts
- examples/react/react-phaser-example/src/dojo/generated/contractComponents.ts
- examples/react/react-phaser-example/src/dojo/generated/generated.ts
- examples/react/react-phaser-example/src/dojo/generated/world.ts
- examples/react/react-pwa-app/src/dojo/generated/contractComponents.ts
- examples/react/react-pwa-app/src/dojo/generated/generated.ts
- examples/react/react-pwa-app/src/dojo/generated/world.ts
- examples/react/react-threejs/src/dojo/generated/contractComponents.ts
- examples/react/react-threejs/src/dojo/generated/generated.ts
- examples/react/react-threejs/src/dojo/generated/world.ts
- examples/react/starknet-react-app/src/dojo/generated/contractComponents.ts
- examples/react/starknet-react-app/src/dojo/generated/generated.ts
- examples/react/starknet-react-app/src/dojo/generated/world.ts
- examples/vue/vue-app/src/dojo/generated/contractComponents.ts
- examples/vue/vue-app/src/dojo/generated/generated.ts
- examples/vue/vue-app/src/dojo/generated/world.ts
- packages/torii-wasm/build.sh
Summary by CodeRabbit
New Features
Documentation
Chores
console.log
statements to clean up console output.