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

feat(pharos): add layout component #17

Merged
merged 22 commits into from
May 18, 2021
Merged

feat(pharos): add layout component #17

merged 22 commits into from
May 18, 2021

Conversation

Niznikr
Copy link
Collaborator

@Niznikr Niznikr commented May 12, 2021

This change: (check at least one)

  • Adds a new feature
  • Fixes a bug
  • Improves maintainability
  • Improves documentation
  • Is a release activity

Is this a breaking change? (check one)

  • Yes
  • No

Is the: (complete all)

  • Title of this pull request clear, concise, and indicative of the issue number it addresses, if any?
  • Test suite(s) passing?
  • Code coverage maximal?
  • Changeset added?

What does this change address?
Add a layout component for our various page layouts used on the platform. The three layouts include:

  • 1 column: margins range from 1.25rem to 9rem with fixed-width content
  • 1 column w/sidenav: margin is 1.5rem on mobile, otherwise 3.5rem with fluid content
  • 2 column: margin is 1.5rem on mobile, otherwise 3.5rem with fluid content

The layouts should support our defined breakpoints:

  • small: 360px
  • medium: 768px
  • large: 1056px
  • xlarge: 1360px
  • max: 1584px

How does this change work?

  • Add design tokens for breakpoints and grid gutter
  • Add layout component which applies a 12-column grid for a specified layout
  • Add Sass mixins for establishing grid styles for the breakpoints
  • Add Sass maps for storing column and margin design decisions
  • Update example Storybook pages to utilize the component

Additional context
CSS variables cannot currently be used for media queries so I opted to use the Sass tokens.

on-behalf-of: @ithaka <robert.niznik@ithaka.org>
on-behalf-of: @ithaka <robert.niznik@ithaka.org>
on-behalf-of: @ithaka <robert.niznik@ithaka.org>
on-behalf-of: @ithaka <robert.niznik@ithaka.org>
on-behalf-of: @ithaka <robert.niznik@ithaka.org>
on-behalf-of: @ithaka <robert.niznik@ithaka.org>
on-behalf-of: @ithaka <robert.niznik@ithaka.org>
on-behalf-of: @ithaka <robert.niznik@ithaka.org>
@changeset-bot
Copy link

changeset-bot bot commented May 12, 2021

🦋 Changeset detected

Latest commit: 41151ec

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@ithaka/pharos Minor
@ithaka/pharos-cli Patch
@ithaka/pharos-site Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Niznikr added 10 commits May 12, 2021 16:59
on-behalf-of: @ithaka <robert.niznik@ithaka.org>
on-behalf-of: @ithaka <robert.niznik@ithaka.org>
on-behalf-of: @ithaka <robert.niznik@ithaka.org>
on-behalf-of: @ithaka <robert.niznik@ithaka.org>
on-behalf-of: @ithaka <robert.niznik@ithaka.org>
on-behalf-of: @ithaka <robert.niznik@ithaka.org>
on-behalf-of: @ithaka <robert.niznik@ithaka.org>
on-behalf-of: @ithaka <robert.niznik@ithaka.org>
on-behalf-of: @ithaka <robert.niznik@ithaka.org>
on-behalf-of: @ithaka <robert.niznik@ithaka.org>
Copy link
Member

@daneah daneah left a comment

Choose a reason for hiding this comment

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

Overall I think I enjoy the DX of this. This component feels geared pretty specifically toward page-level layouts, and as such I wonder if it might be better to name it <pharos-layout> or similar to avoid conveying that it should be used for granular gridding needs.

@Niznikr
Copy link
Collaborator Author

Niznikr commented May 17, 2021

Yeah <pharos-layout> might work better! Will see how others feel about that.

@Niznikr Niznikr changed the title feat(pharos): add grid component feat(pharos): add layout component May 17, 2021
Co-authored-by: Dane Hillard <dane.hillard@ithaka.org>
on-behalf-of: @ithaka <robert.niznik@ithaka.org>
@Niznikr Niznikr merged commit 4dd7f01 into develop May 18, 2021
@Niznikr Niznikr deleted the feat/grid branch May 18, 2021 12:15
@github-actions github-actions bot mentioned this pull request May 18, 2021
sirrah-tam pushed a commit to sirrah-tam/pharos that referenced this pull request Dec 1, 2023
on-behalf-of: @ithaka <robert.niznik@ithaka.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants