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
Newsletter #70
Comments
I'm blocking it until we have the design of the checkbox. |
Thanks Mario. Could you please specify the Gutenberg inner blocks that will be used for the editable content? |
Oh yes, I forgot to post that sorry. I've updated the opening post. |
The designer has updated this, so I'm unblocking the issue. |
Thanks Mario. Some feedback about the editable content:
|
Yes, I agree that the placeholders and the Privacy Policy shouldn't change. Regarding the layout, I'd prefer using classes, it looks clearer to me. |
In order to test if the logic of the old implementation could work, and check the best way to connect Gutenberg and React, I created this draft Pull Request #75 . It works so I guess the migration is possible. I share it in case it's useful as an starting point. |
Description
We're going to have a reusable block named "Newsletter" that could be placed anywhere in the web. Right now, it's only used in the footer, so we should add it there.
In order to implement this, we are going to reuse the logic of our current newsletter form. Bear in mind:
role
field.afterNewsletter
as well.Logic
In order to connect the newsletter form with services like Vero, Amplitude or Analytics, we are using Google Tag Manager to manage all of them, so we have to make sure to send the proper information there (this is already done in the repo of the current newsletter).
There will be four different status of the form:
Normal
The status before the user starts interacting with it.
Active
Once the user clicks on the
input
field, the border color should change and usestate.theme.colors.frontity
.Wrong
When the user try to submit something that is not an email, or they haven't check the Privacy Policy, we should standard error like the current frontity.org. Something like this:
Success
When the email has been submitted correctly, we should change the form for a "Thanks message". Something similar to what next.js is doing.
Before submitting:
After submitting:
Possible solution
newsletter
and create a new React component with the content found there. This processor would work different than the other ones, as we don't have to keep the content structure. We could use each different element of it to populate the component.HTML
Our first idea about the Gutenberg HTML of the newsletter group is the following:
We could create a grouping
div
for them if you feel it would be easier. We are using<h6>
to specify in the Gutenberg editor which content are we changing in each paragraph, but it should be deleted in the React component. Apart from that,<h6>
isn't used in the rest of the web and this way it's clearer that is just for editable content.As said, we should consider if grouping the editable content would be easier.
Where to check
The text was updated successfully, but these errors were encountered: