-
Notifications
You must be signed in to change notification settings - Fork 2
Move footer to Strapi #2425
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
base: main
Are you sure you want to change the base?
Move footer to Strapi #2425
Conversation
…ated a new view component Basic styling and layout on the component completed
Initial setup of mocks and testing
Updating the mock Adding stub into system and request tests Updating footer testing
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.
A couple of comments on some of the lookups in the component, otherwise looks good 👍
end | ||
|
||
def company_logo | ||
data_models_by_type(Cms::Models::Images::Image).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.
Seems a bit risky fetching these values based on their order. It looks like there's a key being used elsewhere, perhaps this could be refactored to make use of the key here too instead of first/second?
data.select { |model| model.is_a?(type) } | ||
end | ||
|
||
def find_text_field(index) |
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.
This method seems a little unnecessary. The company_url
and funding_url
methods could be rewritten to be more similar to the company_logo
and funding_logo
methods to just have the data_models_by_type
call directly in them and this extracted method wouldn't be needed.
…s by key Refactored footer component Updated and added additional tests
|
@A-Wheeto I don't love the way the view now has a bunch of How about using the
and then your view file can just call each of these methods in place and look nice and tidy. I'm not sure on having the What do you think? |
Thanks @markjs - on second look you have a good point on the |
Status
Review progress:
What's changed?
Steps to perform after deploying to production
If the production environment requires any extra work after this PR has been deployed detail it here. This could be running a Rake task, migrating a DB table, or upgrading a Gem. That kind of thing.