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

Feature/background component #93

Merged
merged 13 commits into from
Dec 7, 2020
Merged

Conversation

PriyaRajarathinam
Copy link
Contributor

Problem

As an engineer, I want a baseline background for cross-sectional components.

Link to Asana Ticket

Solution

I implemented a Background component that creates an overarching background for the sections. There is a separate background for Sections 1-4 and a separate background for Sections 5-7. Sections 1-4 have the basic background with a blue wire frame and Sections 5-7 have a gradient background with a rainbow wire frame.

Change summary:

  • Added background component and imported new images
  • added background to the home component

Steps to Verify:

  1. Start the webserver to see the feature
  2. It looks nice with only seven sections (4 in section 1 and 3 in section 2)

Screenshots (optional):

Show-n-tell images/animations here

src/images/wire.svg Outdated Show resolved Hide resolved
src/views/Hero/Hero.scss Outdated Show resolved Hide resolved
Priya Rajarathinam added 3 commits December 2, 2020 17:53
Copy link
Member

@ilopezro ilopezro left a comment

Choose a reason for hiding this comment

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

This looks really good to me! I just have a super quick question: is this the intended view right now? I see that when I resize I can see the rest of the background. My guess is that as we keep adding components, the background will slowly appear where it's supposed to be

Screen Shot 2020-12-03 at 12 56 22 AM

Comment on lines +13 to +18
<div className="Background">
<div className="Background__gradient"></div>
<div className="Background__children">{children}</div>
<Wire className="Background__wire"></Wire>
<Rainbow className="Background__wire--variant"></Rainbow>
</div>
Copy link
Member

Choose a reason for hiding this comment

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

🎉

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup! It's meant to work with 7 sections.

Copy link
Contributor

Choose a reason for hiding this comment

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

This looks amazing with more sections added in!

Copy link
Member

@ejmockler ejmockler left a comment

Choose a reason for hiding this comment

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

cool progress so far! let's flush out further details with Calum tomorrow during the meeting

@@ -0,0 +1,40 @@
@use "~stylesheets/typography";

.Background {
Copy link
Member

Choose a reason for hiding this comment

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

I suggest adding something along the lines of height: 3000px to create some negative space to work with while everyone stages each section. we'll drop the fixed height as new sections are developed to occupy the space

Copy link
Contributor

Choose a reason for hiding this comment

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

Could we even do 7000px for each of the supposed 7 sections?

}

&__gradient {
z-index: -500;
Copy link
Member

Choose a reason for hiding this comment

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

let's have less variance in z-indexing to keep everyone sane. I recommend keeping things linear (-1, -2, -3, etc) so the layering is always obvious

Comment on lines +10 to +38
&__wire {
z-index: -1;
position: absolute;
width: 100%;
bottom: calc(100% / 7 * 3);

&--variant {
position: absolute;
width: 100%;
bottom: 0;
}
}

&__children {
z-index: 999;
position: relative;
}

&__gradient {
z-index: -2;
position: absolute;
background: linear-gradient(
180deg,
var(--blue) 0%,
var(--blue__gradient) 100%
);
width: 100%;
height: calc(100% / 7 * 3);
bottom: 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think we could rearrange the SCSS to replicate the structure of the HTML? It'll just make things easier to understand.

}

&__children {
z-index: 999;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we also change to to something more realistic? Like 0 or 1? My components have z-indices too, but I'm not sure how that might clash.

Copy link
Contributor

@tim-nguyen-cs tim-nguyen-cs left a comment

Choose a reason for hiding this comment

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

Everything looks good to me! I love the absolute/relative positioning magic - great job @PriyaRajarathinam !

Copy link
Member

@ejmockler ejmockler left a comment

Choose a reason for hiding this comment

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

I think the background is ready for staging! let's get this into main & go from there..

@ejmockler ejmockler merged commit 504454c into main Dec 7, 2020
@ejmockler ejmockler deleted the feature/background-component branch December 7, 2020 00:36
ilopezro pushed a commit that referenced this pull request Dec 20, 2020
* Merging main to branch

* Updated scaling on images and made rendering children more dynamic

* Fixed formatting for linter

* removed unused css class

* fixed linting error

* Upgraded react import statement

* Updated variable names, added new line to svg, removed presrve aspect ratio, refractored code to work by just dropping in the children props

* fixed lint issue

* removed comments from hero.scss

* updated rainbow path svg

* added 3000px background and changed z-indices

Co-authored-by: Priya Rajarathinam <cat@jjjjjjj.attlocal.net>
@ilopezro ilopezro mentioned this pull request Dec 26, 2020
ilopezro pushed a commit that referenced this pull request Dec 26, 2020
* Merging main to branch

* Updated scaling on images and made rendering children more dynamic

* Fixed formatting for linter

* removed unused css class

* fixed linting error

* Upgraded react import statement

* Updated variable names, added new line to svg, removed presrve aspect ratio, refractored code to work by just dropping in the children props

* fixed lint issue

* removed comments from hero.scss

* updated rainbow path svg

* added 3000px background and changed z-indices

Co-authored-by: Priya Rajarathinam <cat@jjjjjjj.attlocal.net>
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.

5 participants