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

feat(utils): extend truncate text #709

Merged
merged 4 commits into from
Jun 20, 2024
Merged

feat(utils): extend truncate text #709

merged 4 commits into from
Jun 20, 2024

Conversation

BioPhoton
Copy link
Collaborator

@BioPhoton BioPhoton commented Jun 15, 2024

This PR extends the functionality for truncateText with:

  • an additional overload for the options. before: maxLength: number after: maxLength: number || {maxLength: number; position: string; ellipsis: string}
  • add ellipsis symbol at: start or end or middle
  • configure the ellipsis symbol

@BioPhoton BioPhoton marked this pull request as ready for review June 15, 2024 00:30
Copy link

github-actions bot commented Jun 15, 2024

Code PushUp

🤨 Code PushUp report has both improvements and regressions – compared target commit b360341 with source commit b662c44.

🏷️ Categories

🏷️ Category ⭐ Current score ⭐ Previous score 🔄 Score change
Performance 🟡 85 🟢 91 ↓ −5.7
Accessibility 🟢 98 🟢 100 ↓ −1.7
Code coverage 🟡 89 🟡 89 ↑ +0
Best Practices 🟢 100 🟢 100
SEO 🟡 85 🟡 85
Bug prevention 🟢 100 🟢 100
Code style 🟢 99 🟢 99
Security 🟢 100 🟢 100
Updates 🟡 79 🟡 79
Custom checks 🟡 67 🟡 67

🗃️ Groups

👍 1 group improved, 👎 2 groups regressed
🔌 Plugin 🗃️ Group ⭐ Current score ⭐ Previous score 🔄 Score change
Lighthouse Performance 🟡 85 🟢 91 ↓ −5.7
Lighthouse Accessibility 🟢 98 🟢 100 ↓ −1.7
Code coverage Code coverage metrics 🟡 89 🟡 89 ↑ +0

17 other groups are unchanged.

🛡️ Audits

👍 2 audits improved, 👎 5 audits regressed, 12 audits changed without impacting score
🔌 Plugin 🛡️ Audit 📏 Current value 📏 Previous value 🔄 Value change
Lighthouse Background and foreground colors have a sufficient contrast ratio 🟥 0 🟩 0  −∞ %
Lighthouse Cumulative Layout Shift 🟨 0.199 🟨 0.147  −∞ %
Lighthouse First Contentful Paint 🟩 1.7 s 🟩 1.1 s ↑ +53 %
Lighthouse Largest Contentful Paint 🟨 2.8 s 🟨 2.6 s ↑ +10 %
Lighthouse First Meaningful Paint 🟩 1.7 s 🟩 1.1 s ↑ +53 %
Lighthouse Max Potential First Input Delay 🟩 20 ms 🟩 90 ms ↓ −82 %
Code coverage Line coverage 🟩 91 % 🟩 91 %  +0 %
Lighthouse Avoids enormous network payloads 🟩 Total size was 432 KiB 🟩 Total size was 431 KiB ↑ +0 %
Lighthouse Uses efficient cache policy on static assets 🟨 11 resources found 🟨 11 resources found ↑ +0 %
Lighthouse Speed Index 🟩 1.7 s 🟩 1.1 s ↑ +53 %
Lighthouse Time to Interactive 🟩 1.7 s 🟩 1.2 s ↑ +47 %
Lighthouse Metrics 🟩 1697 🟩 1154 ↑ +47 %
Lighthouse Minimizes main-thread work 🟩 1.8 s 🟩 1.3 s ↑ +37 %
Lighthouse Properly size images 🟥 Potential savings of 240 KiB 🟥 Potential savings of 239 KiB ↑ +121 %
Lighthouse Server Backend Latencies 🟩 20 ms 🟩 10 ms ↑ +267 %
Lighthouse Total Blocking Time 🟩 0 ms 🟩 10 ms ↓ −100 %
Lighthouse Network Round Trip Times 🟩 10 ms 🟩 10 ms ↓ −62 %
Lighthouse JavaScript execution time 🟩 0.0 s 🟩 0.0 s ↑ +17 %
Lighthouse Initial server response time was short 🟩 Root document took 10 ms 🟩 Root document took 10 ms ↓ −14 %

490 other audits are unchanged.

vmasek
vmasek previously approved these changes Jun 17, 2024
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
@matejchalk
Copy link
Collaborator

@BioPhoton If you merge main the audit job should pass, I fixed it in c312d62.

@BioPhoton BioPhoton merged commit 8d6dccb into main Jun 20, 2024
16 checks passed
@BioPhoton BioPhoton deleted the extend-truncate-text branch June 20, 2024 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants