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

42 - styling page footer - Man #55

Merged
merged 38 commits into from
Oct 16, 2023
Merged

42 - styling page footer - Man #55

merged 38 commits into from
Oct 16, 2023

Conversation

ManSangSin
Copy link
Owner

Naming Rules

Name your PR like this: ISSUENUMBER-TITLE-YOURNAME

Description

  • created components: Footer, ExternalLink, OrganisationLink
  • imported components into Home.js
  • created separate footer stylesheet component

Related to

Make sure you include the issue number with a hash sign # so Github can link this PR to the right issue, like this:

Addresses #42

Checklist:

  • My code follows the style guidelines of this project
  • I have carefully reviewed my own code
  • I have commented my code
  • I have updated any documentation

@ManSangSin ManSangSin requested a review from mferryRV October 13, 2023 21:44
Copy link
Collaborator

@mferryRV mferryRV left a comment

Choose a reason for hiding this comment

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

Nice job with flex and matching the designs:
image

I'd like you to restructure some CSS and move content out of the code per my comments. This will make the component easier to use and update in the future.

Also, it looks like the vertical spacing is being thrown off by the default <h3> sizing in the OrganisationalLink component. This should be a small fix that results in a better match to the design.


const ExternalLinks = ({ companyIcon, text, linkUrl }) => {
return (
<a href={linkUrl}>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's do target="_blank" to open these in a new tab

Copy link
Collaborator

@mferryRV mferryRV Oct 14, 2023

Choose a reason for hiding this comment

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

Same for OrganisationLink

@@ -0,0 +1,65 @@
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');
Copy link
Collaborator

Choose a reason for hiding this comment

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

Again it would be good to have this at a higher level so you don't need to import them in multiple places

<footer>
<div className="footer-disclaimer">
<p>
Working under the artistic name Unity, Deirdre Molloy will exhibit the Black Atlantic Rhythm Codes map in Nantes, France in 2024. All contributors will be credited, with permission, including the creators of this Code Your Future prototype. The exhibition will be co-produced by Gerador and promoted by Project Manifest.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I recommend moving all content into a const content = {} object to separate copy from code.

E.g.

const content = {
  text: "example"
};

const Component = () => <div>{content.text}</div>;

This makes it easier to tell what's code and what's not.

</div>
<div className="flex-container">
<div className="organisation-links-container">
<OrganisationLink organisationName="decodenoir.org" organisationText="This interactive map is part an ethnography exhibition concept that aims to seed a coherent African Diaspora identity narrative in hearts and minds worldwide" organisationUrl="https://www.decodenoir.org/" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd recommend mapping through an array of links here

<div className="external-links-container">
<div>
<p className="medium-font">Engineered by Team Rhythm Code</p>
<ExternalLink companyIcon={linkedinIcon} text="Christina Mifsud" linkUrl="https://github.com/christina-mifsud" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

Again a good idea to map through an array

return (
<div className="organisation-container">
<a href={organisationUrl}>
<h3 className="bold-font">{organisationName}</h3>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looking at the designs vs the component, the font looks too big - the h3 is defaulting to 28px (1.75em) when it should be 20px (1.25em)

justify-content: space-between;
}

.link {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This css should be with the ExternalLink component - try creating an ExternalLink.css file and import it into ExternalLink.js

Copy link
Collaborator

Choose a reason for hiding this comment

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

Same with .link-icon and .bold-font which is only used in OrganisationalLink.

By housing the CSS with the relevant component, you make them more reusable. With this CSS setup, these components can only be used in the Footer, otherwise they break.

moved data into object
set elements to use the object data instead
moved data into array
set elements to use the array data instead
moved data into array
set elements to use the array data instead
Copy link
Collaborator

@mferryRV mferryRV left a comment

Choose a reason for hiding this comment

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

Nice! Thanks for separating it out

@ManSangSin ManSangSin merged commit 7ae0454 into main Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants