-
-
Notifications
You must be signed in to change notification settings - Fork 729
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
Ensure map icon URLs are correctly generated with fingerprints #5635
Conversation
Hmmm... nope, this will be a lot more tricky to fix than I first thought. |
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.
but shouldn't we then add sprockets-rails
?
I think that initial code comment was a bit off. It looks like asset handling has been extracted a bit, and gets moved to a gem in a later version. Updated. |
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.
It's great you are finding the fixes for these things Matt!
I dont want to block this fix and the release but I'd prefer to see these solutions improved.
app/assets/javascripts/darkswarm/services/map_configuration.js.erb.coffee
Show resolved
Hide resolved
app/services/image_path_service.rb
Outdated
@@ -0,0 +1,10 @@ | |||
# frozen_string_literal: true | |||
|
|||
class ImagePathService |
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 agreed we dont use Service in the services names: https://community.openfoodnetwork.org/t/how-to-name-a-new-service-in-ofn/1530/9
We dont need to be strict but we can easily follow the convention here with a service name like ImagePathBuilder.call or just ImagePath.call
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.
Thanks Matt! I think a service is always better than an helper 👍
I left a comment about the service name.
@luisramos0 how's that? 130f639 |
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.
Perfect, thanks!
Hey @Matt-Yorkley , In staging AU, the previously missing enterprises are now marked with a +1: In staging AU, the previously missing enterprises in Manchester and Sheffield are as well now marked with a +1: I also checked whether Groups are displayed on maps correctly - all good as well. Awesome Matt - thank you for tackling this so fast! |
yeah, amazing! |
What? Why?
Closes #5633
Closely related to #5622
Ensures map icon URLs are generated with fingerprints (and correctly found).
What should we test?
Maps icons are all okay in v3.
Release notes
Fixed missing map icons issue in Rails 4.