Skip to content

refactor: spacing and layout WIP#31

Merged
auaruss merged 3 commits intomainfrom
refactor--page-styles
Dec 9, 2021
Merged

refactor: spacing and layout WIP#31
auaruss merged 3 commits intomainfrom
refactor--page-styles

Conversation

@changangus
Copy link
Copy Markdown
Contributor

Description

  • Created mixin for section padding
  • Added mixin to every section except ApprenticeQualities
  • Refactored PreviousApprenticeGroups to align to have all groups align to the left
  • Refactored font sizes in the hero
  • Refactored PreviousApprenticeGroup to make sure triangle svg does not wrap
  • Moved visually hidden mixin from hero sass module to mixin partials file

FSA21V2-156

Spec

Designs: [link to design if applicable]

See Story: FSA21V2-156

To Test

  1. Make sure all PR Checks have passed (Github Actions, Netlify etc).
  2. Pull down all related branches.
  3. Confirm all tests pass: npm run test:ci
  4. Confirm all linters pass

Validation

The following has been completed by the developer:

[delete anything irrelevant to this PR]

  • This PR has visual elements, so it was reviewed by a designer.
  • This PR has code changes, and our linters still pass.
  • This PR affects production code, so it was browser tested (see below).
  • This PR has new code, so new tests were added or updated, and they pass.
  • This PR has copy changes, so copy was proofread and approved.
  • The content of this PR requires documentation, so we added a detailed description of component purpose, requirements, quirks, and instructions for use by designers and developers. Along with accessibility information if pertinent.

Browser Testing

[delete if irrelevant to this issue]

Gold Level Browsers

In these browsers, all content is accessible and design matches exactly. In most cases, bugs should be resolved before merge.

macOS

  • Chrome, current release
  • Firefox, current release
  • Safari, current release

Windows

  • Chrome, current release
  • Firefox, current release

Mobile

  • Chrome on Android 9
  • Safari, current release, on iPhone

Silver Level Browsers

In these browsers, all content is readable, but design may be inaccurate.

Windows

  • Edge, current release

Mobile

  • Android 8 - Chrome on Phone
  • Safari, version before current release, on iPad (including various split screen widths)
  • Chrome on iPhone

Bronze Level Browsers

In these browsers, our only goal is content readability.

Windows

  • IE 11

@netlify
Copy link
Copy Markdown

netlify bot commented Dec 1, 2021

✔️ Deploy Preview for sb-apprentices ready!

🔨 Explore the source changes: 4b106c8

🔍 Inspect the deploy log: https://app.netlify.com/sites/sb-apprentices/deploys/61b2152e3697ee00083d1dc1

😎 Browse the preview: https://deploy-preview-31--sb-apprentices.netlify.app

Copy link
Copy Markdown
Member

@jonoliver jonoliver left a comment

Choose a reason for hiding this comment

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

This is looking really good! Starting to add some screenshots of minor issues I noticed...

This screenshot was at 766px wide, looks like a spacing issue between your social links and Alice's photo:
Screen Shot 2021-12-01 at 12 32 45 PM

}
}

@mixin visually-hidden {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

bonus refactor! Nice 😎

@changangus changangus force-pushed the refactor--page-styles branch from 443ffc4 to d91f3b5 Compare December 1, 2021 22:28
@changangus changangus force-pushed the refactor--page-styles branch from d91f3b5 to c3621d7 Compare December 7, 2021 19:09
- Created mixin for section padding
- Added mixin to every section except ApprenticeQualities & PreviousApprentices
- PreviousApprentices has custom padding due to the svg logo
- gave PreviousApprentices a negative z-index because padding covers CurrentApprentices cmp
- Refactored PreviousApprenticeGroups to align to have all groups align to the left
- Refactored font sizes in the hero
- Refactored PreviousApprenticeGroup to make sure triangle svg does not wrap
- Moved visually hidden mixin from hero sass module to mixin partials file

FSA21V2-156
@changangus changangus force-pushed the refactor--page-styles branch from c3621d7 to 9855501 Compare December 7, 2021 19:18
@use '../../styles/colors' as *;
@use '../../styles/spacing' as *;
@use '../../styles/fonts' as *;
@use '../../styles/mixins' as *;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I see the mixin being included here, but I don't see the section-padding mixin being used. Should that be included? It looks likes there are still some misalignments with this section:
Screen Shot 2021-12-08 at 11 11 03 AM

@@ -0,0 +1,32 @@
@mixin section-padding {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It looks like the specificity of the media queries is overriding the intended vertical padding on the previous apprentices section. I'm also not sure that we want to couple the vertical padding to the breakpoints here. Let's decouple the concerns of vertical and horizontal spacing, and update this mixin so that it is only concerned with horizontal spacing. This involves 3 things:

  1. Explicitly set padding-left and padding-right instead of padding
  2. Move the width and max-width declarations into this mixin
  3. Rename the mixin to section-horizontal-spacing

From there, we should be able to set the previous apprentice padding without it being overridden. Subsequently, if the vertical padding needs to be shared across sections, we can create a section-vertical-spacing mixin (if necessary).

@changangus changangus force-pushed the refactor--page-styles branch 2 times, most recently from a3da8b8 to fd8131c Compare December 8, 2021 20:21
Angus Chang added 2 commits December 9, 2021 09:38
- Abstracted horizontal and vertical padding into their own mixins
- Created padding variables for mixins
- Added new mixins to hero, current apprentices and call to action
- add max width to hero container

FSA21V2-156
- Fixed minor spacing issues with hero and cta art

FSA21V2-156
@changangus changangus force-pushed the refactor--page-styles branch from 1480542 to 4b106c8 Compare December 9, 2021 14:39
@changangus changangus requested a review from jonoliver December 9, 2021 14:50
@auaruss auaruss merged commit 4b106c8 into main Dec 9, 2021
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.

3 participants