-
Notifications
You must be signed in to change notification settings - Fork 191
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
Refactor: Update Email template settings in the form builder #6890
Refactor: Update Email template settings in the form builder #6890
Conversation
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 don't recall seeing the feature to "cancel" changes in the related tasks. Did we decide on this somewhere? I remember voting against adding a "cancel" feature, as this would be a major break from convention of other settings.
@kjohnson, At one point the task was set and close with cancel & high priority. I had spoken to @jdghinson and briefly with @pauloiankoski about it during the cycle. Im not sure when it updated to just close. We have been going back and forth mainly working from the Design doc. Nonetheless, we can remove it if it's that unconventional. Personally I don't mind it, but Im biased haha. Would changing the context to reset and keeping it open be viable? Reference: https://lw.slack.com/archives/C04SLRDD9CK/p1692899169132059 |
@kjohnson Cancel has been removed, I brought the button back up to the parent component and updated its text. |
@JoshuaHungDinh I'm seeing the "Back to template settings" button below the preview, but shouldn't it be in the header? |
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.
The "Back to template settings" button should be in the modal header, but it is showing below the rendered email preview.
Ah very odd. It should be in the header. Let me take a look. |
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 for updating that button position. To QA!
@kjohnson, Im just leaving a comment here as a reference to some additional changes. During QA they tested the send email test function. It seemed to be failing when P2P was installed & I was having some difficulties sending the html emails. I have expanded the scope of this PR to address this as well. Below is a screenshot of the error while P2P was installed. Resolved: 69bc2cc
|
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.
Passed manual QA tests
Description
Reference: slack conversation about the cancel option: https://lw.slack.com/archives/C04SLRDD9CK/p1692899169132059
This PR includes several changes revolving around the Email Notification Settings. The major change involves the option that allows users to either set the email template fields or cancel the field values.This was done including by including local state within the email template component to capture all the field changes {.emailTemplateFieldValues
} and dispatching the actual Form Setting changes when the Set button is clicked. The original option config is used to update the local state when the Cancel button is clicked to revert the field valuesBoth action buttons "Set and close" & "Cancel" were moved down from the parent container to the EmailTemplateSettings component. I Initially I had looked into raising the state up to the parent in order the Submit the changes. Doing so required moving most the config logic from within the EmailTemplateSettings to the parent also. This made it harder to follow and maintain. Because of this I opted to move the action buttons down and absolutely position them to achieve an identical layout.The changes reflect the QA tasks below, along with style, typescript type & text changes.
QA Tasks completed within PR:
Visuals
Testing Instructions
Please note this PR no longer contains logic to cancel the selected email options. As the logic was included than removed in favor of a possible undo feature with gutenberg.
Please test that the email fields are working as they previously did.
Verify no fatal errors occur on email preview.
Verify default email address is populated in the send test email input.
https://www.loom.com/share/580ee957a673491ea21e01a127ed74f4?sid=93eed98b-fc59-4ed3-836f-aa7064892085
Pre-review Checklist
@unreleased
tags included in DocBlocks