-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Adding homepage header and cards seeds #2679
Adding homepage header and cards seeds #2679
Conversation
Also these comments:
|
Gemfile.lock
Outdated
@@ -41,7 +41,7 @@ GEM | |||
acts_as_votable (0.11.1) | |||
addressable (2.5.2) | |||
public_suffix (>= 2.0.2, < 4.0) | |||
ahoy_matey (1.6.0) |
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.
Why did you update this file? I know most of them all minor updates but this PR should be focused on only adding seeds to populate the homepage
header: FALSE, | ||
image_attributes: create_image_attachment('budget') | ||
) | ||
end |
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.
Could you please add a trailing whitespace at the end of this file?
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.
Done
lib/tasks/homepage.rake
Outdated
@@ -10,5 +10,4 @@ namespace :homepage do | |||
Setting['feature.homepage.widgets.feeds.processes'] = true | |||
end | |||
end | |||
|
|||
end |
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.
Could you please add a trailing whitespace at the end of this file?
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.
Done
db/dev_seeds/widgets.rb
Outdated
|
||
def create_image_attachment(type) | ||
{ | ||
cached_attachment: File.new("db/dev_seeds/images/#{type}_background.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, use Rails.root.join
instead of File.new
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.
Done
db/dev_seeds/widgets.rb
Outdated
{ | ||
cached_attachment: File.new("db/dev_seeds/images/#{type}_background.jpg"), | ||
title: "#{type}_background.jpg", | ||
user: User.where(id: 1).first |
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.
You don't need to specify a .where
here, User.first
is more than enough 😌
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.
Done
Hi Pierre! 👋 Thanks for collaborating once again with CONSUL! Please, take your time to review my comments. Feel free to ask anything before updating your PR |
Thanks, @aitbw. I applied the changes you recommended. Can you confirm that db/dev_seeds/images is a good location for images? @decabeza, I chose images from Unsplash but they are quite random. Feel free to give feedback about that. @voodoorai2000 and @decabeza, since you were the one to implement #2641, what do you think about the points I mentioned up there? |
Great @PierreMesure ! 🎉 To complete my review, could you please drop commits
Let me know if you need anything else |
@PierreMesure this is great! Thank you so much 😌 |
66ff7a4
to
8f11f21
Compare
676082c
to
1ebcf04
Compare
@aitbw Thanks for your review. I reset the commits instead of squashing them because I was struggling to force push it. I agree it looks cleaner but I'm not sure it's a good practice for bigger changes where the history of a branch can be useful. |
Thanks @PierreMesure ! 🎉 And yes, you are correct: for bigger PRs it is not recommended doing that but for this one, it's better to keep it as clean and concise as possible 😌 |
I messed with the CI by deleting some commits but the last build succeeded on my fork. |
@aitbw, @voodoorai2000 Is there anything more I need to do before it gets merged? |
Hi @PierreMesure! sorry for the delay on the response 🙏 Don't worry about random images, are ok! 😉 I created a new issue with all your comments! Many thanks! 😌 |
References
Objectives
Visual Changes
Before:
After:
Notes