-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ASUB-8549 custom buttom for facebook and apple - updating user accoun… #2176
ASUB-8549 custom buttom for facebook and apple - updating user accoun… #2176
Conversation
blocks/identity-block/components/social-sign-on/utils/useSocialSignIn.js
Fixed
Show fixed
Hide fixed
blocks/identity-block/components/social-sign-on/utils/useSocialSignIn.js
Fixed
Show fixed
Hide fixed
blocks/identity-block/components/social-sign-on/utils/useSocialSignIn.js
Fixed
Show fixed
Hide fixed
blocks/identity-block/components/social-sign-on/utils/useSocialSignIn.js
Fixed
Show fixed
Hide fixed
Just curious but what's reasoning behind adding custom button flag on the custom fields instead of just changing the existing button? Thanks. |
if (customButtons) { | ||
document.getElementById("custom-google-signin-btn").addEventListener("click", () => | ||
window.google.accounts.id.prompt((notification) => { | ||
if (notification.isNotDisplayed() || notification.isSkippedMoment()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like google doesn't want you to use isNotDisplayed
with FedCM roll out.
https://developers.google.
com/identity/gsi/web/guides/fedcm-migration?s=dc#display_moment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LauraPinilla I left some comments and can we go over how we can test this.
blocks/identity-block/features/account-management/_children/SocialEditableSection.jsx
Outdated
Show resolved
Hide resolved
/> | ||
</div> | ||
</div> | ||
<SocialSignOnEditableFieldContainer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here you don't need to use the ternary.
{facebookAppId && (
<div>Your html here</div>
)}
blocks/identity-block/features/account-management/_children/SocialEditableSection.jsx
Outdated
Show resolved
Hide resolved
document.getElementById("custom-Facebook-signin-btn").addEventListener("click", () => { | ||
window.onFacebookSignOn(); | ||
}); | ||
setTimeout(() => attachEventListener(), 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason for this timeout if it has 0 milliseconds?
@edwardcho1231 I think @LauraPinilla wanted to keep the old version just in case the user wanted the old version. I think we can keep it for now just in case a client wants to use the service providers version of it. |
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useEffect cleanup requests mainly...
blocks/identity-block/components/social-sign-on/_children/FacebookSignIn.jsx
Outdated
Show resolved
Hide resolved
blocks/identity-block/components/social-sign-on/_children/GoogleSignIn.jsx
Outdated
Show resolved
Hide resolved
blocks/identity-block/components/social-sign-on/utils/useSocialSignIn.js
Outdated
Show resolved
Hide resolved
blocks/identity-block/components/social-sign-on/utils/useSocialSignIn.js
Outdated
Show resolved
Hide resolved
blocks/identity-block/components/social-sign-on/utils/useSocialSignIn.js
Outdated
Show resolved
Hide resolved
blocks/identity-block/components/social-sign-on/utils/useSocialSignIn.js
Outdated
Show resolved
Hide resolved
blocks/identity-block/features/account-management/_children/SocialSignOnEditableContainer.jsx
Outdated
Show resolved
Hide resolved
blocks/identity-block/features/account-management/_children/SocialSignOnEditableContainer.jsx
Outdated
Show resolved
Hide resolved
blocks/identity-block/features/account-management/_children/SocialSignOnEditableContainer.jsx
Outdated
Show resolved
Hide resolved
blocks/identity-block/features/account-management/_children/SocialSignOnEditableContainer.jsx
Outdated
Show resolved
Hide resolved
blocks/identity-block/components/social-sign-on/utils/useSocialSignIn.js
Dismissed
Show dismissed
Hide dismissed
blocks/identity-block/components/social-sign-on/utils/useSocialSignIn.js
Fixed
Show fixed
Hide fixed
blocks/identity-block/components/social-sign-on/utils/useSocialSignIn.js
Dismissed
Show dismissed
Hide dismissed
blocks/identity-block/components/social-sign-on/utils/useSocialSignIn.js
Fixed
Show fixed
Hide fixed
blocks/identity-block/components/social-sign-on/_children/GoogleSignIn.jsx
Outdated
Show resolved
Hide resolved
blocks/identity-block/components/social-sign-on/utils/useSocialSignIn.js
Outdated
Show resolved
Hide resolved
blocks/identity-block/components/social-sign-on/utils/useSocialSignIn.js
Dismissed
Show dismissed
Hide dismissed
blocks/identity-block/components/social-sign-on/utils/useSocialSignIn.js
Dismissed
Show dismissed
Hide dismissed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely feel better about the cleanup, thanks Laura!
957d9ac
into
arc-themes-release-version-2.5.0
…t management
Be sure to run
npm test
,npm run lint
, and write detailed test steps before requesting reviewersDescription
Updates on Social-sign-on & account management block
https://arcpublishing.atlassian.net/browse/ASUB-8521
https://arcpublishing.atlassian.net/browse/ASUB-8549
There are some AppSec Security alerts, All these will be fixed as part of https://arcpublishing.atlassian.net/browse/ASUB-8539
Test Steps
Use the cdn endpoint https://stagingva-staging-sandbox.api.cdn.arcpublishing.com
Since this tenant has all the Third Auth Providers.
2 Blocks has been updated as part of this PR
Create a page with a Social-Sign-on block. Enable/disable the custom field customButtons. It will render the buttons provided by Fb or Google or the custom buttons included as part of this ticket.
Create a page with account-management block. There you should be able to see the identities attached, or you should be able to attach new identities.
git checkout ASUB-8521-SocialMediaButtons
npx fusion start -f -l @wpmedia/identity-block
4 Create a page with account-management block. There you should be able to see the identities attached, or you should be able to attach/remove identities.