Skip to content

Conversation

@SegiNyn
Copy link
Contributor

@SegiNyn SegiNyn commented Feb 12, 2025

There is still the issue of an empty description section being present in the notification email of the cloned event due to the added wrapper RichMarkup('<div class="preformatted"></div>')

@SegiNyn SegiNyn force-pushed the clone-event-notifications branch from 0a766a9 to 1e8f12a Compare February 12, 2025 12:40
'timezone': event.timezone,
'title': event.title,
'description': event.description,
'description': event.description or '',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ThiefMaster, this fixes the issue with the empty description section but I'm not sure if this is the best place to fix it. Calling event.description when the description is empty returns RichMarkup('') and assigning that to the new event causes RichMarkup to add the extra preformatted wrapper RichMarkup('<div class="preformatted"></div>')

Copy link
Member

Choose a reason for hiding this comment

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

i think you could also just use event._description there to avoid triggering any special RichMarkup logic

Copy link
Member

Choose a reason for hiding this comment

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

i recommend also cloning the render_mode in that case. right now it's always HTML but we have a PR to support markdown there and then it'll be important to preserve both the original description and the render mode

Copy link
Contributor Author

@SegiNyn SegiNyn Feb 12, 2025

Choose a reason for hiding this comment

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

In the RenderModeMixin the default isreturn cls.default_render_mode is returned when there is only one possible option so nothing is being stored right now

Copy link
Member

Choose a reason for hiding this comment

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

ah, forgot about that. nevermind then

@SegiNyn SegiNyn force-pushed the clone-event-notifications branch from 1e8f12a to 6b913eb Compare February 12, 2025 13:23
@ThiefMaster ThiefMaster force-pushed the clone-event-notifications branch from 6b913eb to 9491d92 Compare February 17, 2025 13:49
@ThiefMaster ThiefMaster force-pushed the clone-event-notifications branch from 9491d92 to 52c9419 Compare February 17, 2025 13:51
@ThiefMaster ThiefMaster enabled auto-merge (squash) February 17, 2025 13:51
@ThiefMaster ThiefMaster merged commit 515e234 into indico:master Feb 17, 2025
10 checks passed
@ThiefMaster ThiefMaster deleted the clone-event-notifications branch February 17, 2025 13:55
SegiNyn added a commit to UNOG-Indico/indico-core that referenced this pull request Feb 18, 2025
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.

2 participants