fix: auto-prepend https to social URLs lacking a protocol to prevent … - #7800
fix: auto-prepend https to social URLs lacking a protocol to prevent …#7800desireddymohithreddy0925 wants to merge 11 commits into
Conversation
|
Someone is attempting to deploy a commit to the jhasourav07's projects Team on Vercel. A member of the Team first needs to authorize it. |
📦 Next.js Bundle Size Report (Gzipped Sizes)✨ No significant bundle size changes detected. 📊 Summary of Totals
|
Aamod007
left a comment
There was a problem hiding this comment.
Great fix! Automatically prepending \https://\ to social URLs prevents broken links when users forget the protocol. It improves user experience significantly. Note that I am leaving a neutral review because there is currently a repository-level Vercel deployment block preventing full pipeline success, but your logic looks perfect!
Labels assigned:
- \level:beginner: String manipulation and URL validation.
- \quality:clean: Clean helper logic.
- \ ype:bug: Fixes broken URL routing.
Aamod007
left a comment
There was a problem hiding this comment.
Nice UX fix for social URLs! Automatically prepending \https://\ when users forget it will prevent a lot of broken links in the generated markdown. Approved!
Aamod007
left a comment
There was a problem hiding this comment.
Auto-prepending https:// to social URLs in validations.ts improves the user experience. However, the CI checks are failing. Please resolve the issues and rerun the CI pipeline.
|
If you are still working on this, please push your latest changes or leave a comment to keep it active. |
Aamod007
left a comment
There was a problem hiding this comment.
Thanks for pushing the new commits! Since we are currently ignoring the Vercel CI failures repository-wide, and you've updated the PR, everything looks good to go from my end. Approved! 🚀
Aamod007
left a comment
There was a problem hiding this comment.
Thanks for fixing the issue with relative social URLs! Prepending \https://\ automatically is a great UX improvement.
However, there are a couple of things that need to be addressed before we can merge this:
- It looks like you've accidentally included changes to \�pp/api/streak/route.timezone-boundaries.test.ts\ (modifying the \s-maxage\ values). Please revert those changes so this PR only contains the fix in
eadmeGenerator.ts. - Your branch currently has merge conflicts with the \main\ branch (indicated by the
eeds-rebase\ label). Please rebase your branch on the latest \main\ to resolve these conflicts.
Once the branch is cleaned up and conflicts are resolved, we can get this merged!
Label Justification:
- \level:beginner: Adding a simple regex check and string prepend is a standard beginner task.
- \quality:clean: The code for the fix is clean and concise.
- \ ype:bug: Fixes broken relative links in generated markdown.
- \mentor:Aamod007: Assigned as required.
…broken relative links
2a9e000 to
89f9c79
Compare
Aamod007
left a comment
There was a problem hiding this comment.
Thanks for fixing the accidental file changes and resolving the merge conflicts! The PR looks clean now and the logic to auto-prepend \https://\ is perfect.
Approving this PR! (Note: The \gssoc:needs-rebase\ label has been removed since conflicts are resolved.)
Label Justification:
- \level:beginner: Assigned based on 1 file changed with a simple string prepend.
- \quality:clean: Cleanly isolated fix in
eadmeGenerator.ts. - \ ype:bug: Fixes broken relative links in markdown.
- \mentor:Aamod007: Assigned as required.
…lidation fix: auto-prepend https to social URLs lacking a protocol to prevent …
11e66db to
75c4e8b
Compare
… BurnoutRiskTable
8a1566b to
3aef15c
Compare
Description
Fixes #7630
Previously, if a user entered a social link without a protocol (e.g.,
twitter.com/userinstead ofhttps://twitter.com/user), the generated markdown would treat it as a relative link, breaking navigation when clicked in a GitHub README.This PR updates
readmeGenerator.tsto automatically detect when a social URL is missing thehttp://orhttps://prefix (for non-email links). It now seamlessly prependshttps://to the URL during markdown generation, ensuring robust and fully qualified links without interrupting the user experience with validation errors.Pillar
Visual Preview
(Social URLs missing
https://now properly navigate to the correct external site when clicked in the generated markdown.)Checklist before requesting a review:
CONTRIBUTING.mdfile.localhost:3000/api/streak?user=YOUR_USERNAME).npm run formatandnpm run lintlocally and resolved all errors (CI will fail otherwise).feat(themes): ...,fix(calculate): ...).README.mdif I added a new theme or URL parameter.