-
Notifications
You must be signed in to change notification settings - Fork 3
Repo save file fix #278
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
Repo save file fix #278
Conversation
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.
Pull request overview
This PR refactors the RepoResource.saveFile() method to simplify file saving logic by always deleting and recreating files, rather than updating them in place. The changes propagate through the codebase to remove now-redundant explicit file deletion calls.
Key changes:
- Simplified
saveFileInternal()to always delete existing files before creating new ones - Removed explicit thumbnail deletion in example script since
saveFile()now handles it - Enabled direct text input in PathPicker component
- Fixed import ordering in Script.java
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| core/src/main/java/dev/vml/es/acm/core/repo/RepoResource.java | Refactored saveFileInternal() to delete-then-create approach, simplifying the conditional logic for file creation vs. update |
| ui.content.example/src/main/content/jcr_root/conf/acm/settings/script/manual/example/ACME-202_page-thumbnail.groovy | Removed explicit thumbnail deletion since saveFile() now handles it internally |
| ui.frontend/src/components/PathPicker.tsx | Added onChange handler to TextField to allow manual path input |
| core/src/main/java/dev/vml/es/acm/core/script/Script.java | Reordered imports alphabetically (Executable before ExecutableMetadata) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
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.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
Co-authored-by: Copilot <[email protected]>
fixes #221