Skip to content

[POC] Render QR codes client-side, using a library instead of Shlink's URL#637

Merged
acelaya merged 7 commits into
shlinkio:mainfrom
acelaya-forks:feature/qr-code-poc
Apr 11, 2025
Merged

[POC] Render QR codes client-side, using a library instead of Shlink's URL#637
acelaya merged 7 commits into
shlinkio:mainfrom
acelaya-forks:feature/qr-code-poc

Conversation

@acelaya

@acelaya acelaya commented Apr 8, 2025

Copy link
Copy Markdown
Member

This is a proof of concept to provide a way to generate customized short URL QR codes, without depending on Shlink's /{short-code}/qr-code public URL, which is a liability and getting deprecated, to eventually be removed in Shlink 5.0.0

This aims to provide the same capabilities, but without having to hit Shlink's server at all, and with the eventual ability to locally store the default QR code configuration in the apps using ShlinkWebComponent.

client-side-qr-codes.mp4

@acelaya acelaya force-pushed the feature/qr-code-poc branch from e62bdfd to 5c0b2dd Compare April 8, 2025 18:48
@codecov

codecov Bot commented Apr 9, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 79.26829% with 34 lines in your changes missing coverage. Please review.

Project coverage is 79.15%. Comparing base (1d4a794) to head (fb4eab6).
Report is 27 commits behind head on main.

Files with missing lines Patch % Lines
src/utils/components/QrCode.tsx 62.96% 16 Missing and 4 partials ⚠️
src/utils/helpers/clipboard.ts 44.44% 0 Missing and 5 partials ⚠️
src/short-urls/helpers/QrCodeModal.tsx 94.44% 2 Missing and 1 partial ⚠️
...c/short-urls/helpers/qr-codes/QrFormatDropdown.tsx 60.00% 0 Missing and 2 partials ⚠️
src/utils/components/CopyToClipboardIcon.tsx 85.71% 0 Missing and 2 partials ⚠️
...short-urls/helpers/qr-codes/QrDimensionControl.tsx 92.85% 0 Missing and 1 partial ⚠️
...rls/helpers/qr-codes/QrErrorCorrectionDropdown.tsx 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #637      +/-   ##
==========================================
- Coverage   79.27%   79.15%   -0.13%     
==========================================
  Files         177      177              
  Lines        7842     7876      +34     
  Branches     1499     1489      -10     
==========================================
+ Hits         6217     6234      +17     
- Misses        162      190      +28     
+ Partials     1463     1452      -11     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@acelaya acelaya force-pushed the feature/qr-code-poc branch from 26912d4 to 9de9ab7 Compare April 10, 2025 12:16
@acelaya acelaya marked this pull request as ready for review April 11, 2025 07:26
@acelaya

acelaya commented Apr 11, 2025

Copy link
Copy Markdown
Member Author

The missing code coverage requires running tests in an actual browser to properly test it. This is being addressed separately.

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.

1 participant