Organize physics usage examples into subfolders#705
Organize physics usage examples into subfolders#705Nadiazahan wants to merge 2 commits intothoth-tech:mainfrom
Conversation
❌ Deploy Preview for splashkit failed.
|
|
Hi, I reviewed your PR and it looks well structured.
I also checked the file movements and everything seems to be correctly organised without missing files. I noticed the checks are failing, but this seems related to the build or deployment rather than the file reorganisation itself. One small suggestion:
Overall, this is a clear and useful improvement to the project. Good work! |
rachelpatrao
left a comment
There was a problem hiding this comment.
Hi, I reviewed your PR and overall it is well structured and a clear improvement to the project.
The reorganisation of the physics usage examples into separate subfolders significantly improves readability and navigation. Grouping all related files (code, assets, and descriptions) within each example folder makes it much easier to understand and maintain. The update to the 0-README.md is also helpful and clearly explains the new structure.
I verified the file movements and everything appears to be correctly organised, with no missing files.
However, I noticed that the build checks are currently failing. This seems to be due to the existing scripts still expecting a flat directory structure. Since the files have now been moved into subfolders, the build process is unable to locate them, which is causing the error.
To fix this, the scripts (such as api-pages-script.cjs) will need to be updated to support nested folders when reading usage examples. Alternatively, the file paths being referenced in the scripts need to be adjusted to reflect the new structure. specifically look at the functions getAllFiles(), getUsageExampleContent(), getUsageExampleImports()
One additional suggestion is to maintain consistent naming conventions. Currently, folder names use hyphens while file names use underscores, so aligning these would improve clarity and consistency.
Next steps:
Update the build scripts to correctly read files from subfolders
Ensure file paths match the new directory structure
Standardise naming conventions (hyphens vs underscores)
Please run npm run build locally to confirm your changes
Overall, this is a valuable structural improvement, and with the build issue resolved, it will integrate well into the project. Good work!
|
Thanks for the detailed feedback. I’ve updated the script to support nested usage-example folders and fixed the path handling so files in subdirectories are now read correctly. I also standardised the naming in the physics usage examples for consistency. I ran npm run build locally and the usage example scraping and API documentation generation completed successfully. |
rachelpatrao
left a comment
There was a problem hiding this comment.
Hi, I reviewed your PR and overall it is well structured and a clear improvement to the project.
The reorganisation of the physics usage examples into separate subfolders significantly improves readability and navigation. Grouping all related files within each example folder makes it much easier to understand and maintain.
I verified the file movements and everything appears to be correctly organised, with no missing files.
The previous build issue related to file paths has now been resolved, and the project builds successfully with the updated folder structure. The current build failure appears to be due to unrelated link validation errors in other parts of the project, rather than this PR.
Approving this pr!
Description
This pull request reorganises the physics usage examples into separate subfolders to improve structure and readability.
Previously, all physics example files were stored in a single directory. This made it harder to navigate and identify which files belonged to each example. This update groups each example into its own folder based on type.
The following subfolders were created:
Each subfolder now contains all related files for that example, including code files, images, text descriptions, and resource files.
The
0-README.mdfile has also been updated to reflect the new structure and guide contributors.Type of change
How Has This Been Tested?
Folders and Files Added/Modified
Added:
Modified:
Additional Notes
This change only restructures existing files and updates documentation. No functionality or example code was modified.