-
Notifications
You must be signed in to change notification settings - Fork 92
Respect cfg.packageRoot
when creating text files using UI
#4397
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4397 +/- ##
==========================================
+ Coverage 38.69% 38.72% +0.02%
==========================================
Files 795 795
Lines 35208 35211 +3
Branches 5384 5384
==========================================
+ Hits 13625 13636 +11
+ Misses 21037 21029 -8
Partials 546 546
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
PR Summary
This PR refactors file path handling in the UI to properly support package root prefixing when creating and editing files in packages, introducing a new s3paths.canonicalKey
function to centralize path generation logic.
- Hardcoded
packageRoot
value 'r/o/o/t' inConfig.ts
overrides configuration, potentially breaking custom package root setups - New
canonicalKey
function ins3paths.ts
needs more comprehensive test coverage for edge cases - Refactored
FileEditor
routes to use hooks pattern, improving code organization but increasing complexity - Simplified file path handling in
PackageCreationForm
andUploads
components by usingcanonicalKey
instead of manual path manipulation - Changed
useAddFileInPackage
anduseEditFileInPackage
hooks to return functions that accept paths, supporting better package root handling
10 file(s) reviewed, 6 comment(s)
Edit PR Review Bot Settings | Greptile
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.
mostly lgtm, some nitpicks inline
Co-authored-by: Alexei Mochalov <[email protected]>
…:quiltdata/quilt into package-root-create-file-from-catalog-ui
cfg.packageRoot
definedcfg.packageRoot
config property when creating text files using UI
cfg.packageRoot
config property when creating text files using UIcfg.packageRoot
when creating text files using UI
s3paths.canonicalKey
functionFileEditor
intoFileEditor/routes.ts