Closed chiragchhatrala closed 1 month ago
The changes introduced in this pull request encompass the addition of a new console command for migrating email notifications, modifications to existing classes and components related to email and submission integrations, and the removal of outdated files. Key enhancements include the introduction of a MentionParser
for better handling of mentions in email content and the restructuring of validation rules for URLs. Additionally, new Vue components have been created to support mention functionality in user interfaces, while several existing components and tests have been updated or deleted to reflect these changes.
File Path | Change Summary |
---|---|
api/app/Console/Commands/EmailNotificationMigration.php |
Added EmailNotificationMigration class with methods for migrating email notifications. |
api/app/Http/Controllers/Forms/PublicFormController.php |
Updated redirect URL handling in answer method to validate URLs using MentionParser . |
api/app/Requests/UserFormRequest.php |
Modified validation rules for redirect_url to allow nullable strings. |
api/app/Integrations/Handlers/DiscordIntegration.php |
Updated getWebhookData method to improve message formatting using MentionParser . |
api/app/Integrations/Handlers/EmailIntegration.php |
Significant changes to validation rules and recipient handling logic in handle method. |
api/app/Integrations/Handlers/SlackIntegration.php |
Enhanced getWebhookData method for message formatting. |
api/app/Integrations/Handlers/SubmissionConfirmationIntegration.php |
Deleted class responsible for confirmation emails. |
api/app/Mail/Forms/SubmissionConfirmationMail.php |
Deleted class for handling confirmation emails. |
api/app/Notifications/Forms/FormEmailNotification.php |
Renamed from FormSubmissionNotification with updated constructor and methods for email handling. |
api/app/Open/MentionParser.php |
Added MentionParser class for parsing mentions in HTML content. |
api/app/Service/HtmlPurifier/OpenFormsHtmlDefinition.php |
Added OpenFormsHtmlDefinition class for custom HTMLPurifier attributes. |
api/config/purify.php |
Updated to use OpenFormsHtmlDefinition for HTMLPurifier configuration. |
api/resources/data/forms/integrations.json |
Removed "submission_confirmation" integration from configuration. |
api/resources/views/mail/form/confirmation-submission-notification.blade.php |
Deleted Blade template for confirmation emails. |
api/resources/views/mail/form/email-notification.blade.php |
Introduced new Blade template for email notifications. |
api/resources/views/mail/form/submission-notification.blade.php |
Deleted Blade template for submission notifications. |
api/tests/Feature/Forms/ConfirmationEmailTest.php |
Deleted tests for confirmation email functionality. |
api/tests/Feature/Forms/CustomSmtpTest.php |
Updated test case to reflect broader email functionality. |
api/tests/Feature/Forms/EmailNotificationTest.php |
Added tests for FormEmailNotification functionality. |
api/tests/Unit/EmailNotificationMigrationTest.php |
Introduced unit tests for EmailNotificationMigration command. |
api/tests/Unit/Service/Forms/MentionParserTest.php |
Added unit tests for MentionParser functionality. |
client/components/forms/MentionInput.vue |
Added new Vue component for mention input. |
client/components/forms/RichTextAreaInput.client.vue |
Replaced VueEditor with QuillyEditor component. |
client/components/forms/TextBlock.vue |
Introduced new Vue component for text blocks. |
client/components/forms/components/FormSubmissionFormatter.js |
Added class for formatting form submission data. |
client/components/forms/components/MentionDropdown.vue |
Added Vue component for mention dropdown functionality. |
client/components/forms/components/QuillyEditor.vue |
Added Vue component for Quill rich text editor. |
client/components/open/forms/OpenCompleteForm.vue |
Introduced <TextBlock> component and modified form submission handling. |
client/composables/useParseMention.js |
Added function for processing HTML content with mentions. |
client/data/forms/integrations.json |
Removed "submission_confirmation" integration from JSON configuration. |
client/lib/quill/quillMentionExtension.js |
Added custom mention extension for Quill editor. |
client/package.json |
Updated dependencies, adding Quill and removing Vue3 editor. |
EmailNotificationMigration
class and its methods are relevant to the changes in the PublicFormController
, which now includes logic for handling submissions and their associated notifications.🐰 "In the fields where the data flows,
A new command for emails grows.
With mentions parsed and rules refined,
Our forms now better intertwined.
Hooray for changes, bright and bold,
In rabbit's burrow, stories told!" 🐇
Summary by CodeRabbit
Release Notes
New Features
MentionParser
class to enhance mention functionality across various components.MentionInput
,TextBlock
,FormSubmissionFormatter
, andQuillyEditor
to improve user input and submission formatting.FormEmailNotification
class for handling email notifications for form submissions.Bug Fixes
Improvements
RichTextAreaInput
component to support mention capabilities.Removals
SubmissionConfirmationIntegration
and related components to streamline email notifications.confirmation-submission-notification
email template and associated tests.submission-notification
email template and related confirmation email tests.