Skip to content

fix: blog share pill click target - #692

Open
Shubhashish-Chakraborty wants to merge 4 commits into
the-monkeys:mainfrom
Shubhashish-Chakraborty:fix/share-pill-click-target
Open

fix: blog share pill click target#692
Shubhashish-Chakraborty wants to merge 4 commits into
the-monkeys:mainfrom
Shubhashish-Chakraborty:fix/share-pill-click-target

Conversation

@Shubhashish-Chakraborty

Copy link
Copy Markdown

📃 Why Merge This PR?

Summary

  • Expanded the blog share action click target so the full visible pill opens the share dialog.
  • Added clearer hover and keyboard focus states for the share trigger.
  • Added a reusable triggerClassName prop to BlogShareDialog for caller-specific trigger styling.

See the implemented fix in action:

Before (current behaviour):

currentSharePill.mp4

After (Expected Behaviour):

expectedSharePill.mp4

🛠️ Issue Fixed

#691

🔍 PR Type

  • 💡 Feature
  • 🐛 Bug Fix
  • 📃 Documentation
  • 🎨 UI Improvements
  • 💻 Code Refactor
  • ✅ Tests

@netlify

netlify Bot commented Aug 20, 2026

Copy link
Copy Markdown

Deploy Preview for incredible-eclair-ada155 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 8178e6e
🔍 Latest deploy log https://app.netlify.com/projects/incredible-eclair-ada155/deploys/6a995f3a4615a50008d562a5
😎 Deploy Preview https://deploy-preview-692--incredible-eclair-ada155.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Gautam7352

Copy link
Copy Markdown
Contributor

The share button size seems to be reduced after the change, let's avoid that

Before

image

After

image

<BlogShareDialog
blogURL={url}
size={20}
triggerClassName='px-[10px] py-[6px] bg-foreground-light/80 dark:bg-foreground-dark/80 backdrop-blur-sm rounded-full shadow-sm ring-1 ring-border-light dark:ring-border-dark hover:bg-foreground-light dark:hover:bg-foreground-dark hover:ring-brand-orange/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-orange'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need this many tailwind properties here?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of these classes are not required for the click functionality. They are needed only to preserve the existing pill appearance and add clearer hover/focus feedback.

So, the full list is not strictly required, but the padding, background, rounded shape, and hover/focus styles should remain to keep the intended design and UX.

SO what should i do with them lmk.
I feel it looks fine tho.

DialogTrigger,
} from '@the-monkeys/ui/atoms/dialog';
import { toast } from '@the-monkeys/ui/hooks/use-toast';
import { twMerge } from 'tailwind-merge';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did we import twmerge here?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the twMerge is used so the default button classes and the caller-provided triggerClassName can safely be combined. It resolves conflicting Tailwind utilities such as:

'p-1' and: 'px-[10px] py-[6px]'

Without twmerge, both classes may remain in the final class string, and the resulting styling can depend on Tailwind’s generated CSS order. twMerge ensures the custom trigger styles correctly override the defaults.

@TanishqSingla

Copy link
Copy Markdown
Collaborator

Please rebase your pr and address all the comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants