squircle-js icon indicating copy to clipboard operation
squircle-js copied to clipboard

Add a check before the getSvgPath to avoid clipping the entire element

Open rafaelrcamargo opened this issue 1 year ago • 4 comments
trafficstars

This PR introduces a pre-check before the getSvgPath call. This means we'll show the "non-squircle" element until we get the actual element size. This won't influence components with width/height or defaultWidth/defaultHeight.

Before:

https://github.com/user-attachments/assets/aacec9ae-046f-44d8-9f0d-2379132ffe7e

After:

https://github.com/user-attachments/assets/0c1791b0-fab1-4a8d-8f72-0bc63d0d33ef

rafaelrcamargo avatar Sep 30 '24 02:09 rafaelrcamargo

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders
Open Preview

codesandbox[bot] avatar Sep 30 '24 02:09 codesandbox[bot]

⚠️ No Changeset found

Latest commit: 092abfa4b9e6c2796937b42b0cb4e45119aaf4ed

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Sep 30 '24 02:09 changeset-bot[bot]

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
squircle.js ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 2, 2025 1:58pm

vercel[bot] avatar Sep 30 '24 02:09 vercel[bot]

Hey @bring-shrubbery should I worry about the Changeset warning?

rafaelrcamargo avatar Oct 01 '24 21:10 rafaelrcamargo

Hey @rafaelrcamargo

Sorry for the half year delay ahaha - been overworked and out of it...

Thanks for the contribution - very nice touch and ux improvement! Thanks! 🤩

I'll manage the changesets stuff on my own, don't need to worry about it, but for the next time, you can run pnpm changeset to describe your change yourself.

bring-shrubbery avatar Mar 02 '25 13:03 bring-shrubbery