-
-
Notifications
You must be signed in to change notification settings - Fork 84
feat: added date on link text #103
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughA new utility function for generating a formatted date-time string was added, and both the canvas image pasting and Imgur plugin embedding functionalities were updated to use this function. As a result, pasted or embedded images now use the current timestamp as the markdown alt text instead of leaving it empty. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Canvas/ImgurPlugin
participant getDateTimeFormatted
User->>Canvas/ImgurPlugin: Paste or embed image
Canvas/ImgurPlugin->>getDateTimeFormatted: Request formatted date-time
getDateTimeFormatted-->>Canvas/ImgurPlugin: Return formatted date-time string
Canvas/ImgurPlugin->>Canvas/ImgurPlugin: Generate markdown image with timestamp as alt text
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
src/Canvas.tsOops! Something went wrong! :( ESLint: 9.19.0 Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@eslint/js' imported from /eslint.config.js src/ImgurPlugin.tsOops! Something went wrong! :( ESLint: 9.19.0 Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@eslint/js' imported from /eslint.config.js src/utils/getDateTimeFormatted.tsOops! Something went wrong! :( ESLint: 9.19.0 Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@eslint/js' imported from /eslint.config.js Tip ⚡️ Free AI Code Reviews for VS Code, Cursor, Windsurf
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 (
|
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.
Actionable comments posted: 5
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/Canvas.ts
(2 hunks)src/ImgurPlugin.ts
(3 hunks)src/utils/getDateTimeFormated.ts
(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (2)
src/ImgurPlugin.ts (1)
src/utils/getDateTimeFormated.ts (1)
getDateTimeFormated
(1-12)
src/Canvas.ts (1)
src/utils/getDateTimeFormated.ts (1)
getDateTimeFormated
(1-12)
🔇 Additional comments (1)
src/ImgurPlugin.ts (1)
401-403
: Good implementation that aligns with PR objectivesThe addition of a date to the link text is a valuable improvement that addresses the issue described in the PR objectives - ensuring links have meaningful content when the image syntax is converted to a regular link.
Hi @robertofgama. Thank you for the pull request! Sorry, I don't have time for checking/merging it right now, but I already have a thought in mind: I would not want to add this feature unconditionally. I would rather add a setting "Image text" with 2 options:
If it was optional and not changing current behavior to existing users, I would be more happy to merge this additional feature. PS: comments from Code Rabbit are absolutely not mandatory to resolve, but sometimes they can give you a valuable ideas on possible improvements. |
I understand your consideration, I think it's very valid. I will try to implement your suggestions on weekend, or soon is possible. |
added date on link text for cases where is needed a link of uploaded image, where to remove the exclamation returns a blank link.
Summary by CodeRabbit