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

Tinymce fix notifications #246

Merged
merged 10 commits into from
Jul 8, 2024

Conversation

wwelling
Copy link
Contributor

@wwelling wwelling commented Jul 5, 2024

Description

Two things; one the tinymce wysiwyg was not receiving the notification data on update. This is inconsistent with expected use and unknown cause with the tamu-library-component. Adding timeout to digest cycle and reserving the binding with notification data from the scope to the modal resolved this issue.

Until tl-wysiwyg affords consistent binding here is the workaround:

            const modal = angular.element('#editNotificationModal');
            if (modal) {
                const iframe = modal.find("iframe");
                if (iframe && iframe.length >= 1) {
                    iframe[0].contentDocument.body.innerHTML = notification.body;
                }
            }

Fixes #245

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Test locally with various notifications created and modified.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@wwelling wwelling changed the base branch from main to operations-sprint3-staging July 5, 2024 14:16
@wwelling wwelling force-pushed the tinymce-fix-notifications branch from 30c9368 to 132a7fe Compare July 5, 2024 14:21
@coveralls
Copy link

Coverage Status

coverage: 39.477% (-0.6%) from 40.103%
when pulling 132a7fe on tinymce-fix-notifications
into 0af49fd on operations-sprint3-staging.

@coveralls
Copy link

Coverage Status

coverage: 39.516% (-0.6%) from 40.103%
when pulling e6ac5d1 on tinymce-fix-notifications
into 0af49fd on operations-sprint3-staging.

@coveralls
Copy link

Coverage Status

coverage: 40.28% (+0.2%) from 40.103%
when pulling 364b613 on tinymce-fix-notifications
into 0af49fd on operations-sprint3-staging.

@wwelling wwelling requested review from qtamu and kaladay July 5, 2024 15:07
tamu-library-components brings in tinymce
@coveralls
Copy link

coveralls commented Jul 8, 2024

Coverage Status

coverage: 40.28% (+0.2%) from 40.103%
when pulling dcc2928 on tinymce-fix-notifications
into bada853 on operations-sprint3-staging.

Copy link
Contributor

@kaladay kaladay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved on the basis that var is being used to be consistent with existing code.

@wwelling wwelling force-pushed the tinymce-fix-notifications branch 2 times, most recently from 9813421 to 2809f72 Compare July 8, 2024 15:14
@wwelling wwelling merged commit 139583d into operations-sprint3-staging Jul 8, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to update the body of a notification in the Status application.
5 participants