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

Pull in old png Solidus logo #20

Closed
wants to merge 1 commit into from

Conversation

Sinetheta
Copy link

@Sinetheta Sinetheta commented Jan 13, 2019

This PR makes us green with Solidus master.

The Solidus admin area was recently changed to use an svg logo solidusio/solidus#2995 but that is not supported by Prawn so it broke the pdf embed here.

The old png logo is no longer used in Solidus so it's only a matter of time before someone removes it. As such I have pulled it in for use in the pdf header. I kept the same filename because I figured it less likely that the png logo ever be updated again in Solidus than maybe someone customized their Solidus install by overwriting the image instead of changing the config.

This has the unfortunate affect of no longer automatically following Solidus admin logo customizations, but I don't think it would be worth doing fancy svg detection at that point. We have our own config, folks can use that if needed.

Copy link
Contributor

@aitbw aitbw left a comment

Choose a reason for hiding this comment

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

Hey @Sinetheta, thanks a lot for this PR! 🎉

Just one thing I'd like you to fix before approval: can you get the change from lib/solidus_print_invoice/version out of this PR? A new release is definitely coming, but we need to do some extra maintenance before doing so.

Thanks once again! 🙌

The Solidus admin area was recently changed to use an svg logo
solidusio/solidus#2995
but that is not supported by Prawn so it broke the pdf embed here.

The old png logo is no longer used in Solidus so it's only a matter of
time before someone removes it. As such I have pulled it in for use
in the pdf header, but kept the same name because I figured it less
likely that the png logo ever be updated again in Solidus than maybe
someone customized their Solidus install by overwriting the image
instead of changing the config.

This has the unfortunate affect of no longer automatically following
Solidus admin logo customizations, but I don't think it would be worth
doing fancy svg detection at that point. We have our own config, folks
can use that if needed.
@Sinetheta
Copy link
Author

No problem @aitbw I was just taking a stab at greening up https://extensions.solidus.io/ 😆

aitbw
aitbw previously approved these changes Jan 16, 2019
Copy link
Contributor

@aitbw aitbw left a comment

Choose a reason for hiding this comment

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

LGTM! 💪

Copy link

@jacobherrington jacobherrington left a comment

Choose a reason for hiding this comment

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

There is certainly a tradeoff here, worth discussing (maybe we should create an issue). For the sake of getting specs green, I think this works for now. Thanks!

@mdesantis
Copy link

mdesantis commented Jan 30, 2019

What about leaving the configuration possibility? With something like

preference :print_invoice_logo_path, :string, :default => Spree::Config[:print_invoice_logo]

Since it is already a preference, probably there's no need

@aitbw
Copy link
Contributor

aitbw commented Feb 1, 2019

@Sinetheta discussing this with @mdesantis, @spaghetticode, and @kennyadsl, I feel like we can improve this PR a little more: what do you think about a conditional to use the preference (if it's a PNG) or use the Solidus logo as a fallback —that way we won't break invoices with custom logos.

@aitbw aitbw dismissed their stale review February 12, 2019 18:08

Dismissed review in favour of another PR

@aitbw
Copy link
Contributor

aitbw commented Feb 12, 2019

Superseeded by #22. Thanks for your contribution anyway, @Sinetheta. Much appreciated. 🙇‍♂️

@aitbw aitbw closed this Feb 12, 2019
@Sinetheta Sinetheta deleted the old-logo branch February 12, 2019 23:29
@Sinetheta
Copy link
Author

👍 thanks guys, just happy to see a fix went it. Sorry I didn't see the notifications.

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.

None yet

4 participants