Skip to content

Make it possible to switch between SVG and PNG QR codes#3414

Merged
johannaengland merged 4 commits intoUninett:masterfrom
johannaengland:feature/svg-qr-code
Aug 15, 2025
Merged

Make it possible to switch between SVG and PNG QR codes#3414
johannaengland merged 4 commits intoUninett:masterfrom
johannaengland:feature/svg-qr-code

Conversation

@johannaengland
Copy link
Copy Markdown
Contributor

Scope and purpose

Closes #2916. Dependent on #2897 and #2899.

Adds a config option qr_codes.file_format that gives the option to switch between generating QR codes as SVG or PNG files.

Contributor Checklist

Every pull request should have this checklist filled out, no matter how small it is.
More information about contributing to NAV can be found in the
Hacker's guide to NAV.

  • Added a changelog fragment for towncrier
  • Added/amended tests for new/changed code
  • Added/changed documentation
    we don't currently have any documentation for QR codes - should I add some? And if so, where?
  • Linted/formatted the code with black and ruff, easiest by using pre-commit
  • The first line of the commit message continues the sentence "If applied, this commit will ...", starts with a capital letter, does not end with punctuation and is 50 characters or less long. See https://cbea.ms/git-commit/
  • This pull request is based on the correct upstream branch: For a patch/bugfix affecting the latest stable version, it should be based on that version's branch (<major>.<minor>.x). For a new feature or other additions, it should be based on master.

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 11, 2025

Codecov Report

❌ Patch coverage is 86.20690% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.86%. Comparing base (9a1180a) to head (0a7cffe).
⚠️ Report is 464 commits behind head on master.

Files with missing lines Patch % Lines
python/nav/web/utils.py 77.41% 7 Missing ⚠️
python/nav/web/__init__.py 93.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3414      +/-   ##
==========================================
+ Coverage   60.85%   60.86%   +0.01%     
==========================================
  Files         608      608              
  Lines       44198    44237      +39     
  Branches       48       48              
==========================================
+ Hits        26896    26927      +31     
- Misses      17290    17298       +8     
  Partials       12       12              

☔ 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.

@lunkwill42
Copy link
Copy Markdown
Member

I don't see any reason why this should still be labeled as blocked, so I removed it.

@johannaengland johannaengland requested review from a team and lunkwill42 August 13, 2025 12:40
Copy link
Copy Markdown
Member

@lunkwill42 lunkwill42 left a comment

Choose a reason for hiding this comment

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

🎉

Approving, despite the CodeCov report, since something is up with codecov now. It should greenlight the patch coverage as long as its above the global coverage (which means >60.91% should be ok in this case)

@sonarqubecloud
Copy link
Copy Markdown

@johannaengland johannaengland merged commit de9dff6 into Uninett:master Aug 15, 2025
16 checks passed
@johannaengland johannaengland deleted the feature/svg-qr-code branch August 15, 2025 08:05
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.

Make qrcode library produce SVG images instead of PNG

2 participants