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

fix(alerting): replace HTML entities with emojis in teams-workflows provider to prevent rendering issues #941

Merged
merged 4 commits into from
Jan 14, 2025

Conversation

pieceofsoul
Copy link
Contributor

Summary

Emojis written as HTML entities are not working as expected. Especially on mobilde devices (android) the entity is not rendered. Desktop seems to work. The assumption is that there is no full support of html entities for adaptive cards: https://learn.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-format?tabs=adaptive-md%2Cdesktop%2Cdesktop1%2Cdesktop2%2Cconnector-html

However, replacing them with emojis itself, works on desktop and mobile devices.

Checklist

  • Tested and/or added tests to validate that the changes work as intended, if applicable.
  • Updated documentation in README.md, if applicable.

Verified by running gatus locally with a local config. Desktop and mobile view are both showing the emojis in an appropriate way.

@pieceofsoul pieceofsoul changed the title replace html entities with emojis to prevent rendering issues fix: replace html entities with emojis to prevent rendering issues Dec 20, 2024
TwiN
TwiN previously approved these changes Dec 28, 2024
@TwiN TwiN dismissed their stale review December 28, 2024 16:24

Failing tests

Copy link
Owner

@TwiN TwiN left a comment

Choose a reason for hiding this comment

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

You'll have to update the tests as well

@pieceofsoul pieceofsoul force-pushed the fix-teams-workflows-emojis branch from 910e52c to c2132ed Compare December 29, 2024 06:41
@pieceofsoul pieceofsoul requested a review from TwiN December 29, 2024 06:44
@pieceofsoul
Copy link
Contributor Author

Apologies for the oversight. I've updated the tests, and they are now passing as expected.

@TwiN TwiN changed the title fix: replace html entities with emojis to prevent rendering issues fix: replace html entities with emojis in teams-workflows provider to prevent rendering issues Jan 14, 2025
@TwiN TwiN added the area/alerting Related to alerting label Jan 14, 2025
@TwiN TwiN changed the title fix: replace html entities with emojis in teams-workflows provider to prevent rendering issues fix(alerting): replace HTML entities with emojis in teams-workflows provider to prevent rendering issues Jan 14, 2025
Copy link

codecov bot commented Jan 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.04%. Comparing base (47246dd) to head (eba3361).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #941   +/-   ##
=======================================
  Coverage   76.04%   76.04%           
=======================================
  Files          74       74           
  Lines        6704     6704           
=======================================
  Hits         5098     5098           
  Misses       1304     1304           
  Partials      302      302           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TwiN TwiN merged commit 1ddaf5f into TwiN:master Jan 14, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/alerting Related to alerting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants