openlibrary
openlibrary copied to clipboard
Added a QR icon in Share Modal that opens to QR code on click
Closes #452
Feature: Adds a QR code icon to the share modal on books page. On icon click, a new tab opens with the QR code image. Refactor: Changed styling of Share Modal so that for small -> tablet sized screens, the share modal icons appear larger and in two rows.
Technical
Installed qrcode dependency in requirements.txt Imported qrcode and io in api.py for use in create_qrcode handler.
Testing
docker compose run --rm home make test
: passing with warnings
docker compose run --rm home pytest openlibrary/plugins/importapi/tests/test_import_validator.py
: passing with warnings
docker compose run --rm home npm run lint
: passing with deprecation warnings
Screenshot
I can change the size of the icons if these are too large. I can also change the breakpoint for when to switch from large 2-row icons, to smaller single row icons. Currently I have the icons in 2 rows for everything tablet and smaller.
Stakeholders
@jimchamp Thank you for the help!
Codecov Report
Attention: Patch coverage is 0%
with 30 lines
in your changes are missing coverage. Please review.
Project coverage is 16.11%. Comparing base (
db9ead2
) to head (936d6e1
). Report is 141 commits behind head on master.
Files | Patch % | Lines |
---|---|---|
openlibrary/plugins/openlibrary/js/modals/index.js | 0.00% | 27 Missing and 3 partials :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #9233 +/- ##
==========================================
+ Coverage 15.89% 16.11% +0.22%
==========================================
Files 90 91 +1
Lines 4732 4785 +53
Branches 824 829 +5
==========================================
+ Hits 752 771 +19
- Misses 3468 3498 +30
- Partials 512 516 +4
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@jimchamp Could you review this when you get the chance? Thanks !