Skip to content

fix(clerk-js): Fix layout shift for Social block buttons - #1838

Merged
nikosdouvlis merged 5 commits into
mainfrom
vaggelis/js-792-layout-shift-still-happening-for-social-button
Oct 10, 2023
Merged

fix(clerk-js): Fix layout shift for Social block buttons#1838
nikosdouvlis merged 5 commits into
mainfrom
vaggelis/js-792-layout-shift-still-happening-for-social-button

Conversation

@octoper

@octoper octoper commented Oct 6, 2023

Copy link
Copy Markdown
Contributor

Description

This PR fixes layout shift that is happening when Social block button is in loading state.

Before:

CleanShot.2023-10-09.at.17.06.33.mp4

After:

Layout.Shift.after.20px.mp4

Fixes JS-792

Checklist

  • npm test runs as expected.
  • npm run build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Packages affected

  • @clerk/clerk-js
  • @clerk/clerk-react
  • @clerk/nextjs
  • @clerk/remix
  • @clerk/types
  • @clerk/themes
  • @clerk/localizations
  • @clerk/clerk-expo
  • @clerk/backend
  • @clerk/clerk-sdk-node
  • @clerk/shared
  • @clerk/fastify
  • @clerk/chrome-extension
  • gatsby-plugin-clerk
  • build/tooling/chore

@changeset-bot

changeset-bot Bot commented Oct 6, 2023

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9efbefb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@clerk/clerk-js Patch
@clerk/chrome-extension Patch
@clerk/clerk-expo Patch

Not sure what this means? Click here to learn what changesets are.

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

@octoper octoper changed the title fix(clerk-js): Fix layout shift for Social block buttons fix(clerk-js): Fix layout shift for oAuth block buttons Oct 6, 2023
@octoper octoper changed the title fix(clerk-js): Fix layout shift for oAuth block buttons fix(clerk-js): Fix layout shift for Social block buttons Oct 6, 2023
@octoper
octoper force-pushed the vaggelis/js-792-layout-shift-still-happening-for-social-button branch from 731b4de to b1fe1f5 Compare October 6, 2023 19:48
@octoper
octoper marked this pull request as ready for review October 6, 2023 19:50
@octoper
octoper requested a review from a team as a code owner October 6, 2023 19:50
@octoper
octoper force-pushed the vaggelis/js-792-layout-shift-still-happening-for-social-button branch from b1fe1f5 to 1f884f3 Compare October 6, 2023 21:47
@panteliselef

Copy link
Copy Markdown
Contributor

@octoper I remember that we decided to change the social logos' dimensions to 20px by 20px, this PR seems to bring it back to 16x16, are we ok with this ?

@octoper

octoper commented Oct 9, 2023

Copy link
Copy Markdown
Contributor Author

@panteliselef yeah you are correct, had some problems at first to keep it at 20px but I did manage to resolve them today.

@octoper

octoper commented Oct 9, 2023

Copy link
Copy Markdown
Contributor Author

@panteliselef Just changed the sizes and also updated the videos.

@octoper
octoper force-pushed the vaggelis/js-792-layout-shift-still-happening-for-social-button branch from d34278c to 2394bf8 Compare October 9, 2023 14:47
size: {
sm: { [size]: theme.sizes.$3 },
md: { [size]: theme.sizes.$4 },
xs: { [size]: theme.sizes.$3 },

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.

❓ Are we using this somewhere ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, this is used here packages/clerk-js/src/ui/elements/Actions.tsx

@panteliselef panteliselef left a comment

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.

Thanks for the fix @octoper 🔧

@nikosdouvlis nikosdouvlis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

💯

@nikosdouvlis
nikosdouvlis merged commit f20adc3 into main Oct 10, 2023
@nikosdouvlis
nikosdouvlis deleted the vaggelis/js-792-layout-shift-still-happening-for-social-button branch October 10, 2023 10:28
@clerk-cookie clerk-cookie mentioned this pull request Oct 10, 2023
@clerk-cookie

Copy link
Copy Markdown
Collaborator

This PR has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@clerk clerk locked as resolved and limited conversation to collaborators Oct 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants