-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[create-link]: Add customizable templates and tab selection feature #20120
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
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
…eating links to prevent potential security issues and ensure valid output
…ing an error to improve user experience when fetching the active tab
…copying functionality to enhance user experience with dynamic link creation
…ine custom format structure and improve type safety
…ble links from the current URL for enhanced user flexibility
…stomTemplate for better clarity and consistency in naming
…wn special characters for safe link generation
…ks from title and URL for better formatting and usability
…wn links from title and URL for improved functionality
…nt crashes and ensure stability
…found to enhance user experience
…arify functionality and improve user understanding
…tter clarity and consistency
… case more clearly
…ty and maintainability of the component's return statement
…opyCustomFormatPreferences for clarity and consistency
[ext/create-link] Copying Links in a Custom User-Defined Format
…to define their own link templates for copied URLs docs(package.json): update description for copy-custom command to explain custom link formatting and available placeholders
…ion links to enhance user customization options
…eCustomTemplate function for improved code clarity and maintainability
…better user experience fix(formatter.ts): return an empty string on error to prevent potential issues with undefined values
…h block for better debugging insights
…o define their own link format for copied URLs
…how toast notification if not set to enhance user experience
…serExtension.Tab object instead of separate title and url parameters for better structure and clarity
…ormats for tab data
…tly for improved clarity and accuracy in link creation
…BrowserExtension.Tab object instead of separate title and url parameters for better structure and clarity
…logic to enhance flexibility in handling different tab formats
…ab directly for consistency and clarity
This commit introduces new placeholders, `{title_html_escaped}` and `{title_markdown_escaped}`, for the custom format feature. These placeholders allow users to safely embed page titles into HTML or Markdown links by applying the respective escaping rules, preventing syntax errors. The existing `{title}` placeholder remains unchanged, providing the raw, unescaped title for flexibility.
This commit corrects an earlier merge conflict in `package.json` by restoring the missing command definition for `show-tabs`. This ensures the file is correctly formatted and aligned with the `main` branch, allowing all commands to be registered properly.
Reduced the length of descriptions for 'copy-plain-text', 'copy-html', 'copy-markdown', 'copy-custom', and 'show-tabs' commands in package.json for conciseness.
Thank you for the update! 🎉 You can expect an initial review within five business days. |
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
Major update to the create-link extension adding tab selection and customizable link templates, with significant code reorganization.
- Added new
show-tabs
command inpackage.json
allowing users to select and copy links from any open browser tab - Consolidated link formatting logic into new
formatter.ts
utility, improving code maintainability - Refactored command descriptions in
package.json
to be more concise while maintaining functionality - New
TabList
component needs attention regarding error handling and accessibility patterns - Proper usage of
{PR_MERGE_DATE}
template in CHANGELOG.md header
9 files reviewed, 5 comments
Edit PR Review Bot Settings | Greptile
icon={Icon.TextCursor} | ||
/> | ||
<Action.CopyToClipboard | ||
// eslint-disable-next-line @raycast/prefer-title-case |
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.
style: No need to disable eslint rule here. Just use title case 'Copy as HTML' consistently with other actions.
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
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.
Hi 👋
Looks good to me, approved 🔥
Published to the Raycast Store: |
🎉 🎉 🎉 We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag. |
Description
This PR enhances the create-link extension with two major features:
Customizable Link Templates: Users can now define custom link formats through extension preferences, allowing for platform-specific or personalized link generation (e.g., Notion blocks, Slack formatting, etc.)
Tab Selection Interface: Added a new command that lists all open browser tabs, enabling users to select and copy links from any tab without switching between windows
Additional improvements include:
formatter.ts
to individual command files for better maintainabilityScreencast
Checklist
npm run build
and tested this distribution build in Raycastassets
folder are used by the extension itselfREADME
are located outside the metadata folder if they were not generated with our metadata tool