-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: logo slot and hide_logo attribute added to footer #2611
base: main
Are you sure you want to change the base?
Conversation
🚀 Netlify deployed citizens-advice-design-system as draft https://63c6c4a61de77f573bfcdc38--citizens-advice-design-system.netlify.app |
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 is great!
I have a couple of thoughts that it would be good to get your's and @davidrapson's views on.
- we could rip the band aid off and have a breaking change where the presence of the logo slot or not determines if it is rendered, rather than a dedicated boolean param
- we could infer the presence of the logo from the
homepage_url
and not provide a fallback for it here@homepage_url = homepage_url || "/" - or we could do this, which is also fine but wondering if we can avoid an additional param to keep the interface simpler
I definitely prefer this version:
Especially as it's a closer match for the header component then. I think we can be relatively bullish on breaking changes to component interfaces given if we need to be. Supporting General approach looks ace though, always happy to avoid needing custom css background images for this use case. |
🚀 Netlify deployed citizens-advice-design-system as draft https://63d00a19ef57fb10d437bd15--citizens-advice-design-system.netlify.app |
🚀 Netlify deployed citizens-advice-design-system as draft https://63d00d5aa4e676009fd866e6--citizens-advice-design-system.netlify.app |
Thanks both! I've now added the footer logo slot as a breaking change. I've also ended up removing the |
@@ -3,6 +3,7 @@ | |||
class AppFooterComponent < ViewComponent::Base | |||
def call | |||
render CitizensAdviceComponents::Footer.new do |c| | |||
c.logo(url: "/") |
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.
I think we've discussed it before but it feels like the logo in the design system docs should lead to the main CA site (or be a design system specific logo)
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.
👍 Realised this was still waiting on review but it looks fab to me barring the older conflicts from the viewcomponent 3 upgrade.
e55d21d
to
af94abb
Compare
🚀 Netlify deployed citizens-advice-design-system as draft https://64e8d2264e0fc50d2243b630--citizens-advice-design-system.netlify.app |
193b907
to
b78bd0b
Compare
🚀 Netlify deployed citizens-advice-design-system as draft https://6509aca1de9fe8062150d96d--citizens-advice-design-system.netlify.app |
b78bd0b
to
6db90f7
Compare
🚀 Netlify deployed citizens-advice-design-system as draft https://6509afee63b6e30877956d5f--citizens-advice-design-system.netlify.app |
While working on recent footer updates, I needed to change the logo in the footer and later remove the logo completely. I thought that it would be good to add more flexibility to the design system regarding the footer logo. This PR:
hide_logo
attributelogo
slot to allow customising the logo where needed. If there is no logo slot added, it defaults to the current logo link (otherwise this would be a breaking change)The way the logo slot works is inspired by the
HeaderComponent
logo slot