Skip to content

Conversation

@miguelpeixe
Copy link
Member

@miguelpeixe miguelpeixe commented Jul 25, 2022

All Submissions:

Changes proposed in this Pull Request:

Implements an abstraction for third-party login and lists subscription for the generic authentication/registration form.

image

image

The customization of text will be tackled next on #1773.

How to test the changes in this Pull Request:

  1. Make sure you have reader activation on and AMP Plus (or AMP off)
  2. Make sure you have subscription lists enabled and configured on the Engagement wizard
  3. Visit the front page of our site anonymously and open the Sign In modal
  4. Click "I don't have an account"
  5. Register a new email subscribing to newsletters
  6. Confirm you are subscribed
  7. On a new session, click on Sign In again and use the Google authentication with newsletters selected
  8. Confirm you're signed in and subscribed

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@miguelpeixe miguelpeixe self-assigned this Jul 26, 2022
@miguelpeixe miguelpeixe marked this pull request as ready for review July 26, 2022 18:09
@miguelpeixe miguelpeixe requested a review from a team as a code owner July 26, 2022 18:09
@miguelpeixe miguelpeixe requested a review from adekbadek July 26, 2022 18:09
@miguelpeixe miguelpeixe added the [Status] Needs Review The issue or pull request needs to be reviewed label Jul 26, 2022
@miguelpeixe miguelpeixe requested a review from adekbadek July 27, 2022 13:41
Copy link
Member

@adekbadek adekbadek left a comment

Choose a reason for hiding this comment

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

When using Google to sign in via the Registration block, the newsletter selection is disregarded (the new contact is not signed up for the selected newsletter/s).

@miguelpeixe
Copy link
Member Author

Fixed by 2c2dbb1

@miguelpeixe miguelpeixe requested a review from adekbadek July 27, 2022 16:20
Copy link
Member

@adekbadek adekbadek left a comment

Choose a reason for hiding this comment

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

🙌

@github-actions github-actions bot added [Status] Approved The pull request has been reviewed and is ready to merge and removed [Status] Needs Review The issue or pull request needs to be reviewed labels Jul 28, 2022
@miguelpeixe miguelpeixe merged commit fdc52fd into master Jul 28, 2022
@miguelpeixe miguelpeixe deleted the feat/abstract-registration-block-to-auth-form branch July 28, 2022 12:35
dkoo added a commit that referenced this pull request Aug 5, 2022
* feat: set client id cookie; reader activation tweaks (#1780)

* feat(reader-activation): registration auth cookie control (#1787)

* fix(reader-activation): username generation handling (#1789)

* feat(stripe): webhook auto-creation and validation

* feat(reader-activation): account link and auth form (#1754)

Co-authored-by: Adam Boro <adam@adamboro.com>

* feat: handle new frequency options in Campaigns dashbaord (#1779)

* feat: handle new frequency options in Campaigns dashbaord

* feat: only enable new frequency options if reader activation flag is on

* feat(registration-block): newsletter subscription (#1778)

* fix(popups): use new Campaigns method for creating donation events on new orders (#1794)

* fix(popups): use new Campaigns method for creating donation events on new orders

* refactor: use action hook instead of calling Campaigns methods directly

* chore: remove unneeded condition

* refactor: use a hook for WooCommerce donations, too

* fix: add client_id to contact info passed from Stripe

* feat(my-account): stripe billing portal link (#1761)

Note: some styling relies on Automattic/newspack-theme#1875

Closes #1742
Closes #1739
Closes #1740
Closes #1741
Closes #1782

* feat(registration-block): login with Google (#1781)

Closes #1774 

Co-authored-by: Miguel Peixe <miguel.peixe@automattic.com>

* chore(deps): bump @babel/preset-env from 7.18.6 to 7.18.9

Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.18.6 to 7.18.9.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.18.9/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump date-fns from 2.28.0 to 2.29.1

Bumps [date-fns](https://github.com/date-fns/date-fns) from 2.28.0 to 2.29.1.
- [Release notes](https://github.com/date-fns/date-fns/releases)
- [Changelog](https://github.com/date-fns/date-fns/blob/master/CHANGELOG.md)
- [Commits](date-fns/date-fns@v2.28.0...v2.29.1)

---
updated-dependencies:
- dependency-name: date-fns
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump @babel/plugin-transform-runtime from 7.18.6 to 7.18.9

Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.18.6 to 7.18.9.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.18.9/packages/babel-plugin-transform-runtime)

---
updated-dependencies:
- dependency-name: "@babel/plugin-transform-runtime"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump stripe/stripe-php from 8.10.0 to 8.11.0

Bumps [stripe/stripe-php](https://github.com/stripe/stripe-php) from 8.10.0 to 8.11.0.
- [Release notes](https://github.com/stripe/stripe-php/releases)
- [Changelog](https://github.com/stripe/stripe-php/blob/master/CHANGELOG.md)
- [Commits](stripe/stripe-php@v8.10.0...v8.11.0)

---
updated-dependencies:
- dependency-name: stripe/stripe-php
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* feat: register anonymous single donors (#1795)

Co-authored-by: Adam Borowski <adam@adamboro.com>

* feat(registration-block): editable success state (#1785)

Closes #1768 

Co-authored-by: Thomas Guillot <thomasguillot@users.noreply.github.com>

* feat(registration-block): add success icon (#1804)

* refactor: remove unneeded prop

* feat: send user metadata to AC (#1793)

* feat: remove reader registration on adding contact via hook

This was causing an infinite loop: Newsletters is triggering
reader registration when a contact is added (`Newspack_Newsletters_Subscription::newspack_registered_reader`). Then, on adding a contact,
registration was triggered again here.

* fix(registration-block): margin for success message (#1808)

* Reader Activation: auth form with third-party and lists subscriptions (#1800)

* feat: tweak registration block styling

* feat(reader-auth): make password login the first option, instead of login link

Closes #1809

* fix(reader-activation): reinitialize auth links after DOM load (#1812)

* fix: ensure scroll on smaller height (#1813)

* feat(reader-activation): settings wizard (#1773)

Co-authored-by: Adam Boro <adam@adamboro.com>

* feat: handle contact update w/out lists selection (#1816)

Co-authored-by: Miguel Peixe <miguel.peixe@automattic.com>

* chore: logger update (#1807)

Co-authored-by: Miguel Peixe <miguel.peixe@automattic.com>

* feat(reader-activation): disable 3rd party login buttons initially (#1806)

* feat(reader-activation): prevent updating user email in my-account

* feat(reader-activation): activecampaign master list (#1818)

Co-authored-by: Adam Boro <adam@adamboro.com>

* chore(deps): bump stripe/stripe-php from 8.11.0 to 8.12.0

Bumps [stripe/stripe-php](https://github.com/stripe/stripe-php) from 8.11.0 to 8.12.0.
- [Release notes](https://github.com/stripe/stripe-php/releases)
- [Changelog](https://github.com/stripe/stripe-php/blob/master/CHANGELOG.md)
- [Commits](stripe/stripe-php@v8.11.0...v8.12.0)

---
updated-dependencies:
- dependency-name: stripe/stripe-php
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix(campaigns-wizard): segmentation wording

* feat(rss): adds offset feature (#1790)

Adds offset feature to RSS, allowing better ad integration with RSS feed based emails

* fix(reader-activation): handle no lists config available

* fix: fix fatal error when debug mode active (#1826)

* feat: reorganise donations wizard and use buttongroup for donation type (#1824)

* fix: google auth button type (#1829)

* fix(magic-links): fix email encoding on sent link (#1833)

* fix(registration-block): don't escape html for sign in labels (#1834)

* fix(reader-activation): add metadata to reader registered on donation

* fix(registration-block): render on preview (#1844)

Co-authored-by: Derrick Koo <dkoo@users.noreply.github.com>

* fix(reader-activation): remove async prop from library (#1846)

* feat(analytics): send GA events on the server side (#1828)

* refactor: abstract server-side GA custom event sending

* feat(reader-activation): send custom event to GA on reader registration

* feat: report user login method to GA; refactor how it's stored

* refactor: handle extended data from the newspack_newsletters_contact_data hook

* feat: send NTG custom events on registration, newsletter signup

* fix(my account): handle legacy data (#1823)

* fix(reader-activation): handle modal conflict when auth is triggered from a prompt

Closes #1835

* feat(reader-activation): optimistic account link (#1847)

* fix(google-auth): ensure popup on user click event (#1831)

Co-authored-by: Adam Boro <adam@adamboro.com>

* feat(active-campaigns): override is-new-contact for legacy contacts

* feat(active-campaign): metadata improvements (#1851)

* feat: if registering an email that already has an account, show different message (#1849)

* feat: if registering an email that already has an account, show different message

* refactor: use existing var

* feat: replace WooCommerce’s login form with our own (#1854)

* feat: replace WooCommerce’s login form with our own

* fix: use WC method to get account URL

Co-authored-by: Miguel Peixe <miguel.peixe@automattic.com>

* refactor: call render method from template file

* feat: hide page title on WC account pages

* refactor: restore modal on My Account pages; handle multiple form instancse

* refactor: use $class method to build inline class

Co-authored-by: Miguel Peixe <miguel.peixe@automattic.com>

* style: remove unneeded padding from inline form

* fix: move handlers and functions outside of loop

* chore: reword auth message for consistency

* fix: avoid JS error if redirect input is null

* fix: avoid JS error if email input is null

Co-authored-by: Miguel Peixe <miguel.peixe@automattic.com>

* fix(newsletters): use international date format (#1855)

* fix: tweak arguments for magic link client hash (#1862)

* feat(donations): remove defaultFrequency from the configuration (#1814)

It's not configurable. See Automattic/newspack-blocks#1218

* fix(ga): cookie parsing (#1857)

* fix(active-campaign): legacy contacts detection (#1858)

Co-authored-by: Adam Boro <adam@adamboro.com>
Co-authored-by: Miguel Peixe <miguel.peixe@automattic.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Thomas Guillot <thomasguillot@users.noreply.github.com>
Co-authored-by: matticbot <sysops+ghmatticbot@automattic.com>
Co-authored-by: dnalla1928 <53319922+dnalla1928@users.noreply.github.com>
Co-authored-by: Claudiu Lodromanean <claudiulodro@gmail.com>
@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.88.0-alpha.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.89.0-alpha.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.89.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released on @alpha released [Status] Approved The pull request has been reviewed and is ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants