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

Fixes #30601 - replace mount_react_component in toasts #7943

Merged
merged 1 commit into from
Sep 1, 2020

Conversation

MariaAga
Copy link
Member

Didn't want to make this a toast refactor PR so I kept the div for the J-Query to add toasts
replaces mount_react_component with react_component in ToastNotifications

@theforeman-bot
Copy link
Member

Issues: #30601

@@ -474,7 +474,7 @@ def user_set?(field)
def notifications
content_tag :div, id: 'toast-notifications-container',
'data-notifications': toast_notifications_data.to_json.html_safe do
mount_react_component('ToastNotifications', '#toast-notifications-container')
react_component('ToastNotifications')
Copy link
Member

Choose a reason for hiding this comment

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

Can you also remove the content_tag from line 475?

Copy link
Member Author

@MariaAga MariaAga Sep 1, 2020

Choose a reason for hiding this comment

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

I can't because the notification load from <div id='toast-notifications-container' data-notifications='some_notifications'> and then deleted by removing the data-notifications attribute from the div

Copy link
Member

@amirfefer amirfefer left a comment

Choose a reason for hiding this comment

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

Thanks @MariaAga !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants