Problem/Motivation

Now that we have

  • User registration
  • Webform
  • Commerce

integration for Brevo Newsletter subscription, I'm unsure if it would also make sense to provide Block Plugin for newsletter subscription.
Maybe we should also provide a central page in the main module, which the submodules can refer to for unsubscribing from the newsletter?

First the benefits and downsides surely should be discussed for both. Currently we're using the HTML forms from Brevo in these cases, which is quite flexible but also has downsides compared to a more deep Drupal integration. I'm a bit biased. What do the other maintainers think?

If there's anything implemented duplicate in the three submodules, we should use this change to move that into a helper service maybe, which can then also be used on the Block plugin?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

anybody created an issue. See original summary.

  • renrhaf committed 1f6d888f on 3592983-newsletter-block-unsubscribe
    Issue #3592983 by renrhaf: Add newsletter subscription block,...

  • renrhaf committed 1f6d888f on 3592986-eca-actions
    Issue #3592983 by renrhaf: Add newsletter subscription block,...

  • renrhaf committed 60473539 on 3592983-newsletter-block-unsubscribe
    Issue #3592983 by renrhaf: Add newsletter subscription block,...

  • renrhaf committed 60473539 on 3592986-eca-actions
    Issue #3592983 by renrhaf: Add newsletter subscription block,...

  • renrhaf committed 6fb15424 on 3592983-newsletter-block-unsubscribe
    Issue #3592983 by renrhaf: Add newsletter subscription block,...

  • renrhaf committed 6fb15424 on 3592986-eca-actions
    Issue #3592983 by renrhaf: Add newsletter subscription block,...

  • renrhaf committed 43ab2446 on 1.0.x
    Issue #3592983 by renrhaf: Add newsletter subscription block,...

  • renrhaf committed 43ab2446 on 3592986-eca-actions
    Issue #3592983 by renrhaf: Add newsletter subscription block,...
renrhaf’s picture

Status: Active » Fixed

Merged to 1.0.x.

Adds:
- A newsletter subscription Block (BrevoNewsletterBlock) placeable on any page, with list selection, optional double opt-in and a configurable success message.
- A signed-token unsubscribe controller at /brevo/unsubscribe (HMAC token so links are safe in marketing emails), backed by ContactsApiClientHelper::unsubscribeContact().
- A shared SubscriptionManager service (brevo.subscription_manager) that centralises the subscribe logic (direct/queue via the existing Brevo events, double opt-in, attributes) and is now reused by the webform handler and the user-registration integration, removing the previous duplication.

Covered by kernel + functional tests; CI green.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

anybody’s picture

@renrhaf you're crazy (with AI I guess xD)
THANKS!

renrhaf’s picture

You're welcome ! And yes I've started using Claude Code for my open source work, with a closed loop for testing on a Drupal11 fresh install
I will also test everything properly of course on top of that before creating a new release
It works very well and it's a good way to find enough time to make good progress on this module

anybody’s picture

Yeah perfect results!
BTW I saw this nice template here for the AI usage checks: https://www.drupal.org/project/canvas_override/issues/3590567

You might like it, where it makes sense? No idea if it's a new community standard.

renrhaf’s picture

Thanks for the information, I've updated my Claude guidelines to be fully transparent about the whole process !

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.