Skip to content

Some fixes for notifications #11094

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

Merged
merged 1 commit into from
Feb 6, 2024
Merged

Conversation

agjohnson
Copy link
Contributor

This includes a few fixes and small restructuring to the notification/message classes.

  • Centralize message lookup and format string population on the registry model instead of the Notification model. This change will make more sense with my next PR
  • Use copy() when setting the format values, as to ensure thread safety, these shouldn't be set on the static instance class in the registry.
  • Add a base class for notifications, for messages/notifications that fall outside doc building.

This includes a few fixes and small restructuring to the notification/message classes.

- Centralize message lookup and format string population on the registry model
  instead of the Notification model. This change will make more sense with my next PR
- Use `copy()` when setting the format values, as to ensure thread safety,
  these shouldn't be set on the static instance class in the registry.
- Add a base class for notifications, for messages/notifications that fall
  outside doc building.
Copy link
Member

@stsewd stsewd left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@humitos humitos left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this issue 👍🏼

@agjohnson agjohnson merged commit 40e161d into main Feb 6, 2024
@agjohnson agjohnson deleted the agj/notification-message-fixes branch February 6, 2024 17:32
humitos added a commit that referenced this pull request Feb 21, 2024
In #11094 we introduce a bug in the rendering because we stopped initializing
the Message class with the `format_values` from the `Notification` object
itself. That's why all the notifications weren't rendering these values.
humitos added a commit that referenced this pull request Feb 21, 2024
* Notifications: fix rendering

In #11094 we introduce a bug in the rendering because we stopped initializing
the Message class with the `format_values` from the `Notification` object
itself. That's why all the notifications weren't rendering these values.

* Notifications: typo
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.

3 participants