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

Add option for extra powered by logo in footer #3153

Conversation

precious-onyenaucheya-ons
Copy link
Contributor

@precious-onyenaucheya-ons precious-onyenaucheya-ons commented Apr 22, 2024

What is the context of this PR?

Fixes #3134
Changes the footer component to allow users to supply an extra logo to the powered by section. Some styling were added to ensure these logos stay on the same line and behave appropriately on smaller screens.

How to review this PR

Spin up the website and head to the 'footer' component, the example-footer-with-extra-poweredby-logo on the page is the one to look at.

run yarn test --testNamePattern="macro: footer" & yarn test-visual

Checklist

This needs to be completed by the person raising the PR.

  • I have selected the correct Assignee
  • I have linked the correct Issue

@precious-onyenaucheya-ons precious-onyenaucheya-ons added the Enhancement Change of existing feature label Apr 22, 2024
@precious-onyenaucheya-ons precious-onyenaucheya-ons requested a review from a team April 22, 2024 15:00
Copy link

netlify bot commented Apr 22, 2024

Deploy Preview for ons-design-system-preview ready!

Name Link
🔨 Latest commit acdbff5
🔍 Latest deploy log https://app.netlify.com/sites/ons-design-system-preview/deploys/6659cd88964d9d0008d018d0
😎 Deploy Preview https://deploy-preview-3153--ons-design-system-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@rmccar rmccar changed the title add option for additional logo in footer Add option for additional logo in footer Apr 23, 2024
Copy link
Contributor

@rmccar rmccar left a comment

Choose a reason for hiding this comment

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

Just a few things Ive spotted

src/components/footer/_macro.njk Outdated Show resolved Hide resolved
src/components/footer/_macro.spec.js Outdated Show resolved Hide resolved
src/components/footer/_macro.spec.js Outdated Show resolved Hide resolved
src/components/footer/_macro.njk Outdated Show resolved Hide resolved
src/components/footer/_macro-options.md Outdated Show resolved Hide resolved
@rmccar
Copy link
Contributor

rmccar commented Apr 24, 2024

Screenshot 2024-04-24 at 09 13 25

The focus state is broken on the ONS logo

@rmccar
Copy link
Contributor

rmccar commented Apr 26, 2024

Looking at the SVG it has some space on the left so on small screens its not aligned with the ONS one. This looked ok before because you had the line in there. If you want to remove the line I dont think it should be cropped out, the code for it should be removed from the svg altogether but keeping the line might be easier and as I'm guessing its part of the official logo should probably be kept

Screenshot 2024-04-26 at 11 26 32

Copy link
Contributor

@rmccar rmccar left a comment

Choose a reason for hiding this comment

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

Few more small things need fixing

src/components/footer/_macro.njk Outdated Show resolved Hide resolved
src/components/footer/_macro.njk Outdated Show resolved Hide resolved
src/components/footer/_macro.spec.js Outdated Show resolved Hide resolved
src/components/footer/_macro.spec.js Outdated Show resolved Hide resolved
src/components/footer/_macro.njk Outdated Show resolved Hide resolved
rmccar
rmccar previously approved these changes Apr 30, 2024
@balibirchlee
Copy link
Contributor

Not sure if this has changed so ignore if it has, but originally when I spoke to Dina about this ticket she said that the the second logo should sit beneath the first one, not next to it

@alessioventuriniAND
Copy link
Contributor

Not sure if this has changed so ignore if it has, but originally when I spoke to Dina about this ticket she said that the the second logo should sit beneath the first one, not next to it

Can you get either Joe or Dina to review this? They need to confirm if the Logos are ok to be displayed as they are. Happy to approve once you confirm their feedback :)

@precious-onyenaucheya-ons precious-onyenaucheya-ons force-pushed the feature/3134-add-option-for-additional-logo-in-footer branch from f4444fc to 292575c Compare May 8, 2024 09:41
@precious-onyenaucheya-ons
Copy link
Contributor Author

Not sure if this has changed so ignore if it has, but originally when I spoke to Dina about this ticket she said that the the second logo should sit beneath the first one, not next to it

I had a chat with Dina and she prefers to keep the logo next to the first one. However, She was concerned about potential differences in logo heights, but I handled that by resizing the logos in the CSS file.

@rmccar rmccar dismissed their stale review May 8, 2024 09:58

Changes mean it needs another review

}
&__extra-poweredby svg,
img {
height: 30px !important;
Copy link
Contributor

Choose a reason for hiding this comment

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

Where did we get the size from? is the important really needed here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dina approved the size

Copy link
Contributor

Choose a reason for hiding this comment

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

This would cause an issue where the ons logo would be bigger when there is 2 logos and smaller when there is just the ons logo so it wouldn't be consistent in size between pages

Copy link
Contributor

@balibirchlee balibirchlee left a comment

Choose a reason for hiding this comment

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

Looks good to me, I prefer this layout to the one originally suggested.

Just to say (so no action required from your side) I'm gonna add a note to our tech session card about variable names, it's not in the scope of this ticket and it's not to do with your code at all so no concerns there!! I just don't really like the 'poweredBy' name, I feel like it's a bit unclear especially in comparison to the header logo section which is functionally very similar. Maybe that's just me though!

@rmccar
Copy link
Contributor

rmccar commented May 9, 2024

Screenshot 2024-05-09 at 09 47 46

Focus state is now an issue, it includes the margin you have added when there are two logos

@rmccar rmccar changed the title Add option for extra powered by logo in footer Add option for extra powered by logo in footer May 10, 2024
@adi-unni
Copy link
Contributor

Looks good to me, I prefer this layout to the one originally suggested.

Just to say (so no action required from your side) I'm gonna add a note to our tech session card about variable names, it's not in the scope of this ticket and it's not to do with your code at all so no concerns there!! I just don't really like the 'poweredBy' name, I feel like it's a bit unclear especially in comparison to the header logo section which is functionally very similar. Maybe that's just me though!

I also have the same sentiment :)


| Name | Type | Required | Description |
| --------- | -------------- | -------- | --------------------------------------------------------------------------------------- |
| logoImage | HTML or string | false | Any HTML to render an image for example embedded `<svg>` or `<img>`. |
Copy link
Contributor

Choose a reason for hiding this comment

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

"or string" can be removed from this, it doesn't accept a string. Also the description could do with updating the word "Any" can be removed

Comment on lines +174 to 179
<div class="ons-footer__poweredby ons-u-mb-m{% if extraPoweredByLogo %} ons-footer__extra-poweredby ons-grid--flex{% endif %}">
<a class="ons-footer__poweredBy-link{% if extraPoweredByLogo %} ons-u-mr-l{% endif %}" {% if lang == "cy" %} href="https://cy.ons.gov.uk/"{% else %} href="https://www.ons.gov.uk/"{% endif %}>
{{ onsLogo | safe }}
</a>
{{ extraPoweredByLogo | safe }}
</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<div class="ons-footer__poweredby ons-u-mb-m{% if extraPoweredByLogo %} ons-footer__extra-poweredby ons-grid--flex{% endif %}">
<a class="ons-footer__poweredBy-link{% if extraPoweredByLogo %} ons-u-mr-l{% endif %}" {% if lang == "cy" %} href="https://cy.ons.gov.uk/"{% else %} href="https://www.ons.gov.uk/"{% endif %}>
{{ onsLogo | safe }}
</a>
{{ extraPoweredByLogo | safe }}
</div>
<div class="ons-footer__poweredby ons-u-mb-m{% if extraPoweredByLogo %} ons-footer__extra-poweredby ons-grid--flex{% endif %}">
<a class="ons-footer__poweredBy-link{% if extraPoweredByLogo %} ons-u-mr-l{% endif %}" {% if lang == "cy" %} href="https://cy.ons.gov.uk/"{% else %} href="https://www.ons.gov.uk/"{% endif %}>
{{ onsLogo | safe }}
</a>
{{ extraPoweredByLogo | safe }}
</div>

Copy link
Contributor

@balibirchlee balibirchlee left a comment

Choose a reason for hiding this comment

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

We discussed this ticket and the other related ticket in the tech session, to improve standardisation, the implementation and naming of the logos in the footer should mimic the new implementation in the header - as we would plan to do this eventually anyway, it makes more sense to go with that implementation now rather than have an intermediary change, only to break it again a bit later.

@alessioventuriniAND
Copy link
Contributor

This pull request is going to be closed as the original request has now been updated and a new PR will be opened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Change of existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option for additional logo in footer
5 participants