Skip to content
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

Should not show 'Unsaved Changes' after sending tests #437

Closed
bossanova808 opened this issue Nov 14, 2023 · 9 comments
Closed

Should not show 'Unsaved Changes' after sending tests #437

bossanova808 opened this issue Nov 14, 2023 · 9 comments
Labels
enhancement New feature or request

Comments

@bossanova808
Copy link

Hey Ben

Very minor but I think it would be much better UX if Craft didn't show a 'showing unsaved changes' warning every time you send an email test (i.e. when there are no other changes).

Not sure if this is something you can control, though! But I do know it confuses our day to day editors each time the send a test but have not made other changes...

Hope you're well!

@bossanova808 bossanova808 added the enhancement New feature or request label Nov 14, 2023
@bencroker
Copy link
Collaborator

Thanks, I'll take a look.

@bencroker
Copy link
Collaborator

bencroker commented Nov 15, 2023

Unfortunately, this is currently not possible to prevent. Craft checks whether the value of the serialized form has changed, and since the test email field exists within the form, its value is included in the condition.
Reference: https://github.com/craftcms/cms/blob/b8f30d07cd487c5fbaa140743816e6eb7020e55d/src/web/assets/cp/src/js/ElementEditor.js#L1164C11-L1171

You could create a feature request for this behaviour to be changed in Craft core, so that parts of the DOM can be marked as ignorable, if you like.

@bossanova808
Copy link
Author

@bencroker Does Brandon's answer work for you - craftcms/cms#13936 (comment)?

@bencroker
Copy link
Collaborator

Yes, I should be able make that work with minimal changes, thanks!

@bencroker bencroker reopened this Nov 16, 2023
@bencroker
Copy link
Collaborator

Implemented in 0df879d for the next release. For the record, that was only happening when adding or removing test contacts, not when sending a test. I generally add default test contacts, which I why I rarely noticed the issue.

You can test this by running composer require "putyourlightson/craft-campaign:dev-develop as 2.10.0".

@bencroker
Copy link
Collaborator

Released in 2.10.0.

@bossanova808
Copy link
Author

Thanks Ben, appreciated, working as expected/desired now.

However, makes me notice a little bug - based on the text here I have been leaving this blank:

image

However this always results in:

image

And the message 'At least one contact must be selected' when hitting the Send Test button (as one would expect).

That should be pre-filled in with my details, shouldn't it?

@bencroker
Copy link
Collaborator

Yes, it should. That was only an issue on the campaign edit page but not on the sendout preview page, it seems.

Fixed in 038111e for the next release.

@bencroker
Copy link
Collaborator

Released in 2.11.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants