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: adds tokens to Footer #155

Merged
merged 27 commits into from
Jul 11, 2022
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f4613b0
Changes `Footer` styles to use Module CSS
renatamottam Jul 4, 2022
64c20f2
Creates `Footer` Story doc
renatamottam Jul 4, 2022
0332394
Fixes typo
renatamottam Jul 4, 2022
0b42801
Updates `IncentivesFooter`content
renatamottam Jul 5, 2022
a52fcb3
Fixes `SectionItem` text
renatamottam Jul 5, 2022
db0be54
Adds new variations to Footer
renatamottam Jul 5, 2022
4d44582
Improves Footer Nav section
renatamottam Jul 5, 2022
da704cf
Improves `Footer` doc
renatamottam Jul 5, 2022
bea55b1
Merge branch 'main' into feat/theming-footer-fsss-376
Jul 5, 2022
92a01ed
Updates Changelog
renatamottam Jul 5, 2022
daac8ad
Merge branch 'feat/theming-footer-fsss-376' of https://github.com/vte…
renatamottam Jul 6, 2022
54f29d7
Fix typo
Jul 6, 2022
13e6452
Fixes `Incentives` import
Jul 6, 2022
c2f9f2b
Adds TokenTable to `Incentives`
renatamottam Jul 7, 2022
397eb2a
Adds CSS Modules to Incentives
renatamottam Jul 7, 2022
7f712ba
Improves `Footer` tokens
renatamottam Jul 7, 2022
4df54ff
Merge branch 'main' of https://github.com/vtex-sites/nextjs.store int…
renatamottam Jul 7, 2022
e6c59ff
Update Changelog
renatamottam Jul 7, 2022
5516955
Merge branch 'main' into feat/theming-footer-fsss-376
Jul 7, 2022
6b58841
Removes grid prop from `SectionList`
renatamottam Jul 7, 2022
afbdb24
Merge branch 'main' into feat/theming-footer-fsss-376
Jul 8, 2022
3bddca1
Change `IncentivesMock` file to `.ts`
renatamottam Jul 8, 2022
83562ac
Merge branch 'main' into feat/theming-footer-fsss-376
Jul 11, 2022
31cb500
Merge branch 'main' into feat/theming-footer-fsss-376
Jul 11, 2022
4cc521d
Fixes `Footer` Integration Tests
renatamottam Jul 11, 2022
8b3253d
Merge branch 'main' into feat/theming-footer-fsss-376
Jul 11, 2022
e7f204d
Merge branch 'main' into feat/theming-footer-fsss-376
Jul 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .storybook/components/SectionItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const SectionItem = ({
<div className="sbdocs-div">{children}</div>
<article className="sbdocs-list-text">
<h3 className="sbdocs sbdocs-h3">{title}</h3>
<p>{description}</p>
<p className="sbdocs sbdocs-p">{description}</p>
{actionPath && (
<ButtonLink
variant="tertiary"
Expand Down
14 changes: 13 additions & 1 deletion .storybook/storybook.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
max-width: 1100px;
}

@media screen and (min-width: 1440px) {
.sbdocs.sbdocs-content {
max-width: 1300px;
}
}

/* Text */

.sbdocs-content > header h1 {
Expand Down Expand Up @@ -224,7 +230,7 @@ h3.sbdocs.sbdocs-h3 {
margin-top: var(--fs-spacing-4);
}

.sbdocs-list .sbdocs-li > div {
.sbdocs-list .sbdocs-li > .sbdocs-div {
box-sizing: border-box;
display: flex;
align-items: center;
Expand All @@ -234,10 +240,16 @@ h3.sbdocs.sbdocs-h3 {
min-height: 140px;
max-height: 300px;
padding: var(--fs-spacing-3);
overflow: hidden;
background-color: var(--fs-color-neutral-1);
border-radius: var(--fs-border-radius);
}

.sbdocs-list .sbdocs-li > .sbdocs-div > [data-fs-footer-links] {
align-self: baseline;
width: 100%;
}

.sbdocs-list .sbdocs-div > img {
width: auto;
max-height: 100%;
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Applies CSS Modules to `Incentives` ([#155](https://github.com/vtex-sites/nextjs.store/pull/155))
- Applies new local tokens to `Footer` ([#155](https://github.com/vtex-sites/nextjs.store/pull/155))
- Global tokens doc page on storybook ([#147](https://github.com/vtex-sites/nextjs.store/pull/147))
- Adds [bun](https://bun.sh/) compatiblity ([#164](https://github.com/vtex-sites/nextjs.store/pull/164))
- Uses new cross selling API on PDP ([#137](https://github.com/vtex-sites/gatsby.store/pull/137))
- Applies new local tokens to `SuggestionProductCard` ([#151](https://github.com/vtex-sites/nextjs.store/pull/151))

### Changed

- Updates `IncentivesFooter` content ([#155](https://github.com/vtex-sites/nextjs.store/pull/155))
- Updated Getting Started doc page and overall improvements ([#147](https://github.com/vtex-sites/nextjs.store/pull/147))
- Fix storybook mock structure ([#156](https://github.com/vtex-sites/nextjs.store/pull/156))

Expand Down
160 changes: 160 additions & 0 deletions src/components/common/Footer/Footer.stories.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
import {
Icon as UIIcon,
List as UIList,
PaymentMethods as UIPaymentMethods,
} from '@faststore/ui'
import Footer from '.'

import {
TokenTable,
TokenRow,
TokenDivider,
SectionList,
SectionItem,
} from 'src/../.storybook/components'

import IncentivesFooter from '../../sections/Incentives/IncentivesFooter'
import FooterLinks from './FooterLinks'

import { Meta, Canvas, Story, ArgsTable } from '@storybook/addon-docs'

<Meta component={Footer} title="Organisms/Footer" />

export const Template = (args) => {
return <Footer {...args} />
}

<header>

# Footer

The `Footer` is the final section of every page and has all the meaningful links of the store.

</header>

## Overview

Footer section is made with `FooterLinks`, [Incentives](?path=/docs/organisms-incentives--incentives), [Links](?path=/docs/atoms-link--default), [Accordion](?path=/docs/molecules-accordion-overview--default-story), and [PaymentMethods](https://www.faststore.dev/reference/ui/molecules/PaymentMethods) (from FastStore UI).

---

## Usage

`import Footer from 'src/components/common/Footer'`

<Canvas>
<Story name="Footer">{Template.bind({})}</Story>
</Canvas>

<ArgsTable story="Footer" />

<TokenTable>
<TokenRow token="--fs-footer-min-height-mobile" value="rem(860px)" />
<TokenRow token="--fs-footer-min-height-notebook" value="rem(486px)" />
<TokenDivider />
<TokenRow
token="--fs-footer-spacing-vertical-mobile"
value="var(--fs-spacing-4)"
/>
<TokenRow
token="--fs-footer-spacing-vertical-notebook"
value="var(--fs-spacing-5)"
/>
<TokenRow
token="--fs-footer-spacing-horizontal-notebook"
value="var(--fs-grid-gap-3)"
/>
<TokenDivider />
<TokenRow
token="--fs-footer-bkg-color"
value="var(--fs-color-neutral-bkg)"
isColor
/>
</TokenTable>

---

## Nested Elements

### Divisor

<TokenTable>
<TokenRow
token="--fs-footer-divisor-border-width"
value="var(--fs-border-width)"
/>
<TokenRow
token="--fs-footer-divisor-border-color"
value="var(--fs-border-color-light)"
isColor
/>
</TokenTable>

### Title

<TokenTable>
<TokenRow token="--fs-footer-title-size" value="var(--fs-text-size-body)" />
<TokenRow token="--fs-footer-title-line-height" value="1.25" />
<TokenRow
token="--fs-footer-title-weight"
value="var(--fs-text-weight-bold)"
/>
<TokenRow
token="--fs-footer-title-margin-bottom"
value="var(--fs-spacing-1)"
/>
</TokenTable>

### Payment Methods

<TokenTable>
<TokenRow
token="--fs-footer-payment-methods-flags-border-width"
value="var(--fs-border-width)"
/>
<TokenRow
token="--fs-footer-payment-methods-flags-border-color"
value="var(--fs-color-neutral-3)"
isColor
/>
<TokenRow
token="--fs-footer-payment-methods-flags-border-radius"
value="var(--fs-border-radius-small)"
/>
</TokenTable>

---

## Compound Components

<SectionList>
<SectionItem
title="Footer Links"
description={
<>
Sitemap listing all the meaningful links of the store. It's the most
essential part of the Footer.
<br />
Additionally, we use the{' '}
<a href="../?path=/docs/molecules-accordion-overview--default-story">
Accordion
</a>{' '}
for a better mobile experince.
</>
}
>
<FooterLinks />
</SectionItem>
<SectionItem
renatamottam marked this conversation as resolved.
Show resolved Hide resolved
title="Incentives Footer"
description={
<>
A regular{' '}
<a href="../?path=/docs/organisms-incentives--incentives">Incentive</a>{' '}
with its own content.
</>
}
>
<IncentivesFooter />
</SectionItem>
</SectionList>
Loading