supabase-community / auth-ui

Pre-built Auth UI for React
https://supabase.com/docs/guides/auth/auth-helpers/auth-ui
MIT License
486 stars 120 forks source link

bug icon size default change to 21px #151

Closed rdylina closed 1 year ago

rdylina commented 1 year ago

The default styled size of the icons is 21px to make them small enough to display properly in the button. However the SVG was setup with the default size of 512px which causes a momentary fash of a large icon as the page loads. This change sets the default size to 21px.

If a larger size is required in the future it can be overridden through the styles prop just like the current implementation.

rdylina commented 1 year ago

@MildTomato @thorwebdev @silentworks

Good evening, this is a pull request for your review. This should help fix #87 and #101 . As has been reported by a few people the default icon sizes are excessive and, in some implementations, result in a full-size 512px flash during page render prior to the default icon styles being applied. I would like to merge this request that modifies the icon size down, then, they can be upsized through styling if needed. This will result in significantly fewer cumulative layout changes and obviously does away with the large icon flash.

Thank you!

silentworks commented 1 year ago

Hey @rdylina thank you for this PR. I will get it merged in soon but will add the other packages to it also as they all have these same icons in them. That's the Solid and Svelte packages.

rdylina commented 1 year ago

Hey @rdylina thank you for this PR. I will get it merged in soon but will add the other packages to it also as they all have these same icons in them. That's the Solid and Svelte packages.

Oops, I didn't even think to check the other packages. Want me to go through and add them to my PR?

silentworks commented 1 year ago

Yeah that would be appreciated.

rdylina commented 1 year ago

Yeah that would be appreciated.

All done, some of them were specified without units "512" instead of "512px". I made sure they are all unit specific in px while I was at it.

Re-synced with forked branch as well to ensure there were no collisions. Should be good to go.

silentworks commented 1 year ago

Thank you for this PR @rdylina. A release should be out shortly with this fix.