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 markdown-formatter customization accessibility #3101

Merged
merged 8 commits into from Mar 25, 2024

Conversation

testableapple
Copy link
Contributor

@testableapple testableapple commented Mar 19, 2024

🔗 Issue Links

Resolves #2908

🎯 Goal

Fix markdown-formatter customization accessibility

🛠 Implementation

Make the required stuff in SwiftyMarkdown.swift publically accessible

🧪 Manual Testing Notes

  • Send a markdown message (e.g.: # Test)
  • It should be colored

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change follows zero ⚠️ policy (required)
  • This change should be manually QAed
  • Changelog is updated with client-facing changes
  • New code is covered by unit tests
  • Comparison screenshots added for visual changes
  • Affected documentation updated (docusaurus, tutorial, CMS)

🎁 Meme

gif

@testableapple testableapple added 🐞 Bug An issue or PR related to a bug 🎨 SDK: StreamChatUI Tasks related to the StreamChatUI SDK labels Mar 19, 2024
@testableapple testableapple requested a review from a team as a code owner March 19, 2024 12:16
Copy link

github-actions bot commented Mar 19, 2024

1 Warning
⚠️ Please be sure to complete the Contributor Checklist in the Pull Request description

Generated by 🚫 Danger

@testableapple testableapple force-pushed the fix/markdown-custom-font-usage branch 4 times, most recently from e265322 to 9788d74 Compare March 19, 2024 12:55
@GetStream GetStream deleted a comment from Stream-iOS-Bot Mar 19, 2024
Copy link
Member

@nuno-vieira nuno-vieira left a comment

Choose a reason for hiding this comment

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

Overall I think we should not opt for this approach, it is better we expose our own API and do not be dependent on SwiftyMarkdown 👍

@nuno-vieira nuno-vieira added ✅ Feature An issue or PR related to a feature and removed 🐞 Bug An issue or PR related to a bug labels Mar 19, 2024
@nuno-vieira
Copy link
Member

nuno-vieira commented Mar 19, 2024

Btw @testableapple this is not bug, but actually an addition 👍

@testableapple testableapple marked this pull request as draft March 19, 2024 13:36
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor

@martinmitrevski martinmitrevski left a comment

Choose a reason for hiding this comment

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

I agree with most of Nuno's points - would be good to have our own small public API. We might get rid of this dependency eventually. Maybe we can even customize the font via our Fonts type and do the transformation internally?

@testableapple testableapple marked this pull request as ready for review March 25, 2024 12:06
@GetStream GetStream deleted a comment from Stream-iOS-Bot Mar 25, 2024
@Stream-iOS-Bot
Copy link
Collaborator

StreamChat XCMetrics

target metric benchmark branch performance status
MessageList Hitches total duration 10 ms 6.68 ms 33.2% 🔼 🟢
Duration 2.6 s 2.55 s 1.92% 🔼 🟢
Hitch time ratio 4 ms per s 2.59 ms per s 35.25% 🔼 🟢
Frame rate 79 fps 78.36 fps 0.81% 🔼 🟢
Number of hitches 1 0.4 60.0% 🔼 🟢
ChannelList Hitches total duration 12.5 ms 5.84 ms 53.28% 🔼 🟢
Duration 2.6 s 2.55 s 1.92% 🔼 🟢
Hitch time ratio 5 ms per s 2.29 ms per s 54.2% 🔼 🟢
Frame rate 76 fps 74.63 fps 1.8% 🔼 🟢
Number of hitches 1.2 0.6 50.0% 🔼 🟢

Copy link
Member

@nuno-vieira nuno-vieira left a comment

Choose a reason for hiding this comment

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

LGTM! ✅

CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Member

@nuno-vieira nuno-vieira 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

sonarcloud bot commented Mar 25, 2024

@testableapple testableapple merged commit 02900b5 into develop Mar 25, 2024
15 checks passed
@testableapple testableapple deleted the fix/markdown-custom-font-usage branch March 25, 2024 17:06
@laevandus laevandus mentioned this pull request Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✅ Feature An issue or PR related to a feature 🎨 SDK: StreamChatUI Tasks related to the StreamChatUI SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow custom font usage with default markdown library
4 participants