-
Notifications
You must be signed in to change notification settings - Fork 141
Feat3298 add sticky social media share component below blog banner #212
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
add a sticky share to social media component in blog website
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: bhanushali parth hitesh <parth.bhanushali241@sakec.ac.in>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: bhanushali parth hitesh <parth.bhanushali241@sakec.ac.in>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: bhanushali parth hitesh <parth.bhanushali241@sakec.ac.in>
…oy#194) * feat: add scroll-to-top button with gradient progress indicator - Add ScrollToTop component with orange-to-yellow gradient - Implement smooth scroll progress tracking with circular indicator - Add hover effects with scale animation (duration: 500ms ease-out) - Include dark mode support with appropriate color schemes - Integrate component into main Layout for site-wide availability - Add accessibility features with proper aria-label - Button appears after scrolling 300px with smooth fade-in/out Signed-off-by: Soumyabrata Mukherjee <cseai2024042@rcciit.org.in> * perf: optimize ScrollToTop component performance and code clarity - Add throttling to scroll event listener (16ms delay for ~60fps) - Extract magic number 15.92 as CIRCLE_RADIUS constant - Extract scroll threshold 300 as SCROLL_THRESHOLD constant - Add THROTTLE_DELAY constant for better maintainability - Implement custom throttle function to prevent excessive scroll calculations - Update SVG circles to use CIRCLE_RADIUS constant - Improve code readability and performance on lower-end devices Signed-off-by: Soumyabrata Mukherjee <cseai2024042@rcciit.org.in> --------- Signed-off-by: Soumyabrata Mukherjee <cseai2024042@rcciit.org.in> Signed-off-by: parth <parth.bhanushali241@sakec.ac.in>
* Fix: author slug handling and add resilient author post lookups Signed-off-by: Kaushik Tak <kaushiktak19@gmail.com> * build minor fix Signed-off-by: Kaushik Tak <kaushiktak19@gmail.com> --------- Signed-off-by: Kaushik Tak <kaushiktak19@gmail.com> Signed-off-by: parth <parth.bhanushali241@sakec.ac.in>
* feat: add search tags functionality in tag page Signed-off-by: Kaushik Tak <kaushiktak19@gmail.com> * feat, ui : adding colors and icons to tags; adding load-more + infinite-scroll, loading tags when needed * ui: tags ui and added icons, and loading in tags Signed-off-by: Kaushik Tak <kaushiktak19@gmail.com> * build error fix Signed-off-by: Kaushik Tak <kaushiktak19@gmail.com> --------- Signed-off-by: Kaushik Tak <kaushiktak19@gmail.com> Co-authored-by: Amaan Bhati <94218318+amaan-bhati@users.noreply.github.com> Signed-off-by: parth <parth.bhanushali241@sakec.ac.in>
add a sticky share to social media component in blog website Signed-off-by: parth <parth.bhanushali241@sakec.ac.in>
Signed-off-by: parth <parth.bhanushali241@sakec.ac.in>
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.
Pull request overview
This PR relocates the social media share component from the blog post header to a sticky sidebar position for improved visibility and user engagement. The share functionality (Twitter, LinkedIn, Copy Link) is moved into a new StickyShare component that appears below the waitlist banner in the right sidebar on desktop screens.
Key Changes:
- Created new
StickySharecomponent with horizontal layout and sticky positioning - Removed share functionality from
PostHeaderAuthorscomponent - Integrated
StickyShareinto blog post layout sidebar
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| components/StickyShare.tsx | New component implementing social media share buttons with sticky behavior for desktop viewports |
| components/post-body.tsx | Integrated StickyShare component into sidebar layout between waitlist banner and ad slot; cleaned up formatting and removed test JSON data |
| components/PostHeaderAuthors.tsx | Removed social media share buttons and related state/logic from header author section |
| package-lock.json | Automatic npm lock file updates adding peer dependency flags to various packages |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
* Fix: author slug handling and add resilient author post lookups Signed-off-by: parth bhanushali <parth.bhanushali241@sakec.ac.in> * build minor fix Signed-off-by: parth bhanushali <parth.bhanushali241@sakec.ac.in> --------- Signed-off-by: PARTH Bhanushali <parth.bhanushali241@sakec.ac.in>
Co-Authored-By: bhanushali parth hitesh <parth.bhanushali241@sakec.ac.in>
* Fix: author slug handling and add resilient author post lookups Signed-off-by: parth bhanushali <parth.bhanushali241@sakec.ac.in> * build minor fix Signed-off-by: parth bhanushali <parth.bhanushali241@sakec.ac.in> --------- Signed-off-by: PARTH Bhanushali <parth.bhanushali241@sakec.ac.in> Signed-off-by: parth <parth.bhanushali241@sakec.ac.in>
30b1227 to
d02a87b
Compare
Signed-off-by: parth <parth.bhanushali241@sakec.ac.in>
|
@copilot open a new pull request to apply changes based on the comments in this thread |
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.
Pull request overview
Copilot reviewed 4 out of 5 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const router = useRouter(); | ||
| const [copied, setCopied] = useState(false); | ||
|
|
||
| const baseUrl = `https://keploy.io/blog${router.asPath}`; |
Copilot
AI
Nov 30, 2025
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.
The URL construction will result in a double "/blog" prefix. Line 10 hardcodes /blog in the baseUrl, but this component is already used in a blog context where router.asPath likely already includes the blog path. This could result in URLs like https://keploy.io/blog/blog/post-name instead of https://keploy.io/blog/post-name.
Consider removing the hardcoded /blog prefix and using router.asPath directly, or verify that router.asPath doesn't already include the blog path.
| const baseUrl = `https://keploy.io/blog${router.asPath}`; | |
| const baseUrl = `https://keploy.io${router.asPath}`; |
| const [copied, setCopied] = useState(false); | ||
|
|
||
| const baseUrl = `https://keploy.io/blog${router.asPath}`; | ||
| const currentURL = typeof window !== 'undefined' ? encodeURIComponent(baseUrl) : ""; |
Copilot
AI
Nov 30, 2025
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.
[nitpick] The typeof window !== 'undefined' check on line 11 is redundant. Next.js Router hooks like useRouter() already handle SSR/client-side differences, and router.asPath is available during SSR. The empty string fallback for currentURL would result in broken share URLs during SSR, but since this component is client-side only (hidden with Tailwind classes), this check adds unnecessary complexity.
Consider simplifying to: const currentURL = encodeURIComponent(baseUrl);
| const currentURL = typeof window !== 'undefined' ? encodeURIComponent(baseUrl) : ""; | |
| const currentURL = encodeURIComponent(baseUrl); |
| <div> | ||
|
|
||
| </div> | ||
| <div></div> |
Copilot
AI
Nov 30, 2025
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.
Empty div serves no purpose and should be removed. This appears to be leftover from code cleanup.
| <div></div> |
| { | ||
| "githubPullRequests.ignoredPullRequestBranches": [ | ||
| "main" | ||
| ] | ||
| } No newline at end of file |
Copilot
AI
Nov 30, 2025
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.
The .vscode/settings.json file contains IDE-specific user preferences and should not be committed to the repository. This file is typically added to .gitignore to avoid polluting the repository with individual developer settings.
Consider:
- Adding
.vscode/to.gitignore - Removing this file from version control
| }; | ||
|
|
||
| return ( | ||
| <div className="hidden lg:flex flex-row gap-4 items-center p-4 bg-white rounded-lg shadow-sm mb-4"> |
Copilot
AI
Nov 30, 2025
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.
[nitpick] The wrapper div includes mb-4 (margin-bottom) which adds spacing below the component. However, the parent container in post-body.tsx already controls spacing with gap-4 on line 355. The mb-4 creates inconsistent spacing between components in the sidebar.
Consider removing mb-4 from this line to let the parent's gap-4 handle spacing uniformly.
| <div className="hidden lg:flex flex-row gap-4 items-center p-4 bg-white rounded-lg shadow-sm mb-4"> | |
| <div className="hidden lg:flex flex-row gap-4 items-center p-4 bg-white rounded-lg shadow-sm"> |
| <div className="hidden lg:flex justify-center rounded-xl p-0"> | ||
| <StickyShare /> | ||
| </div> | ||
|
|
||
| {/* 3. Ad slot (hidden on <lg) */} | ||
| <div className="hidden lg:flex justify-center rounded-xl p-0"> |
Copilot
AI
Nov 30, 2025
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.
[nitpick] Inconsistent padding values in the sidebar. Lines 363 and 368 both use p-0 (no padding), but the parent aside on line 355 uses p-4. The wrapper divs with p-0 are unnecessary and don't add value.
Consider removing the wrapper divs entirely, or at least removing the redundant p-0 padding class:
{/* 2. Sticky Share (hidden on <lg) */}
<div className="hidden lg:flex justify-center">
<StickyShare />
</div>| <div className="hidden lg:flex justify-center rounded-xl p-0"> | |
| <StickyShare /> | |
| </div> | |
| {/* 3. Ad slot (hidden on <lg) */} | |
| <div className="hidden lg:flex justify-center rounded-xl p-0"> | |
| <div className="hidden lg:flex justify-center"> | |
| <StickyShare /> | |
| </div> | |
| {/* 3. Ad slot (hidden on <lg) */} | |
| <div className="hidden lg:flex justify-center"> |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: bhanushali parth hitesh <parth.bhanushali241@sakec.ac.in> Signed-off-by: parth <parth.bhanushali241@sakec.ac.in>
abcc86b to
0107fb9
Compare
* feat: add search tags functionality in tag page Signed-off-by: Kaushik Tak <kaushiktak19@gmail.com> * feat, ui : adding colors and icons to tags; adding load-more + infinite-scroll, loading tags when needed * ui: tags ui and added icons, and loading in tags Signed-off-by: Kaushik Tak <kaushiktak19@gmail.com> * build error fix Signed-off-by: Kaushik Tak <kaushiktak19@gmail.com> --------- Signed-off-by: Kaushik Tak <kaushiktak19@gmail.com> Co-authored-by: Amaan Bhati <94218318+amaan-bhati@users.noreply.github.com> Signed-off-by: parth <parth.bhanushali241@sakec.ac.in>
Related Tickets & Documents
Fixes: #3298
Description
This PR updates the placement, design, and behaviour of the social media share component in blog pages to improve user engagement and UX.
Current Behaviour
Expected Output (Implemented)
Type of Change
Testing
Manual Testing Performed
Environment and Dependencies
Checklist
BEFORE :
AFTER :
VIDEO TESTING :
AFTER.-.Made.with.Clipchamp.mp4