-
-
Notifications
You must be signed in to change notification settings - Fork 587
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
[MIG] website_mass_mailing_name: Migration to 12.0 #385
Conversation
074e240
to
e05b836
Compare
Once test fixed I'll set to review |
e05b836
to
70e9167
Compare
cc @Tecnativa |
70e9167
to
3dde16b
Compare
website_mass_mailing_name/static/src/css/website_mass_mailing_name.scss
Outdated
Show resolved
Hide resolved
website_mass_mailing_name/static/src/css/website_mass_mailing_name.scss
Outdated
Show resolved
Hide resolved
website_mass_mailing_name/static/src/js/editor_and_public_tour.js
Outdated
Show resolved
Hide resolved
website_mass_mailing_name/static/src/js/website_mass_mailing_name.js
Outdated
Show resolved
Hide resolved
website_mass_mailing_name/static/src/js/website_mass_mailing_name.js
Outdated
Show resolved
Hide resolved
3dde16b
to
b6063d5
Compare
Changes done @yajo |
website_mass_mailing_name/static/src/js/website_mass_mailing_name.js
Outdated
Show resolved
Hide resolved
b6063d5
to
be463f8
Compare
@yajo Changes done |
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.
LGTM, tested on runbot
website_mass_mailing_name/static/src/js/website_mass_mailing_name.js
Outdated
Show resolved
Hide resolved
website_mass_mailing_name/static/src/js/website_mass_mailing_name.js
Outdated
Show resolved
Hide resolved
When someone approves a PR, but put comments, they are only informative ones, that can be changed if you want, but not blocking. I understand those 2 as this type, for knowing more JS tricks, accelerators, and so. I'm seeing a warning in runbot, but logs are not accessible. I have launched a rebuild. Please check when finished, and if you want, make the proposed improvements, that are not blocking. |
be463f8
to
3901215
Compare
Changes done @pedrobaeza @Tardo please review |
@victormmtorres thx, good work! |
website_mass_mailing_name/static/src/js/website_mass_mailing_name.js
Outdated
Show resolved
Hide resolved
website_mass_mailing_name/static/src/js/website_mass_mailing_name.js
Outdated
Show resolved
Hide resolved
website_mass_mailing_name/static/src/js/website_mass_mailing_name.js
Outdated
Show resolved
Hide resolved
website_mass_mailing_name/static/src/js/website_mass_mailing_name.js
Outdated
Show resolved
Hide resolved
on_click: function() { | ||
var email_error = !this.$email.val().match(/.+@.+/), | ||
_onClick: function() { | ||
function validateEmail(sEmail) { |
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.
Sorry @victormmtorres I don't fully understand what you want to achieve here 🙂 You should not need to validate email here don't you? You already have that in the main method: https://github.com/odoo/odoo/blob/12.0/addons/website_mass_mailing/static/src/js/website_mass_mailing.js#L41-L64
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.
I will change this part
Let you have the name field in the mass mailing subscription snippet. Leave most logic to base module. Make name field autofilled if user data is available. Add tour test.
Test does not work, probably due to the framework. Leaving out the last step and hope for the best for v9.
[FIX]website_mass_mailing_name: Show disabled name. When the snippet appears as disabled, do not hide the name field.
- Relicense to LGPL. - Fix all known issues. - Enable tour only in demo instances. - Fix Sass headers. - Remove compiled css and maps. - Update JS modules to new api. - Update tour to new tours api. - Update module structure to match latest template.
Under some integration environment, the public part of the tour fails to load, I don't know exactly why (or better, I don't know why it was working before, because it was deleting the phantomjs session entirely). In any case, with this fix, it works there and is faster to test.
@yajo please help me out as none of the suggested changes are working and I spend some time investigating and I believe at least the validation for email should work |
3901215
to
19a3e30
Compare
Changes done @chienandalu @yajo |
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.
Thanks @victormmtorres !
if (email_error || name_error) { | ||
this.$target.addClass("has-error") | ||
_onClick: function() { | ||
var email_valid = this.$email[0].reportValidity(), |
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.
I still think we're checking this twice. Anyway, not blocking.
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.
Yes, but there's a reason for that.
If we do it like it is now, UX is way better. The user gets a clear bubble indicating where the problem is. Maybe it's a wrong email, or maybe it's an empty field.
If we rely on upstream validation, it would just set all red (in fact, both fields) and say nothing. It's OK if there's only one field, but now that there are 2, if they are validated in different ways, it gets inconsistent.
The way odoo does it supports very old browsers, but has the problems explained in odoo/odoo#14942.
However it's true that you can add a comment explaining why we're duplicating this validation here, @victormmtorres.
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.
Add the comment and I'll merge
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.
Add the comment and I'll merge
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.
comment added
This PR has the |
19a3e30
to
2ff470b
Compare
No description provided.