-
Notifications
You must be signed in to change notification settings - Fork 8
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
[PLA-2098] Update qr code styling #291
base: master
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
config/enjin-platform.php
Outdated
@@ -230,6 +230,8 @@ | |||
'adapter' => PlatformQrAdapter::class, | |||
'size' => env('QR_CODE_SIZE', 512), | |||
'format' => env('QR_CODE_FORMAT', 'png'), | |||
'image' => env('QR_CODE_IMAGE_URL', __DIR__ . '/../resources/images/enjin-logo.jpg'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please could we make this optional, so self-hosted users can choose not to have an image?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to add this in our .env yeah?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes for the image and size, however would we need to tweak the QRCode format method in the GraphQlController class to skip the merge if one isn't set?
$qrCode = QrCode::format($format) | ||
->size($size) | ||
->errorCorrection('Q') | ||
->merge(config('enjin-platform.qr.image'), config('enjin-platform.qr.image_size'), true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might need to bypass this if a QR Image hasn't been set in the .env, or at least test it works without an image :)
PR Type
enhancement
Description
enjin-platform.php
.QrController
by merging an image into the QR code.Changes walkthrough 📝
enjin-platform.php
Add QR code image URL and size configuration
config/enjin-platform.php
image_size
configuration for QR code.QrController.php
Enhance QR code generation with image and styling
src/Http/Controllers/QrController.php