diff --git a/CHANGELOG.md b/CHANGELOG.md index 97baf2807..ff7c001d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,48 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [1.11.5](https://github.com/vtexdocs/devportal/compare/v1.11.4...v1.11.5) (2024-01-12) + + +### Features + +* **faststore/[slug].tsx:** enable seeAlso functionality ([c6f105c](https://github.com/vtexdocs/devportal/commit/c6f105c0da8640340111afb4f7cea20b9292e448)) + +### [1.11.4](https://github.com/vtexdocs/devportal/compare/v1.11.3...v1.11.4) (2024-01-12) + + +### Bug Fixes + +* **apps:** edit specifiedVersion checks ([8235f61](https://github.com/vtexdocs/devportal/commit/8235f61e247caf94314b347576863ee876022d04)) +* **package:** fix path ([665601d](https://github.com/vtexdocs/devportal/commit/665601d618a81d237ae4c5233866aa4b4a80d4a7)) +* **sectionitem:** icon usage ([e0862c2](https://github.com/vtexdocs/devportal/commit/e0862c2e1cc6b2738d9427bc55576cb3fc7eb027)) + + +### Docs + +* create redirect master data api v2 ([e1a54ad](https://github.com/vtexdocs/devportal/commit/e1a54ad2e06af9eaa35eede2daa48b70abcc7d95)) + + +### Style + +* **faststore-components:** improve faststore content rendering styles ([ffd6bc8](https://github.com/vtexdocs/devportal/commit/ffd6bc835a30775f95d7ea430bb0ec7e364dd307)) +* **section-item:** update section item styles ([3d0e148](https://github.com/vtexdocs/devportal/commit/3d0e14843b3fdefb64b3ab3b67d81c94367c032e)) + + +### Chore + +* **faststore-componentes:** update faststore components and constants ([d57880f](https://github.com/vtexdocs/devportal/commit/d57880fd3d74dc70e87d68e3dd5270d6a374352f)) +* **package.json:** update components lib version ([e84365e](https://github.com/vtexdocs/devportal/commit/e84365e903c83f1bc85762fca98b8b23b65251c8)) +* **package:** @vtexdocs/components version ([65784fc](https://github.com/vtexdocs/devportal/commit/65784fc61a17f8d5a8998c5a96f6ecf2631877ac)) +* **package:** update dependencies ([db61da1](https://github.com/vtexdocs/devportal/commit/db61da110308a1c60f9293065bbf7ea67a33861f)) + +### [1.11.3](https://github.com/vtexdocs/devportal/compare/v1.11.2...v1.11.3) (2024-01-08) + + +### Bug Fixes + +* **faststore/[slug].tsx:** allows listing faststore docs ([dbac5f8](https://github.com/vtexdocs/devportal/commit/dbac5f8c797bd65cd0425960f52cca565f1a9382)) + ### [1.11.2](https://github.com/vtexdocs/devportal/compare/v1.11.1...v1.11.2) (2024-01-04) diff --git a/netlify.toml b/netlify.toml index 62b918e3f..f7b28b3eb 100644 --- a/netlify.toml +++ b/netlify.toml @@ -2,6 +2,17 @@ external_node_modules = ["sharp"] included_files = ["node_modules/sharp/**/*", "./github.pem"] +[[redirects]] +force = true +from = "/404/docs/recipes/style/using-css-handles-for-store-customization" +status = 308 +to = "/docs/guides/vtex-io-documentation-using-css-handles-for-store-customization" +[[redirects]] +force = true +from = "/docs/guides/vtexbr-buybox-context" +status = 308 +to = "/docs/apps/vtexbr.buybox-context" + [[redirects]] force = true from = "/docs/apps/vtex.store-icons/iconpack" @@ -902,6 +913,12 @@ from = "/api-reference/session-manager-api#overview" status = 308 to = "/docs/api-reference/session-manager-api" +[[redirects]] +force = true +from = "/reference/session-manager-api-overview" +status = 308 +to = "/docs/api-reference/session-manager-api" + [[redirects]] force = true from = "/docs/api-reference/using-postman" @@ -919,3 +936,9 @@ force = true from = "/docs/guides/2023-06-06-new-integration-guide-headless-commerce" status = 308 to = "/updates/release-notes/2023-06-06-new-integration-guide-headless-commerce" + +[[redirects]] +force = true +from = "/reference/master-data-api-v2-overview" +status = 308 +to = "/docs/api-reference/master-data-api-v2" \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 12a6401ee..0058a9bb2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "devportal", - "version": "1.11.2", + "version": "1.11.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "devportal", - "version": "1.11.2", + "version": "1.11.5", "hasInstallScript": true, "dependencies": { "@openreplay/tracker": "^5.0.1", diff --git a/package.json b/package.json index 811ae05da..a95e29895 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "devportal", - "version": "1.11.2", + "version": "1.11.5", "private": true, "engines": { "npm": "please-use-yarn", @@ -35,7 +35,7 @@ "@types/react-svg-pan-zoom": "^3.3.5", "@types/uuid": "^9.0.0", "@vtex/brand-ui": "^0.46.1", - "@vtexdocs/components": "https://github.com/vtexdocs/components.git#v1.1.15", + "@vtexdocs/components": "https://github.com/vtexdocs/components.git#v1.4.0", "algoliasearch": "^4.14.2", "chalk": "^5.2.0", "copy-text-to-clipboard": "^3.0.1", diff --git a/public/container-template.json b/public/container-template.json index 94caf4daf..d256e1753 100644 --- a/public/container-template.json +++ b/public/container-template.json @@ -1,23 +1,21 @@ { "exportFormatVersion": 2, - "exportTime": "2023-09-18 14:07:56", + "exportTime": "2024-01-09 19:56:30", "containerVersion": { - "path": "accounts/6003163501/containers/164701425/versions/4", + "path": "accounts/6003163501/containers/164701425/versions/0", "accountId": "6003163501", "containerId": "164701425", - "containerVersionId": "4", - "name": "GA4 installation with enriched items data - VTEX v2", - "description": "We added a custom HTML to enrich the items object. \nThis improvement aims to complete the attribution data with information about the promotion banners and/or the list's name.", + "containerVersionId": "0", "container": { "path": "accounts/6003163501/containers/164701425", "accountId": "6003163501", "containerId": "164701425", - "name": "Google Analytics 4", + "name": "Google Analytics 4 - official container", "publicId": "GTM-USEYOUROWN", "usageContext": [ "WEB" ], - "fingerprint": "1693668351144", + "fingerprint": "1695046170433", "tagManagerUrl": "https://tagmanager.google.com/#/container/accounts/6003163501/containers/164701425/workspaces?apiLink=container", "features": { "supportUserPermissions": true, @@ -1748,7 +1746,7 @@ { "type": "TEMPLATE", "key": "html", - "value": "// The outer self-invoking function serves to encapsulate the logic \n// and avoid polluting the global namespace with the intermediate variables used in the script.\n\n" + "value": "" }, { "type": "BOOLEAN", @@ -1756,7 +1754,7 @@ "value": "false" } ], - "fingerprint": "1695045596500", + "fingerprint": "1699982737706", "firingTriggerId": [ "10", "28", @@ -3111,7 +3109,7 @@ "value": "!!! add your measurement ID !!!" } ], - "fingerprint": "1694806129431", + "fingerprint": "1695046749888", "parentFolderId": "3", "formatValue": {} } @@ -3169,7 +3167,7 @@ "name": "Click ID" } ], - "fingerprint": "1695045979175", - "tagManagerUrl": "https://tagmanager.google.com/#/versions/accounts/6003163501/containers/164701425/versions/4?apiLink=version" + "fingerprint": "1704830190507", + "tagManagerUrl": "https://tagmanager.google.com/#/versions/accounts/6003163501/containers/164701425/versions/0?apiLink=version" } -} \ No newline at end of file +} diff --git a/public/navigation.json b/public/navigation.json index f0e90dfb5..4334ebb19 100644 --- a/public/navigation.json +++ b/public/navigation.json @@ -2071,18 +2071,18 @@ "slugPrefix": "docs/api-reference", "categories": [ { - "name": "Antifraud Provider API", + "name": "Anti-fraud Provider API", "slug": "antifraud-provider-protocol", "origin": "", "type": "openapi", "children": [ { - "name": "Antifraud Flow", + "name": "Anti-fraud Flow", "slug": "antifraud-provider-protocol-antifraud-flow", "type": "category", "children": [ { - "name": "Send Antifraud Pre-Analysis Data (optional)", + "name": "Send Anti-fraud Pre-Analysis Data (optional)", "slug": "antifraud-provider-protocol", "type": "openapi", "method": "POST", @@ -2091,7 +2091,7 @@ "children": [] }, { - "name": "Send Antifraud Data", + "name": "Send Anti-fraud Data", "slug": "antifraud-provider-protocol", "type": "openapi", "method": "POST", @@ -2100,7 +2100,7 @@ "children": [] }, { - "name": "Update Antifraud Transactions (optional)", + "name": "Update Anti-fraud Transactions (optional)", "slug": "antifraud-provider-protocol", "type": "openapi", "method": "PUT", @@ -2109,7 +2109,7 @@ "children": [] }, { - "name": "List Antifraud Provider Manifest", + "name": "List Anti-fraud Provider Manifest", "slug": "antifraud-provider-protocol", "type": "openapi", "method": "GET", @@ -2118,7 +2118,7 @@ "children": [] }, { - "name": "Get Antifraud Status", + "name": "Get Anti-fraud Status", "slug": "antifraud-provider-protocol", "type": "openapi", "method": "GET", @@ -2127,7 +2127,7 @@ "children": [] }, { - "name": "Stop Antifraud Analysis (optional)", + "name": "Stop Anti-fraud Analysis (optional)", "slug": "antifraud-provider-protocol", "type": "openapi", "method": "DELETE", @@ -4490,7 +4490,7 @@ "children": [] }, { - "name": "Retrieve an account by id", + "name": "Retrieve an account by ID", "slug": "customer-credit-api", "type": "openapi", "method": "GET", @@ -4607,7 +4607,7 @@ "children": [] }, { - "name": "Partially or fully refund a settlement", + "name": "Partially or totally refund a settlement", "slug": "customer-credit-api", "type": "openapi", "method": "POST", @@ -4632,7 +4632,7 @@ "children": [] }, { - "name": "Retrieve invoice by id", + "name": "Retrieve invoice by ID", "slug": "customer-credit-api", "type": "openapi", "method": "GET", @@ -4721,7 +4721,7 @@ "type": "openapi", "children": [ { - "name": "Gift Card", + "name": "Gift cards", "slug": "giftcard-api-gift-card", "type": "category", "children": [ @@ -4755,7 +4755,7 @@ ] }, { - "name": "Transaction", + "name": "Transactions", "slug": "giftcard-api-transaction", "type": "category", "children": [ @@ -4787,7 +4787,7 @@ "children": [] }, { - "name": "Get GiftCard Transaction Authorizations", + "name": "Get GiftCard Transaction Authorization", "slug": "giftcard-api", "type": "openapi", "method": "GET", @@ -4805,7 +4805,7 @@ "children": [] }, { - "name": "List All GiftCard Transaction Cancellations", + "name": "List All GiftCard Transactions Cancellations", "slug": "giftcard-api", "type": "openapi", "method": "GET", @@ -4836,13 +4836,13 @@ ] }, { - "name": "Giftcard Provider Protocol", + "name": "Giftcard Provider Protocol API", "slug": "giftcard-provider-protocol", "origin": "", "type": "openapi", "children": [ { - "name": "Gift Cards", + "name": "Gift cards", "slug": "giftcard-provider-protocol-gift-cards", "type": "category", "children": [ @@ -4963,80 +4963,87 @@ "type": "openapi", "children": [ { - "name": "Provider", - "slug": "giftcard-hub-api-provider", + "name": "Gift cards", + "slug": "giftcard-hub-api-giftcards", "type": "category", "children": [ { - "name": "Create/Update GiftCard Provider by Id", + "name": "Create GiftCard in GiftCard Provider", "slug": "giftcard-hub-api", "type": "openapi", - "method": "PUT", + "method": "POST", "origin": "", - "endpoint": "/api/giftcardproviders/-giftCardProviderId-", + "endpoint": "/api/giftcardproviders/-giftCardProviderId-/giftcards", "children": [] }, { - "name": "Get GiftCard Provider by ID", + "name": "Get GiftCard from GiftCard Provider", "slug": "giftcard-hub-api", "type": "openapi", - "method": "GET", + "method": "POST", "origin": "", - "endpoint": "/api/giftcardproviders/-giftCardProviderId-", + "endpoint": "/api/giftcardproviders/-giftCardProviderId-/giftcards/_search", "children": [] }, { - "name": "List All GiftCard Providers", + "name": "Get GiftCard from GiftCard Provider by ID", "slug": "giftcard-hub-api", "type": "openapi", "method": "GET", "origin": "", - "endpoint": "/api/giftcardproviders", - "children": [] - }, - { - "name": "Delete GiftCard Provider by ID", - "slug": "giftcard-hub-api", - "type": "openapi", - "method": "DELETE", - "origin": "", - "endpoint": "/api/giftcardproviders/-giftCardProviderId-", + "endpoint": "/api/giftcardproviders/-giftCardProviderId-/giftcards/-giftCardId-", "children": [] } ] }, { - "name": "Transaction", - "slug": "giftcard-hub-api-transaction", + "name": "Providers", + "slug": "giftcard-hub-api-provider", "type": "category", "children": [ { - "name": "Create GiftCard in GiftCard Provider", + "name": "Create/Update GiftCard Provider by ID", "slug": "giftcard-hub-api", "type": "openapi", - "method": "POST", + "method": "PUT", "origin": "", - "endpoint": "/api/giftcardproviders/-giftCardProviderId-/giftcards", + "endpoint": "/api/giftcardproviders/-giftCardProviderId-", "children": [] }, { - "name": "Get GiftCard from GiftCard Provider", + "name": "Get GiftCard Provider by ID", "slug": "giftcard-hub-api", "type": "openapi", - "method": "POST", + "method": "GET", "origin": "", - "endpoint": "/api/giftcardproviders/-giftCardProviderId-/giftcards/_search", + "endpoint": "/api/giftcardproviders/-giftCardProviderId-", "children": [] }, { - "name": "Get GiftCard from GiftCard Provider by ID", + "name": "List All GiftCard Providers", "slug": "giftcard-hub-api", "type": "openapi", "method": "GET", "origin": "", - "endpoint": "/api/giftcardproviders/-giftCardProviderId-/giftcards/-giftCardId-", + "endpoint": "/api/giftcardproviders", "children": [] }, + { + "name": "Delete GiftCard Provider by ID", + "slug": "giftcard-hub-api", + "type": "openapi", + "method": "DELETE", + "origin": "", + "endpoint": "/api/giftcardproviders/-giftCardProviderId-", + "children": [] + } + ] + }, + { + "name": "Transactions", + "slug": "giftcard-hub-api-transaction", + "type": "category", + "children": [ { "name": "Create GiftCard Transaction", "slug": "giftcard-hub-api", @@ -7670,7 +7677,7 @@ ] }, { - "name": "Payment Provider Protocol", + "name": "Payment Provider Protocol API", "slug": "payment-provider-protocol", "origin": "", "type": "openapi", diff --git a/src/components/faststore-components/Accordion/AccordionUsage.tsx b/src/components/faststore-components/Accordion/UsageAccordion.tsx similarity index 96% rename from src/components/faststore-components/Accordion/AccordionUsage.tsx rename to src/components/faststore-components/Accordion/UsageAccordion.tsx index bebd982dd..4c12d4dcd 100644 --- a/src/components/faststore-components/Accordion/AccordionUsage.tsx +++ b/src/components/faststore-components/Accordion/UsageAccordion.tsx @@ -7,7 +7,7 @@ import { List, } from '@faststore/ui' -export const UsageAccordion = () => { +const UsageAccordion = () => { const [indices, setIndices] = useState([0]) const onChange = (index: number) => { setIndices([index]) diff --git a/src/components/faststore-components/Accordion/AccordionMultipleUsage.tsx b/src/components/faststore-components/Accordion/UsageAccordionMultiple.tsx similarity index 91% rename from src/components/faststore-components/Accordion/AccordionMultipleUsage.tsx rename to src/components/faststore-components/Accordion/UsageAccordionMultiple.tsx index 52ccc4b68..960af07eb 100644 --- a/src/components/faststore-components/Accordion/AccordionMultipleUsage.tsx +++ b/src/components/faststore-components/Accordion/UsageAccordionMultiple.tsx @@ -7,8 +7,8 @@ import { List, } from '@faststore/ui' -export const UsageAccordionMultiple = () => { - const [indices, setIndices] = useState>(new Set([])) +const UsageAccordionMultiple = () => { + const [indices, setIndices] = useState(new Set([0])) const onChange = (index: number) => { if (indices.has(index)) { indices.delete(index) diff --git a/src/components/faststore-components/CardList/CardItem.tsx b/src/components/faststore-components/CardList/CardItem.tsx new file mode 100644 index 000000000..dadd3c435 --- /dev/null +++ b/src/components/faststore-components/CardList/CardItem.tsx @@ -0,0 +1,42 @@ +import { CSSProperties, PropsWithChildren, ReactNode } from 'react' + +export type CardItemProps = { + title: string + actionPath: string + description: string | ReactNode + zoomOut?: boolean + fullWidth?: boolean + containerStyle?: CSSProperties +} + +const CardItem = ({ + title, + description, + children, + zoomOut, + fullWidth, + actionPath, + containerStyle, + ...otherProps +}: PropsWithChildren) => { + return ( +
  • + +
    + {children} +
    +
    +

    {title}

    +

    {description}

    +
    +
    +
  • + ) +} + +export default CardItem diff --git a/src/components/faststore-components/CardList/CardList.tsx b/src/components/faststore-components/CardList/CardList.tsx new file mode 100644 index 000000000..cf98913e9 --- /dev/null +++ b/src/components/faststore-components/CardList/CardList.tsx @@ -0,0 +1,21 @@ +import type { PropsWithChildren } from 'react' +import styles from './card-list.module.css' + +export type CardListProps = { + columns?: 4 | 3 | 2 + classes?: string +} + +const CardList = ({ + children, + columns = 3, + ...otherProps +}: PropsWithChildren) => { + return ( +
    +
      {children}
    +
    + ) +} + +export default CardList diff --git a/src/components/faststore-components/CardList/card-list.module.css b/src/components/faststore-components/CardList/card-list.module.css new file mode 100644 index 000000000..6fd761633 --- /dev/null +++ b/src/components/faststore-components/CardList/card-list.module.css @@ -0,0 +1,109 @@ +/* Components List */ + +.cardList [data-doc-card-grid-columns] { + display: grid; + row-gap: var(--fs-spacing-3); + column-gap: var(--fs-spacing-3); + list-style-type: none; + padding: 0; + } + + .cardList [data-doc-card-grid-columns="4"] { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + + .cardList [data-doc-card-grid-columns="4"] [data-doc-card-item-component] { + height: 80px; + } + + .cardList [data-doc-card-grid-columns="3"] { + grid-template-columns: repeat(1, minmax(0, 1fr)); + } + + .cardList [data-doc-card-grid-columns="2"] { + grid-template-columns: repeat(1, minmax(0, 1fr)); + } + + @media screen and (min-width: 1024px) { + .cardList [data-doc-card-grid-columns="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); } + .cardList [data-doc-card-grid-columns="4"] [data-doc-card-item-component] { height: 150px; } + .cardList [data-doc-card-grid-columns="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); } + .cardList [data-doc-card-grid-columns="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); } + } + + .cardList [data-doc-card-item] { + transition: all .2s ease-in-out; + position: relative; + top: 0; + } + + .cardList [data-doc-card-item-link] { + display: flex; + flex-direction: column; + height: 100%; + border: 1px solid #e5e7eb; + border-radius: 4px; + overflow: hidden; + color: #4a4a4a; + } + + .cardList [data-doc-card-item-component] { + display: flex; + align-items: center; + justify-content: center; + column-gap: var(--fs-spacing-3); + margin: var(--fs-spacing-4); + border-radius: 4px; + height: 169px; + overflow: hidden; + transition: all .2s ease-in-out; + flex-shrink: 0; + position: relative; + pointer-events: none; + } + + .cardList [data-doc-card-item-component] [data-fs-out-of-stock] { width: 100%; } + .cardList [data-doc-card-item-component] > [data-fs-product-card] { + zoom: 70%; + width: 30%; + } + + .cardList [data-doc-card-item-component] [data-fs-sku-selector] { flex-direction: column; } + .cardList [data-doc-card-item-component] [data-fs-sku-selector] [data-fs-sku-selector-title] { width: auto; } + + .cardList [data-doc-card-item-component] [data-fs-navbar-links-wrapper] [data-fs-button], + .cardList [data-doc-card-item-component] [data-fs-navbar-links-wrapper] [data-fs-navbar-links-list-item] { + white-space: nowrap; + } + + .cardList [data-doc-card-item-component-zoom="true"] { + height: 430px; + margin: var(--fs-spacing-8); + zoom: 40%; + } + + .cardList [data-doc-card-item-component] > * { max-width: 100%; } + + .cardList [data-doc-card-item-component-zoom="true"] > * { width: 100%; } + + .cardList [data-doc-card-item-component-full-width="true"] > * { width: 100%; } + + .cardList [data-doc-card-item]:hover { + top: -2px; + box-shadow: 0 5px 12px 0 #46464611; + } + + .cardList [data-doc-card-item-title] { + margin-bottom: var(--fs-spacing-0); + font-weight: var(--fs-text-weight-bold); + font-size: var(--fs-text-size-2); + } + + .cardList [data-doc-card-item-content] { + height: 100%; + padding: var(--fs-spacing-3); + background-color: #f1f2f386; + font-size: var(--fs-text-size-1); + } + + .cardList [data-doc-card-item-content] p { line-height: 1.35; } \ No newline at end of file diff --git a/src/components/faststore-components/Carousel/CarouselSimpleUsage.tsx b/src/components/faststore-components/Carousel/CarouselSimpleUsage.tsx new file mode 100644 index 000000000..fea535ef3 --- /dev/null +++ b/src/components/faststore-components/Carousel/CarouselSimpleUsage.tsx @@ -0,0 +1,35 @@ +/* eslint-disable @next/next/no-img-element */ +import React, { PropsWithChildren } from 'react' +import { Carousel } from '@faststore/ui' +import styles from './carousel-item.module.css' + +export type CarouselSimpleProps = { + itemsPerPage: number + infiniteMode: boolean + variant: 'slide' | 'scroll' +} + +const CarouselSimpleUsage = ({ + itemsPerPage = 5, + infiniteMode = false, + variant, +}: PropsWithChildren) => { + const isMobile = + typeof window !== 'undefined' ? window.innerWidth <= 768 : false + + return ( + + {[...Array(10)].map((_, index) => ( +
    + {index + 1} +
    + ))} +
    + ) +} + +export default CarouselSimpleUsage diff --git a/src/components/faststore-components/Carousel/carousel-item.module.css b/src/components/faststore-components/Carousel/carousel-item.module.css new file mode 100644 index 000000000..74f572758 --- /dev/null +++ b/src/components/faststore-components/Carousel/carousel-item.module.css @@ -0,0 +1,10 @@ +.carouselItem { + width: 100%; + height: 5rem; + display: flex; + align-items: center; + justify-content: center; + font-size: var(--fs-text-size-3); + font-weight: var(--fs-text-weight-bold); + background: var(--fs-color-accent-1); + } \ No newline at end of file diff --git a/src/components/faststore-components/SectionItem/SectionItem.tsx b/src/components/faststore-components/SectionItem/SectionItem.tsx index 886668685..2c9b26f56 100644 --- a/src/components/faststore-components/SectionItem/SectionItem.tsx +++ b/src/components/faststore-components/SectionItem/SectionItem.tsx @@ -4,9 +4,12 @@ import { Icon, LinkButton } from '@faststore/ui' export type SectionItemProps = { title: string - description: string | ReactNode + description?: string | ReactNode actionPath?: string containerStyle?: CSSProperties + zoomOut?: boolean + fullWidth?: boolean + smallHeight?: boolean } const SectionItem = ({ @@ -15,12 +18,22 @@ const SectionItem = ({ children, actionPath, containerStyle, + zoomOut, + fullWidth, + smallHeight, ...otherProps }: PropsWithChildren) => { return ( -
  • +
  • {children}
    -
    +

    {title}

    diff --git a/src/components/faststore-components/SectionItem/section-item.module.css b/src/components/faststore-components/SectionItem/section-item.module.css index 931e45626..c1be9f6d9 100644 --- a/src/components/faststore-components/SectionItem/section-item.module.css +++ b/src/components/faststore-components/SectionItem/section-item.module.css @@ -1,49 +1,107 @@ -.faststore-sectionList [data-doc-section-grid="row"] { - row-gap: var(--fs-spacing-4); +/* Section List */ + +.faststore-sectionList [data-doc-section-grid] { display: flex; flex-direction: column; + row-gap: var(--fs-spacing-4); + padding: 0; +} + +.faststore-sectionItem-description [data-fs-button] span { + color: #e31d58; +} + +@media screen and (min-width: 1024px) { + .faststore-sectionList [data-doc-section-grid='row'] { + row-gap: var(--fs-spacing-4); + display: flex; + flex-direction: column; + } + + .faststore-sectionList [data-doc-section-grid='column'] { + display: grid; + grid-gap: var(--fs-spacing-5) var(--fs-spacing-4); + padding: 0; + } + + .faststore-sectionList + [data-doc-section-grid='column'][data-doc-section-grid-columns='2'] { + grid-template-columns: repeat(2, 1fr); + } + + .faststore-sectionList + [data-doc-section-grid='column'][data-doc-section-grid-columns='3'] { + grid-template-columns: repeat(3, 1fr); + } } -.faststore-sectionList [data-doc-section-grid="row"] .faststore-sectionItem > div { - width: 35%; +/* Section Item */ + +.faststore-sectionList + [data-doc-section-grid='row'] + .faststore-sectionItem + > div { flex-shrink: 0; align-self: stretch; } -.faststore-sectionList [data-doc-section-grid="column"] { - display: grid; - grid-gap: var(--fs-spacing-5) var(--fs-spacing-4); +@media screen and (min-width: 1024px) { + .faststore-sectionList + [data-doc-section-grid='row'] + .faststore-sectionItem + > div { + width: 35%; + } } -.faststore-sectionList [data-doc-section-grid="column"][data-doc-section-grid-columns="2"] { - grid-template-columns: repeat(2, 1fr); +.faststore-sectionList [data-doc-section-grid='column'] .faststore-sectionItem { + display: grid; + grid-template-rows: 200px 1fr; } -.faststore-sectionList [data-doc-section-grid="column"][data-doc-section-grid-columns="3"] { - grid-template-columns: repeat(3, 1fr); +@media screen and (min-width: 1024px) { + .faststore-sectionList + [data-doc-section-grid='column'] + .faststore-sectionItem { + grid-template-rows: 2fr 1fr; + } } -.faststore-sectionList [data-doc-section-grid="column"] .faststore-sectionItem { - display: grid; - grid-template-rows: 2fr 1fr; +.faststore-sectionList + [data-doc-section-grid='column'] + .faststore-sectionItem[data-doc-section-item-small-height] { + grid-template-rows: 1fr 1fr; } -.faststore-sectionList [data-doc-section-grid="column"] .faststore-sectionItem > div { +.faststore-sectionList + [data-doc-section-grid='column'] + .faststore-sectionItem + > div { height: 100%; } -.faststore-sectionList [data-doc-section-grid="column"] .faststore-sectionItem > article { +.faststore-sectionList + [data-doc-section-grid='column'] + .faststore-sectionItem + > article { height: 100%; width: 100%; } .faststore-sectionItem { display: flex; + flex-direction: column; align-items: center; column-gap: var(--fs-spacing-4); row-gap: var(--fs-spacing-3); } +@media screen and (min-width: 1024px) { + .faststore-sectionItem { + flex-direction: row; + } +} + .faststore-sectionItem > div { width: 100%; display: flex; @@ -53,7 +111,21 @@ background-color: var(--fs-color-neutral-bkg); border-radius: 4px; overflow-y: auto; - max-height: 21rem; + max-height: 24rem; +} + +.faststore-sectionItem[data-doc-section-item-full-width] > div > * { + width: 100%; +} + +.faststore-sectionItem[data-doc-section-item-full-width] + [data-fs-product-shelf-items] { + width: 100%; +} + +.faststore-sectionItem[data-doc-section-item-zoom-out='true'] > div > * { + width: 100%; + zoom: 60%; } .faststore-sectionItem > article [data-fs-button] { @@ -66,16 +138,21 @@ margin-top: 0; } +/* Tokens Links */ + .faststore-tokensLinks { margin-top: var(--fs-spacing-4); } -.faststore-tokensLinks [data-doc-section-grid="column"] .faststore-sectionItem { +.faststore-tokensLinks [data-doc-section-grid='column'] .faststore-sectionItem { display: flex; flex-direction: column; } -.faststore-tokensLinks [data-doc-section-grid="column"] .faststore-sectionItem > div { +.faststore-tokensLinks + [data-doc-section-grid='column'] + .faststore-sectionItem + > div { height: 170px; background-repeat: no-repeat; background-position: center center; @@ -94,27 +171,27 @@ } .faststore-tokensLinks .faststore-sectionItem:nth-child(1) > div { - background-image: url("https://vtexhelp.vtexassets.com/assets/docs/src/colors___038effcf345acf3d037bc63ed8671455.png"); + background-image: url('https://vtexhelp.vtexassets.com/assets/docs/src/colors___038effcf345acf3d037bc63ed8671455.png'); } .faststore-tokensLinks .faststore-sectionItem:nth-child(2) > div { - background-image: url("https://vtexhelp.vtexassets.com/assets/docs/src/typography___318fbc78202402728a2113e63b47241f.png"); + background-image: url('https://vtexhelp.vtexassets.com/assets/docs/src/typography___318fbc78202402728a2113e63b47241f.png'); } .faststore-tokensLinks .faststore-sectionItem:nth-child(3) > div { - background-image: url("https://vtexhelp.vtexassets.com/assets/docs/src/spacing___ca1d02b0bcc238811347eddc66a807ad.png"); + background-image: url('https://vtexhelp.vtexassets.com/assets/docs/src/spacing___ca1d02b0bcc238811347eddc66a807ad.png'); } .faststore-tokensLinks .faststore-sectionItem:nth-child(4) > div { - background-image: url("https://vtexhelp.vtexassets.com/assets/docs/src/grid___6dfb4949712be94273bc119b7945babf.png"); + background-image: url('https://vtexhelp.vtexassets.com/assets/docs/src/grid___6dfb4949712be94273bc119b7945babf.png'); } .faststore-tokensLinks .faststore-sectionItem:nth-child(5) > div { - background-image: url("https://vtexhelp.vtexassets.com/assets/docs/src/controls___a8302bd539d61653e60cb0aacd1c18e7.png"); + background-image: url('https://vtexhelp.vtexassets.com/assets/docs/src/controls___a8302bd539d61653e60cb0aacd1c18e7.png'); } .faststore-tokensLinks .faststore-sectionItem:nth-child(6) > div { - background-image: url("https://vtexhelp.vtexassets.com/assets/docs/src/refinements___ca4c7814b2771e84601f4a6d457612fd.png"); + background-image: url('https://vtexhelp.vtexassets.com/assets/docs/src/refinements___ca4c7814b2771e84601f4a6d457612fd.png'); } .faststore-tokensLinks .faststore-sectionItem > article [data-fs-button] { diff --git a/src/components/faststore-components/Tokens/token-table.module.css b/src/components/faststore-components/Tokens/token-table.module.css index 16e3da031..748838943 100644 --- a/src/components/faststore-components/Tokens/token-table.module.css +++ b/src/components/faststore-components/Tokens/token-table.module.css @@ -2,44 +2,20 @@ width: 100%; display: table; border: 1px solid rgba(0, 0, 0, 0.1); - border-radius: 4px; - border-spacing: 0; - border-collapse: unset; -} - -.faststore-tokenTable th { - color: var(--fs-color-text); - border-bottom: 1px solid rgba(0, 0, 0, 0.1); - padding: 10px; -} - -.faststore-tokenTable th:first-child { - border-right: 1px solid rgba(0, 0, 0, 0.1); -} - -.faststore-tokenTable tr:last-child td { - border-bottom: none; } .faststore-tokenTable td { width: 50%; - border-bottom: 1px solid rgba(0, 0, 0, 0.1); padding: var(--fs-spacing-1); } -.faststore-tokenTable td:first-child { - border-right: 1px solid rgba(0, 0, 0, 0.1); -} - .faststore-tokenTable td code { margin: 0px 2px; padding: 3px 5px; white-space: nowrap; border-radius: 3px; + background-color: var(--md-code-background, #f6f8fa); font-size: 13px; - border: 1px solid rgb(238, 238, 238); - color: rgba(51, 51, 51, 0.9); - background-color: rgb(248, 248, 248); } .faststore-tokenTable td code { @@ -57,9 +33,9 @@ } .faststore-tokenDivider td { - background-color: rgba(0, 0, 0, 0.05); + background-color: #e7e7ee; padding: 0; - height: 12px; + height: 3px; } .faststore-tokenDivider td:first-of-type { diff --git a/src/components/faststore-components/Tokens/typeset.module.css b/src/components/faststore-components/Tokens/typeset.module.css index 6f32e187a..da50a3c96 100644 --- a/src/components/faststore-components/Tokens/typeset.module.css +++ b/src/components/faststore-components/Tokens/typeset.module.css @@ -9,6 +9,7 @@ background-position: -22px -24px; border: 1px solid rgba(0, 0, 0, 0.1); overflow: auto; + line-height: normal; } .faststore-typeset li { diff --git a/src/components/faststore-components/constants.tsx b/src/components/faststore-components/constants.tsx index a4b1862dc..6e1d67a97 100644 --- a/src/components/faststore-components/constants.tsx +++ b/src/components/faststore-components/constants.tsx @@ -34,6 +34,7 @@ export const constants = { searchContent: 'Appl', suggestions: [{ value: 'apple airpods' }, { value: 'apple tv' }], searchContentAlt: 'So', + NavigationUsage: () => null, suggestionsAlt: [ { value: 'sony headphone', @@ -259,6 +260,12 @@ export const constants = { alternateName: 'magicscale', }, ], + imagesWithoutSelector: [ + { + url: 'https://storeframework.vtexassets.com/arquivos/ids/190902/unsplash-magic-mouse.jpg?v=637800136963870000', + alternateName: 'Magicwhite', + }, + ], propsRadioGroup: [ { name: 'name', diff --git a/src/components/faststore-components/index.ts b/src/components/faststore-components/index.ts index d4a3adb04..bce29f478 100644 --- a/src/components/faststore-components/index.ts +++ b/src/components/faststore-components/index.ts @@ -1,5 +1,8 @@ export { default as ButtonLoading } from './Button/ButtonLoading' -export { CarouselUsage } from './Carousel/CarouselUsage' +export { default as CarouselUsage } from './Carousel/CarouselUsage' +export { default as CarouselSimpleUsage } from './Carousel/CarouselSimpleUsage' +export { default as CardList } from './CardList/CardList' +export { default as CardItem } from './CardList/CardItem' export { CartSidebarUsage, activeVariations, @@ -41,8 +44,8 @@ export { usePriceFormatter, } from './utilities/usePriceFormatter' export { default as RegionModalUsage } from './RegionModal/RegionModalUsage' -export { default as AccordionUsage } from './Accordion/AccordionUsage' -export { default as AccordionMultipleUsage } from './Accordion/AccordionMultipleUsage' +export { default as UsageAccordion } from './Accordion/UsageAccordion' +export { default as UsageAccordionMultiple } from './Accordion/UsageAccordionMultiple' export { default as ModalBase } from './Modal/ModalBase' export { default as ModalTemplate } from './Modal/ModalTemplate' export { default as CartItemExample } from './CartItem/CartItemExample' diff --git a/src/components/faststore-components/markdown-renderer/fastStoreComponents.tsx b/src/components/faststore-components/markdown-renderer/fastStoreComponents.tsx index 737091f3b..373b478e6 100644 --- a/src/components/faststore-components/markdown-renderer/fastStoreComponents.tsx +++ b/src/components/faststore-components/markdown-renderer/fastStoreComponents.tsx @@ -36,14 +36,9 @@ const Tabs = ({ items, defaultIndex, children }: TabsProps) => { const Tab = ({ children }: { children: ReactChildren }) => {children} -const Steps = ({ children }: { children: ReactChildren }) => ( - {children} -) - export default { Tabs, Tab, - Steps, ...usageComponents, ...components, SearchProvider, diff --git a/src/components/faststore-components/markdown-renderer/fastStoreComponentsStyle.ts b/src/components/faststore-components/markdown-renderer/fastStoreComponentsStyle.ts index 8e58d84d5..e69376720 100644 --- a/src/components/faststore-components/markdown-renderer/fastStoreComponentsStyle.ts +++ b/src/components/faststore-components/markdown-renderer/fastStoreComponentsStyle.ts @@ -9,8 +9,6 @@ const tabItem: SxStyleProp = { padding: '8px', color: '#4A596B', cursor: 'pointer', - borderTopLeftRadius: '4px', - borderTopRightRadius: '4px', transition: '0.15s ease-in', '&:hover': { transition: '0.15s ease-in', @@ -21,8 +19,7 @@ const tabItem: SxStyleProp = { const tabItemActive: SxStyleProp = { ...tabItem, color: '#E31C58', - borderTop: '1px solid #E31C58', - borderInline: '1px solid #E31C58', + boxShadow: '0 2px 0 0 #E31C58', '&:hover': { color: '#E31C58', }, diff --git a/src/pages/docs/apps/[slug]/[child].tsx b/src/pages/docs/apps/[slug]/[child].tsx index 42de22679..bc5f685ba 100644 --- a/src/pages/docs/apps/[slug]/[child].tsx +++ b/src/pages/docs/apps/[slug]/[child].tsx @@ -187,9 +187,20 @@ export const getStaticProps: GetStaticProps = async ({ params }) => { const appId = data.appId const latestVersion = data.latestVersion const currentVersion = data.currentVersion - const specifiedVersion = app.split('@')[1] + let specifiedVersion = app.split('@')[1] ? app.split('@')[1] : currentVersion + + if (specifiedVersion.endsWith('.')) { + specifiedVersion += '0' + } + if (specifiedVersion.split('.').length === 1) { + specifiedVersion += '.0' + } + if (specifiedVersion.split('.').length === 2) { + specifiedVersion += '.0' + } + const headingList: Item[] = [] if (markdown) { { diff --git a/src/pages/docs/apps/[slug]/index.tsx b/src/pages/docs/apps/[slug]/index.tsx index ea59ad667..767a629c4 100644 --- a/src/pages/docs/apps/[slug]/index.tsx +++ b/src/pages/docs/apps/[slug]/index.tsx @@ -177,9 +177,20 @@ export const getStaticProps: GetStaticProps = async ({ params }) => { let markdown = data.markdown const latestVersion = data.latestVersion const currentVersion = data.currentVersion - const specifiedVersion = app.split('@')[1] + let specifiedVersion = app.split('@')[1] ? app.split('@')[1] : currentVersion + + if (specifiedVersion.endsWith('.')) { + specifiedVersion += '0' + } + if (specifiedVersion.split('.').length === 1) { + specifiedVersion += '.0' + } + if (specifiedVersion.split('.').length === 2) { + specifiedVersion += '.0' + } + const childrenDocs = data.childrenDocs ?? [''] const headingList: Item[] = [] const parentsArray: string[] = [] diff --git a/src/pages/docs/guides/[slug].tsx b/src/pages/docs/guides/[slug].tsx index 9f0886e0b..adc39e7c4 100644 --- a/src/pages/docs/guides/[slug].tsx +++ b/src/pages/docs/guides/[slug].tsx @@ -44,6 +44,7 @@ import getFileContributors, { import { getLogger } from 'utils/logging/log-util' import { flattenJSON, getKeyByValue, getParents } from 'utils/navigation-utils' import { LibraryContext } from '@vtexdocs/components' +import ReactMarkdown from 'react-markdown' const docsPathsGLOBAL = await getDocsPaths() @@ -123,9 +124,11 @@ const DocumentationPage: NextPage = ({ {serialized.frontmatter?.title} - - {serialized.frontmatter?.excerpt} - + + + {serialized.frontmatter?.excerpt as string} + +
    diff --git a/src/pages/docs/guides/faststore/[slug].tsx b/src/pages/docs/guides/faststore/[slug].tsx index 45cd39569..379f70fb7 100644 --- a/src/pages/docs/guides/faststore/[slug].tsx +++ b/src/pages/docs/guides/faststore/[slug].tsx @@ -16,6 +16,7 @@ import Breadcrumb from 'components/breadcrumb' import Contributors from 'components/contributors' import FeedbackSection from 'components/feedback-section' import OnThisPage from 'components/on-this-page' +import SeeAlsoSection from 'components/see-also-section' import { getComponentPropsFrom } from 'components/faststore-components/utilities/propsSection' import { PreviewContext } from 'utils/contexts/preview' @@ -39,6 +40,10 @@ import { MDXRemoteSerializeResult } from 'next-mdx-remote' import { getLogger } from 'utils/logging/log-util' import { Item, LibraryContext, TableOfContents } from '@vtexdocs/components' import MarkdownRenderer from 'components/faststore-components/markdown-renderer' +import { remarkCodeHike } from '@code-hike/mdx' +import ReactMarkdown from 'react-markdown' + +const docsPathsGLOBAL = await getFastStorePaths() interface Props { serialized: MDXRemoteSerializeResult @@ -48,6 +53,11 @@ interface Props { description: string excerpt: string keywords: string[] + seeAlso?: { + url: string + title: string + category: string + }[] sidebar_custom_props?: { image: string } @@ -55,11 +65,18 @@ interface Props { hidePaginationPrevious: boolean } sectionSelected: string + // eslint-disable-next-line @typescript-eslint/no-explicit-any + sidebarfallback: any parentsArray: string[] breadcumbList: { slug: string; name: string; type: string }[] slug: string filePath: string headingList: Item[] + seeAlsoData: { + url: string + title: string + category: string + }[] contributors: ContributorsType[] code: string mdxProps: { @@ -74,34 +91,42 @@ interface Props { isListed: boolean } -const docsPathsGLOBAL = await getFastStorePaths() - const FastStorePage: NextPage = ({ - serialized, - frontmatter, - sectionSelected, - breadcumbList, slug, + serialized, filePath, + frontmatter, headingList, contributors, - mdxProps, - branch, pagination, + sectionSelected, isListed, + breadcumbList, + mdxProps, + branch, + seeAlsoData, }) => { const { setBranchPreview } = useContext(PreviewContext) const { setActiveSidebarElement } = useContext(LibraryContext) useEffect(() => { setActiveSidebarElement(slug) setBranchPreview(branch) - }, []) + }, [serialized.frontmatter]) return ( <> - FastStore + {serialized.frontmatter?.title} - + + {serialized.frontmatter?.excerpt && ( + + )} @@ -113,11 +138,13 @@ const FastStorePage: NextPage = ({ {frontmatter.title} - - {frontmatter.excerpt - ? frontmatter.excerpt - : frontmatter.description} - + + + {frontmatter.excerpt + ? frontmatter.excerpt + : frontmatter.description} + +
    @@ -140,6 +167,7 @@ const FastStorePage: NextPage = ({ pagination={pagination} /> )} + {frontmatter?.seeAlso && } @@ -172,7 +200,8 @@ export const getStaticProps: GetStaticProps = async ({ preview && JSON.parse(JSON.stringify(previewData)).hasOwnProperty('branch') ? JSON.parse(JSON.stringify(previewData)).branch : 'main' - const slug = params?.slug as string + const simplifiedSlug = params?.slug as string + const slug = `faststore/${simplifiedSlug}` const branch = preview ? previewBranch : 'feat/faststore-docs' const docsPaths = @@ -182,7 +211,7 @@ export const getStaticProps: GetStaticProps = async ({ const logger = getLogger('FastStore') - const filePath = docsPaths[slug] + const filePath = docsPaths[simplifiedSlug] if (!filePath) { return { notFound: true, @@ -215,22 +244,17 @@ export const getStaticProps: GetStaticProps = async ({ '' ) - const sidebarfallback = await getNavigation() - const flattenedSidebar = flattenJSON(sidebarfallback) - const isListed: boolean = getKeyByValue(flattenedSidebar, slug) ? true : false - const cleanSlug = getKeyByValue(flattenedSidebar, slug) - const keyPath = cleanSlug - ? getKeyByValue(flattenedSidebar, slug) - : getKeyByValue(flattenedSidebar, `faststore/${slug}`) - const parentsArray: string[] = [] const parentsArrayName: string[] = [] const parentsArrayType: string[] = [] - const sectionSelected = 'FastStore' - + const sidebarfallback = await getNavigation() + const sectionSelected = 'Storefront Development' + const flattenedSidebar = flattenJSON(sidebarfallback) + const keyPath = getKeyByValue(flattenedSidebar, `faststore/${simplifiedSlug}`) + const isListed: boolean = keyPath ? true : false if (keyPath) { getParents(keyPath, 'slug', flattenedSidebar, parentsArray) - cleanSlug ? parentsArray.push(slug) : parentsArray.push(`guides/${slug}`) + parentsArray.push(slug) getParents(keyPath, 'name', flattenedSidebar, parentsArrayName) getParents(keyPath, 'type', flattenedSidebar, parentsArrayType) } @@ -243,7 +267,6 @@ export const getStaticProps: GetStaticProps = async ({ type: parentsArrayType[idx], }) }) - function transformer(ast: Node) { visit(ast, 'element', visitor) @@ -264,6 +287,17 @@ export const getStaticProps: GetStaticProps = async ({ parseFrontmatter: true, mdxOptions: { remarkPlugins: [ + [ + remarkCodeHike, + { + autoImport: false, + showCopyButton: true, + lineNumbers: true, + skipLanguages: ['mermaid'], + staticMediaQuery: 'not screen, (max-width: 850px)', + theme: 'poimandres', + }, + ], remarkGFM, remarkImages, [getHeadings, { headingList }], @@ -274,6 +308,7 @@ export const getStaticProps: GetStaticProps = async ({ [rehypeHighlight, { languages: { hljsCurl }, ignoreMissing: true }], changeParagraphTag, ], + useDynamicImport: true, format: 'mdx', }, }) @@ -282,6 +317,43 @@ export const getStaticProps: GetStaticProps = async ({ ? JSON.parse(JSON.stringify(serialized.frontmatter.components as string)) : [] + const seeAlsoData: { + url: string + title: string + category: string + }[] = [] + const seeAlsoUrls = serialized.frontmatter?.seeAlso + ? JSON.parse(JSON.stringify(serialized.frontmatter.seeAlso as string)) + : [] + await Promise.all( + seeAlsoUrls.map(async (seeAlsoUrl: string) => { + const category = seeAlsoUrl.includes('api-reference') + ? 'API Reference' + : seeAlsoUrl.includes('/faststore/') + ? 'Storefront Development' + : seeAlsoUrl.includes('/apps/') + ? 'VTEX IO Apps' + : 'Guides' + if (seeAlsoUrl.startsWith('/docs')) { + try { + const response = await fetch( + `https://developers.vtex.com${seeAlsoUrl}` + ) + if (response.ok) { + const html = await response.text() + const titleMatch = html.match(/(.*?)<\/title>/i) + const pageTitle = titleMatch ? titleMatch[1] : 'Untitled' + seeAlsoData.push({ + url: seeAlsoUrl, + title: pageTitle, + category: category, + }) + } + } catch (error) {} + } + }) + ) + const mdxPath = filePath.split('/') const componentPath = mdxPath @@ -304,12 +376,11 @@ export const getStaticProps: GetStaticProps = async ({ sidebarfallback, `$..[?(@.type=='markdown')]..name` ) - const indexOfSlug = docsListSlug.indexOf(slug) - + const indexOfSlug = docsListSlug.indexOf(`faststore/${simplifiedSlug}`) const pagination = { previousDoc: { slug: docsListSlug[indexOfSlug - 1] - ? `/docs/faststore/${docsListSlug[indexOfSlug - 1]}` + ? `/docs/guides/${docsListSlug[indexOfSlug - 1]}` : null, name: docsListName[indexOfSlug - 1] ? docsListName[indexOfSlug - 1] @@ -317,7 +388,7 @@ export const getStaticProps: GetStaticProps = async ({ }, nextDoc: { slug: docsListSlug[indexOfSlug + 1] - ? `/docs/faststore/${docsListSlug[indexOfSlug + 1]}` + ? `/docs/guides/${docsListSlug[indexOfSlug + 1]}` : null, name: docsListName[indexOfSlug + 1] ? docsListName[indexOfSlug + 1] @@ -327,19 +398,21 @@ export const getStaticProps: GetStaticProps = async ({ return { props: { - serialized, sectionSelected, + sidebarfallback, parentsArray, slug, - filePath, + serialized, + headingList, + seeAlsoData, contributors, - frontmatter: serialized.frontmatter, - mdxProps, + filePath, + pagination, + isListed, breadcumbList, - headingList, branch, - isListed, - pagination, + frontmatter: serialized.frontmatter, + mdxProps, }, } } catch (error) { diff --git a/src/pages/docs/guides/faststore/index.tsx b/src/pages/docs/guides/faststore/index.tsx index 4db7a9857..8a050a912 100644 --- a/src/pages/docs/guides/faststore/index.tsx +++ b/src/pages/docs/guides/faststore/index.tsx @@ -218,7 +218,7 @@ export const getStaticProps: GetStaticProps = async ({ previewData, }) => { const sidebarfallback = await getNavigation() - const sectionSelected = 'FastStore' + const sectionSelected = 'Storefront Development' const previewBranch = preview && JSON.parse(JSON.stringify(previewData)).hasOwnProperty('branch') diff --git a/src/styles/documentation-page.ts b/src/styles/documentation-page.ts index c8bb42ae2..37c6652f5 100644 --- a/src/styles/documentation-page.ts +++ b/src/styles/documentation-page.ts @@ -74,13 +74,19 @@ const documentationTitle: SxStyleProp = { fontSize: ['20px', '28px'], lineHeight: ['30px', '38px'], fontWeight: '400', + marginBottom: '14px', } const documentationExcerpt: SxStyleProp = { color: '#A1A8B3', - padding: '0.5em 0 1.2em', lineHeight: '1.5em', fontWeight: '400', + code: { + fontSize: '0.8rem', + backgroundColor: '#f7f8fa', + padding: '2px 4px', + borderRadius: '4px', + }, } const bottomContributorsContainer: SxStyleProp = {