DEV Community

zidane
zidane

Posted on

When You Need to Delete a Comment… But Your Button Refuses to Cooperate

So I was tinkering with Genjutsu, this open-source social media app I’m contributing to. One day, I needed to delete one of my own comments. Sounds simple, right? Just click “Delete” and done.

Well… I had to implement that feature myself because the app didn’t have it yet. ✅ Feature: done.

But here’s the kicker aligning the trash icon and the “Delete” text in the button? My CSS and React skills went on strike. The icon wanted to party on the left, the text wanted center stage. They just wouldn’t sit together nicely. 😅

<button className="delete-btn">
  <TrashIcon /> Delete
</button>
Enter fullscreen mode Exit fullscreen mode

It was a real “developer vs. UI” showdown.

Eventually, I left it like that. The backend works perfectly: only the comment owner can delete a comment, which is the important part. The button alignment? Well… let’s call it a quirky feature. 😎

Moral of the story: Open-source is fun, unpredictable, and sometimes your trash icon has a mind of its own.

Top comments (2)

Collapse
 
iamovi profile image
Ovi ren

bro you wrote a whole post about it, great! the backend is solid though — next PR we fix that rebellious trash icon. thanks for contributing 🙌

Collapse
 
tahsin_zidane profile image
zidane

lowk excited for genjutsu 😶‍🌫️