-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
feat(settings): add toggle for relative path #386
Conversation
WalkthroughThe changes update the handling of link paths and settings across multiple files. A new conditional in the Changes
Sequence Diagram(s)sequenceDiagram
participant Caller as Function Caller
participant FP as createRelativePath
participant Settings as Settings Object
Caller->>FP: Call createRelativePath(settings, targetPath)
alt relativePath is disabled
FP->>FP: Return { link: settings.textPrefix + targetPath }
else
FP->>FP: Process normal logic branch
end
sequenceDiagram
participant User as End User
participant EST as EnveloppeSettingsTab
participant Sanitizer as sanitizeHTMLToDom
User->>EST: Trigger renderTextConversion
EST->>Sanitizer: Create HTML for text conversion description
alt shareAll disabled
EST->>Sanitizer: Create HTML for relative path settings
end
EST->>User: Render updated settings UI
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
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 Overview
This PR introduces a new settings toggle to allow disabling relative path creation and specifying a text prefix (by default "/") for file paths. Key changes include:
- Adding a new toggle and text input in the settings page for configuring relative path behavior.
- Adjusting file path generation to use a customizable text prefix when relative path is disabled.
- Updating interfaces and default settings to support the new configuration.
Reviewed Changes
File | Description |
---|---|
src/settings.ts | Added UI elements for relative path toggle and text prefix input to the settings page. |
src/conversion/file_path.ts | Updated path creation logic to check the new relativePath setting and apply the text prefix. |
src/interfaces/constant.ts | Extended default settings to include relativePath and textPrefix. |
src/interfaces/settings.ts | Updated interface definitions to include the new relativePath and textPrefix fields. |
src/utils/status_bar.ts | Inserted a biome-ignore lint comment with a placeholder explanation. |
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
/
for absolute path. Can be disabled when empty. This settings only appear if relative path is disabled.Output:
Before:
After :
Relative to #384