From f08ecb8e3c3b0d9e96e7e2db8e19e3704c56cdf7 Mon Sep 17 00:00:00 2001 From: Erik Hanchett Date: Tue, 19 Nov 2024 17:29:43 -0800 Subject: [PATCH 1/9] Added new badge and message for AI kit --- mdx-components.tsx | 2 + src/components/Banner/Banner.tsx | 49 ++++ .../Banner/__tests__/Banner.test.tsx | 13 + src/components/Banner/index.tsx | 1 + src/components/Layout/Layout.tsx | 4 + src/components/Menu/MenuItem.tsx | 3 +- src/data/gen2Banner-urls.ts | 260 ++++++++++++++++++ src/directory/directory.d.ts | 5 + src/pages/[platform]/ai/index.mdx | 1 + src/pages/index.tsx | 1 + src/styles/banner.scss | 22 ++ src/styles/styles.scss | 1 + yarn.lock | 2 +- 13 files changed, 362 insertions(+), 2 deletions(-) create mode 100644 src/components/Banner/Banner.tsx create mode 100644 src/components/Banner/__tests__/Banner.test.tsx create mode 100644 src/components/Banner/index.tsx create mode 100644 src/data/gen2Banner-urls.ts create mode 100644 src/styles/banner.scss diff --git a/mdx-components.tsx b/mdx-components.tsx index a587becd6b3..c5e14e2528e 100644 --- a/mdx-components.tsx +++ b/mdx-components.tsx @@ -1,6 +1,7 @@ import * as React from 'react'; import type { MDXComponents } from 'mdx/types'; import ExportedImage from 'next-image-export-optimizer'; +import { Banner } from './src/components/Banner'; import InlineFilter from './src/components/InlineFilter'; import { YoutubeEmbed } from './src/components/YoutubeEmbed'; import { Accordion } from './src/components/Accordion'; @@ -64,6 +65,7 @@ export function useMDXComponents(components: MDXComponents): MDXComponents { InlineFilter, MigrationAlert, YoutubeEmbed, + Banner, Overview, ExternalLink, ExternalLinkButton, diff --git a/src/components/Banner/Banner.tsx b/src/components/Banner/Banner.tsx new file mode 100644 index 00000000000..2cb69bb8612 --- /dev/null +++ b/src/components/Banner/Banner.tsx @@ -0,0 +1,49 @@ +import { Flex, Message, IconsProvider, Text } from '@aws-amplify/ui-react'; +import { IconStar, IconChevron } from '../Icons'; +import { Button } from '@aws-amplify/ui-react'; + +interface BannerProps { + url?: string; +} + +export const Banner: React.FC = ({ + url = '/react/ai/set-up-ai/' +}) => { + return ( + + } + }} + > + + + + + Amplify AI kit is now generally available + + + Create fullstack AI capabable apps using TypeScript, with just a + few lines of code. + + + + + + + + ); +}; diff --git a/src/components/Banner/__tests__/Banner.test.tsx b/src/components/Banner/__tests__/Banner.test.tsx new file mode 100644 index 00000000000..335973d6411 --- /dev/null +++ b/src/components/Banner/__tests__/Banner.test.tsx @@ -0,0 +1,13 @@ +import * as React from 'react'; +import { render, screen } from '@testing-library/react'; +import { Banner } from '../index'; + +describe('Banner', () => { + it('should render the Banner component', async () => { + const bannerText = 'Amplify AI kit is now generally available'; + render(); + + const component = await screen.findByText(bannerText); + expect(component).toBeInTheDocument(); + }); +}); diff --git a/src/components/Banner/index.tsx b/src/components/Banner/index.tsx new file mode 100644 index 00000000000..f4930c0719e --- /dev/null +++ b/src/components/Banner/index.tsx @@ -0,0 +1 @@ +export { Banner } from './Banner'; diff --git a/src/components/Layout/Layout.tsx b/src/components/Layout/Layout.tsx index 4638d637994..8d3bd84b08f 100644 --- a/src/components/Layout/Layout.tsx +++ b/src/components/Layout/Layout.tsx @@ -21,6 +21,7 @@ import { PLATFORM_DISPLAY_NAMES, Platform } from '@/data/platforms'; +import { GEN2BANNER_URLS } from '@/data/gen2Banner-urls'; import { SpaceShip } from '@/components/SpaceShip'; import { LEFT_NAV_LINKS, RIGHT_NAV_LINKS } from '@/utils/globalnav'; import { LayoutProvider, LayoutHeader } from '@/components/Layout'; @@ -29,6 +30,7 @@ import type { HeadingInterface } from '@/components/TableOfContents/TableOfConte import { Breadcrumbs } from '@/components/Breadcrumbs'; import { debounce } from '@/utils/debounce'; import '@docsearch/css'; +import { Banner } from '@/components/Banner'; import { usePathWithoutHash } from '@/utils/usePathWithoutHash'; import { NextPrevious, @@ -71,6 +73,7 @@ export const Layout = ({ const basePath = 'docs.amplify.aws'; const metaUrl = url ? url : basePath + asPathWithNoHash; const pathname = router.pathname; + const shouldShowGen2Banner = GEN2BANNER_URLS.includes(asPathWithNoHash); const isGen1 = asPathWithNoHash.split('/')[1] === 'gen1'; const isContributor = asPathWithNoHash.split('/')[1] === 'contribute'; const currentGlobalNavMenuItem = isContributor ? 'Contribute' : 'Docs'; @@ -272,6 +275,7 @@ export const Layout = ({ platform={currentPlatform} /> ) : null} + {shouldShowGen2Banner ? : null} {useCustomTitle ? null : ( {pageTitle} )} diff --git a/src/components/Menu/MenuItem.tsx b/src/components/Menu/MenuItem.tsx index e49cbe2510f..6478c5de608 100644 --- a/src/components/Menu/MenuItem.tsx +++ b/src/components/Menu/MenuItem.tsx @@ -1,6 +1,6 @@ import { usePathWithoutHash } from '@/utils/usePathWithoutHash'; import { ReactElement, useContext, useEffect, useState, useMemo } from 'react'; -import { Link as AmplifyUILink, Flex } from '@aws-amplify/ui-react'; +import { Link as AmplifyUILink, Flex, Badge } from '@aws-amplify/ui-react'; import { IconExternalLink, IconChevron } from '@/components/Icons'; import Link from 'next/link'; import { JS_PLATFORMS, Platform, JSPlatform } from '@/data/platforms'; @@ -200,6 +200,7 @@ export function MenuItem({ className={`menu__list-item__link__inner ${listItemLinkInnerStyle}`} > {pageNode.title} + {pageNode.isNew && New} {children && hasVisibleChildren && level !== Levels.Category && ( )} diff --git a/src/data/gen2Banner-urls.ts b/src/data/gen2Banner-urls.ts new file mode 100644 index 00000000000..dd063f71710 --- /dev/null +++ b/src/data/gen2Banner-urls.ts @@ -0,0 +1,260 @@ +/** + * List of paths that the gen2 should display on + */ +export const GEN2BANNER_URLS = [ + '/', + '/angular/', + '/javascript/', + '/nextjs/', + '/react/', + '/vue/', + '/react-native/', + '/javascript/how-amplify-works/', + '/angular/how-amplify-works/', + '/react/how-amplify-works/', + '/nextjs/how-amplify-works/', + '/vue/how-amplify-works/', + '/angular/start/', + '/javascript/start/', + '/nextjs/start/', + '/react/start/', + '/vue/start/', + '/react-native/start/', + '/javascript/build-a-backend/', + '/angular/build-a-backend/', + '/nextjs/build-a-backend/', + '/react/build-a-backend/', + '/vue/build-a-backend/', + '/react-native/build-a-backend/', + '/javascript/build-a-backend/graphqlapi/', + '/angular/build-a-backend/graphqlapi/', + '/react/build-a-backend/graphqlapi/', + '/nextjs/build-a-backend/graphqlapi/', + '/vue/build-a-backend/graphqlapi/', + '/javascript/build-a-backend/graphqlapi/connect-to-api/', + '/react/build-a-backend/graphqlapi/connect-to-api/', + '/angular/build-a-backend/graphqlapi/connect-to-api/', + '/vue/build-a-backend/graphqlapi/connect-to-api/', + '/nextjs/build-a-backend/graphqlapi/connect-to-api/', + '/javascript/build-a-backend/graphqlapi/connect-existing-data/', + '/react/build-a-backend/graphqlapi/connect-existing-data/', + '/angular/build-a-backend/graphqlapi/connect-existing-data/', + '/vue/build-a-backend/graphqlapi/connect-existing-data/', + '/nextjs/build-a-backend/graphqlapi/connect-existing-data/', + '/javascript/build-a-backend/graphqlapi/mutate-data/', + '/react/build-a-backend/graphqlapi/mutate-data/', + '/angular/build-a-backend/graphqlapi/mutate-data/', + '/vue/build-a-backend/graphqlapi/mutate-data/', + '/nextjs/build-a-backend/graphqlapi/mutate-data/', + '/javascript/build-a-backend/graphqlapi/query-data/', + '/react/build-a-backend/graphqlapi/query-data/', + '/angular/build-a-backend/graphqlapi/query-data/', + '/vue/build-a-backend/graphqlapi/query-data/', + '/nextjs/build-a-backend/graphqlapi/query-data/', + '/javascript/build-a-backend/graphqlapi/subscribe-data/', + '/react/build-a-backend/graphqlapi/subscribe-data/', + '/angular/build-a-backend/graphqlapi/subscribe-data/', + '/vue/build-a-backend/graphqlapi/subscribe-data/', + '/nextjs/build-a-backend/graphqlapi/subscribe-data/', + '/javascript/build-a-backend/graphqlapi/data-modeling/', + '/angular/build-a-backend/graphqlapi/data-modeling/', + '/react/build-a-backend/graphqlapi/data-modeling/', + '/nextjs/build-a-backend/graphqlapi/data-modeling/', + '/vue/build-a-backend/graphqlapi/data-modeling/', + '/javascript/build-a-backend/graphqlapi/customize-authorization-rules/', + '/react/build-a-backend/graphqlapi/customize-authorization-rules/', + '/angular/build-a-backend/graphqlapi/customize-authorization-rules/', + '/vue/build-a-backend/graphqlapi/customize-authorization-rules/', + '/nextjs/build-a-backend/graphqlapi/customize-authorization-rules/', + '/javascript/build-a-backend/graphqlapi/custom-business-logic/', + '/angular/build-a-backend/graphqlapi/custom-business-logic/', + '/react/build-a-backend/graphqlapi/custom-business-logic/', + '/nextjs/build-a-backend/graphqlapi/custom-business-logic/', + '/vue/build-a-backend/graphqlapi/custom-business-logic/', + '/javascript/build-a-backend/graphqlapi/modify-amplify-generated-resources/', + '/angular/build-a-backend/graphqlapi/modify-amplify-generated-resources/', + '/react/build-a-backend/graphqlapi/modify-amplify-generated-resources/', + '/nextjs/build-a-backend/graphqlapi/modify-amplify-generated-resources/', + '/vue/build-a-backend/graphqlapi/modify-amplify-generated-resources/', + '/javascript/build-a-backend/graphqlapi/best-practice/', + '/react/build-a-backend/graphqlapi/best-practice/', + '/angular/build-a-backend/graphqlapi/best-practice/', + '/vue/build-a-backend/graphqlapi/best-practice/', + '/nextjs/build-a-backend/graphqlapi/best-practice/', + '/javascript/build-a-backend/graphqlapi/best-practice/warehouse-management/', + '/angular/build-a-backend/graphqlapi/best-practice/warehouse-management/', + '/react/build-a-backend/graphqlapi/best-practice/warehouse-management/', + '/nextjs/build-a-backend/graphqlapi/best-practice/warehouse-management/', + '/vue/build-a-backend/graphqlapi/best-practice/warehouse-management/', + '/javascript/build-a-backend/graphqlapi/search-and-result-aggregations/', + '/react/build-a-backend/graphqlapi/search-and-result-aggregations/', + '/angular/build-a-backend/graphqlapi/search-and-result-aggregations/', + '/nextjs/build-a-backend/graphqlapi/search-and-result-aggregations/', + '/vue/build-a-backend/graphqlapi/search-and-result-aggregations/', + '/javascript/build-a-backend/graphqlapi/connect-machine-learning-services/', + '/angular/build-a-backend/graphqlapi/connect-machine-learning-services/', + '/react/build-a-backend/graphqlapi/connect-machine-learning-services/', + '/nextjs/build-a-backend/graphqlapi/connect-machine-learning-services/', + '/vue/build-a-backend/graphqlapi/connect-machine-learning-services/', + '/javascript/build-a-backend/graphqlapi/troubleshooting/', + '/react/build-a-backend/graphqlapi/troubleshooting/', + '/angular/build-a-backend/graphqlapi/troubleshooting/', + '/vue/build-a-backend/graphqlapi/troubleshooting/', + '/nextjs/build-a-backend/graphqlapi/troubleshooting/', + '/javascript/tools/cli/graphqlapi/directives-reference/', + '/angular/tools/cli/graphqlapi/directives-reference/', + '/react/tools/cli/graphqlapi/directives-reference/', + '/nextjs/tools/cli/graphqlapi/directives-reference/', + '/vue/tools/cli/graphqlapi/directives-reference/', + '/javascript/build-a-backend/auth/', + '/angular/build-a-backend/auth/', + '/react/build-a-backend/auth/', + '/nextjs/build-a-backend/auth/', + '/vue/build-a-backend/auth/', + '/javascript/build-a-backend/auth/set-up-auth/', + '/react/build-a-backend/auth/set-up-auth/', + '/angular/build-a-backend/auth/set-up-auth/', + '/vue/build-a-backend/auth/set-up-auth/', + '/nextjs/build-a-backend/auth/set-up-auth/', + '/javascript/build-a-backend/auth/enable-sign-up/', + '/react/build-a-backend/auth/enable-sign-up/', + '/angular/build-a-backend/auth/enable-sign-up/', + '/vue/build-a-backend/auth/enable-sign-up/', + '/nextjs/build-a-backend/auth/enable-sign-up/', + '/javascript/build-a-backend/auth/manage-user-session/', + '/react/build-a-backend/auth/manage-user-session/', + '/angular/build-a-backend/auth/manage-user-session/', + '/vue/build-a-backend/auth/manage-user-session/', + '/nextjs/build-a-backend/auth/manage-user-session/', + '/javascript/build-a-backend/auth/add-social-provider/', + '/react/build-a-backend/auth/add-social-provider/', + '/angular/build-a-backend/auth/add-social-provider/', + '/vue/build-a-backend/auth/add-social-provider/', + '/nextjs/build-a-backend/auth/add-social-provider/', + '/javascript/build-a-backend/auth/manage-user-profile/', + '/react/build-a-backend/auth/manage-user-profile/', + '/angular/build-a-backend/auth/manage-user-profile/', + '/vue/build-a-backend/auth/manage-user-profile/', + '/nextjs/build-a-backend/auth/manage-user-profile/', + '/javascript/build-a-backend/auth/password-management/', + '/react/build-a-backend/auth/password-management/', + '/angular/build-a-backend/auth/password-management/', + '/vue/build-a-backend/auth/password-management/', + '/nextjs/build-a-backend/auth/password-management/', + '/javascript/build-a-backend/auth/manage-mfa/', + '/react/build-a-backend/auth/manage-mfa/', + '/angular/build-a-backend/auth/manage-mfa/', + '/vue/build-a-backend/auth/manage-mfa/', + '/nextjs/build-a-backend/auth/manage-mfa/', + '/javascript/build-a-backend/auth/delete-user-account/', + '/react/build-a-backend/auth/delete-user-account/', + '/angular/build-a-backend/auth/delete-user-account/', + '/vue/build-a-backend/auth/delete-user-account/', + '/nextjs/build-a-backend/auth/delete-user-account/', + '/javascript/build-a-backend/server-side-rendering/nextjs/', + '/react/build-a-backend/server-side-rendering/nextjs/', + '/angular/build-a-backend/server-side-rendering/nextjs/', + '/vue/build-a-backend/server-side-rendering/nextjs/', + '/nextjs/build-a-backend/server-side-rendering/nextjs/', + '/javascript/build-a-backend/auth/auth-events/', + '/react/build-a-backend/auth/auth-events/', + '/angular/build-a-backend/auth/auth-events/', + '/vue/build-a-backend/auth/auth-events/', + '/nextjs/build-a-backend/auth/auth-events/', + '/javascript/build-a-backend/build-a-backend/auth/admin-actions/', + '/angular/build-a-backend/build-a-backend/auth/admin-actions/', + '/react/build-a-backend/build-a-backend/auth/admin-actions/', + '/nextjs/build-a-backend/build-a-backend/auth/admin-actions/', + '/vue/build-a-backend/build-a-backend/auth/admin-actions/', + '/javascript/build-a-backend/build-a-backend/auth/override-cognito/', + '/angular/build-a-backend/build-a-backend/auth/override-cognito/', + '/react/build-a-backend/build-a-backend/auth/override-cognito/', + '/nextjs/build-a-backend/build-a-backend/auth/override-cognito/', + '/vue/build-a-backend/build-a-backend/auth/override-cognito/', + '/react-native/build-a-backend/build-a-backend/auth/override-cognito/', + '/react-native/build-a-backend/graphqlapi/', + '/react-native/build-a-backend/graphqlapi/custom-business-logic/', + '/react-native/build-a-backend/graphqlapi/search-and-result-aggregations/', + '/react-native/build-a-backend/graphqlapi/connect-machine-learning-services/', + '/javascript/prev/start/project-setup/create-application/', + '/angular/prev/start/project-setup/create-application/', + '/nextjs/prev/start/project-setup/create-application/', + '/react/prev/start/project-setup/create-application/', + '/vue/prev/start/project-setup/create-application/', + '/javascript/prev/start/project-setup/prerequisites/', + '/angular/prev/start/project-setup/prerequisites/', + '/react/prev/start/project-setup/prerequisites/', + '/nextjs/prev/start/project-setup/prerequisites/', + '/vue/prev/start/project-setup/prerequisites/', + '/javascript/start/project-setup/create-application/', + '/angular/start/project-setup/create-application/', + '/nextjs/start/project-setup/create-application/', + '/react/start/project-setup/create-application/', + '/vue/start/project-setup/create-application/', + '/javascript/start/project-setup/prerequisites/', + '/angular/start/project-setup/prerequisites/', + '/nextjs/start/project-setup/prerequisites/', + '/react/start/project-setup/prerequisites/', + '/vue/start/project-setup/prerequisites/', + '/angular/start/getting-started/auth/', + '/react/start/getting-started/auth/', + '/vue/start/getting-started/auth/', + '/angular/start/getting-started/data-model/', + '/javascript/start/getting-started/data-model/', + '/nextjs/start/getting-started/data-model/', + '/react/start/getting-started/data-model/', + '/vue/start/getting-started/data-model/', + '/angular/start/getting-started/hosting/', + '/javascript/start/getting-started/hosting/', + '/nextjs/start/getting-started/hosting/', + '/react/start/getting-started/hosting/', + '/vue/start/getting-started/hosting/', + '/angular/start/getting-started/installation/', + '/javascript/start/getting-started/installation/', + '/nextjs/start/getting-started/installation/', + '/react/start/getting-started/installation/', + '/vue/start/getting-started/installation/', + '/angular/start/getting-started/nextsteps/', + '/javascript/start/getting-started/nextsteps/', + '/nextjs/start/getting-started/nextsteps/', + '/react/start/getting-started/nextsteps/', + '/vue/start/getting-started/nextsteps/', + '/angular/start/getting-started/setup/', + '/javascript/start/getting-started/setup/', + '/nextjs/start/getting-started/setup/', + '/react/start/getting-started/setup/', + '/vue/start/getting-started/setup/', + '/angular/start/getting-started/introduction/', + '/javascript/start/getting-started/introduction/', + '/nextjs/start/getting-started/introduction/', + '/react/start/getting-started/introduction/', + '/vue/start/getting-started/introduction/', + '/react-native/start/getting-started/auth/', + '/react-native/start/getting-started/data-model/', + '/react-native/start/getting-started/installation/', + '/react-native/start/getting-started/nextsteps/', + '/react-native/start/getting-started/setup/', + '/react-native/start/getting-started/introduction/', + '/android/build-ui/', + '/angular/build-ui/', + '/flutter/build-ui/', + '/react/build-ui/', + '/react-native/build-ui/', + '/swift/build-ui/', + '/vue/build-ui/', + '/javascript/deploy-and-host/', + '/angular/deploy-and-host/', + '/react/deploy-and-host/', + '/nextjs/deploy-and-host/', + '/vue/deploy-and-host/', + '/javascript/prev/tools/libraries/', + '/angular/prev/tools/libraries/', + '/nextjs/prev/tools/libraries/', + '/react/prev/tools/libraries/', + '/vue/prev/tools/libraries/', + '/javascript/tools/libraries/', + '/angular/tools/libraries/', + '/react/tools/libraries/', + '/nextjs/tools/libraries/', + '/vue/tools/libraries/' +]; diff --git a/src/directory/directory.d.ts b/src/directory/directory.d.ts index 5d1433a162b..763d1f8a8a2 100644 --- a/src/directory/directory.d.ts +++ b/src/directory/directory.d.ts @@ -57,4 +57,9 @@ export type PageNode = { * This is being used for categories like Cli - Legacy and SDK */ hideChildrenOnBase?: boolean; + + /** + * This flag indicates that the item is new and will display a pill + */ + isNew?: boolean; }; diff --git a/src/pages/[platform]/ai/index.mdx b/src/pages/[platform]/ai/index.mdx index edee3b692a2..efc70d6d257 100644 --- a/src/pages/[platform]/ai/index.mdx +++ b/src/pages/[platform]/ai/index.mdx @@ -4,6 +4,7 @@ import { getCustomStaticPath } from '@/utils/getCustomStaticPath'; export const meta = { title: 'AI kit', description: 'The quickest way for fullstack developers to build web apps with AI capabilities such as chat, conversational search, and summarization', + isNew: true, route: '/[platform]/ai', platforms: [ 'angular', diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 3c6d25e3819..1834cc4e1bc 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -40,6 +40,7 @@ export default function Page() { return ( + {/* */} Amplify Documentation diff --git a/src/styles/banner.scss b/src/styles/banner.scss new file mode 100644 index 00000000000..ab0330430b9 --- /dev/null +++ b/src/styles/banner.scss @@ -0,0 +1,22 @@ +.message-banner { + align-items: start; + /* Specificity to override Amplify UI color theme */ + &.amplify-message--info { + border: 1px solid var(--amplify-colors-purple-20); + background-color: var(--amplify-colors-purple-10); + @include darkMode { + background-color: var(--amplify-colors-purple-20); + } + } + .amplify-message__icon { + color: var(--amplify-colors-purple-80); + } + &__inner { + display: flex; + flex-direction: column; + align-items: flex-start; + } + &__heading { + font-weight: 700; + } +} diff --git a/src/styles/styles.scss b/src/styles/styles.scss index fa59b64e62c..c6958471e7b 100644 --- a/src/styles/styles.scss +++ b/src/styles/styles.scss @@ -9,6 +9,7 @@ @import './accordion.scss'; @import './block-switcher.scss'; @import './breadcrumbs.scss'; +@import './banner.scss'; @import './callout.scss'; @import './code.scss'; @import './color-switcher.scss'; diff --git a/yarn.lock b/yarn.lock index 25fb27bfcfc..a6440b6655a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4574,7 +4574,7 @@ cross-env@^7.0.3: dependencies: cross-spawn "^7.0.1" -cross-spawn@^6.0.0, "cross-spawn@^6.0.6 || ^7.0.5", cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3: +cross-spawn@^6.0.0, cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3, cross-spawn@^7.0.5: version "7.0.6" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== From 6360605e137f2da963635aaada0a8e8d9ab76676 Mon Sep 17 00:00:00 2001 From: Erik Hanchett Date: Tue, 19 Nov 2024 17:32:46 -0800 Subject: [PATCH 2/9] Fixed typo --- src/components/Banner/Banner.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Banner/Banner.tsx b/src/components/Banner/Banner.tsx index 2cb69bb8612..c55bfc76d56 100644 --- a/src/components/Banner/Banner.tsx +++ b/src/components/Banner/Banner.tsx @@ -24,8 +24,8 @@ export const Banner: React.FC = ({ Amplify AI kit is now generally available - Create fullstack AI capabable apps using TypeScript, with just a - few lines of code. + Create fullstack AI capable apps using TypeScript, with just a few + lines of code. From 8322e1b6397d5bd5655bec88c399a4f2bbf5370d Mon Sep 17 00:00:00 2001 From: Erik Hanchett Date: Tue, 19 Nov 2024 17:36:03 -0800 Subject: [PATCH 3/9] Removed commented out code --- src/pages/index.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 1834cc4e1bc..3c6d25e3819 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -40,7 +40,6 @@ export default function Page() { return ( - {/* */} Amplify Documentation From 69b06f3a0c981588f7451d7a184c3de4348d9aa9 Mon Sep 17 00:00:00 2001 From: dindjarinjs <187552781+dindjarinjs@users.noreply.github.com> Date: Thu, 21 Nov 2024 15:54:11 -0700 Subject: [PATCH 4/9] chore: bump ui-react lib --- package.json | 3 ++- yarn.lock | 39 ++++++++++++++++++++++++--------------- 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index bb353d977c0..92083486721 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "private": true, "dependencies": { "@aws-amplify/amplify-cli-core": "^4.3.9", - "@aws-amplify/ui-react": "^6.3.1", + "@aws-amplify/ui-react": "^6.7.0", + "@aws-amplify/ui-react-ai": "^1.0.0", "@docsearch/react": "3", "ajv": "^8.16.0", "aws-amplify": "^6.0.9", diff --git a/yarn.lock b/yarn.lock index a6440b6655a..97b7fc4decc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -350,24 +350,33 @@ fast-xml-parser "^4.4.1" tslib "^2.5.0" -"@aws-amplify/ui-react-core@3.0.22": - version "3.0.22" - resolved "https://registry.npmjs.org/@aws-amplify/ui-react-core/-/ui-react-core-3.0.22.tgz" - integrity sha512-uL5jspqvTZhpqH1inPV3ifvrzIVgIIriXPgjz4BaceDm+1X03Hc3tfq5TiUKW8PdpuWF6riXXBP3MEFsk29OGw== +"@aws-amplify/ui-react-ai@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@aws-amplify/ui-react-ai/-/ui-react-ai-1.0.0.tgz#db6dede6b42685f9c03293374a1aaf195de7f02f" + integrity sha512-Y+ezPjjdUajEjN+naWhaBn7TQ4nVEtB0EylGwI8YrLKHFQVJaEGBWvvw9mfiUl3krWv+utP+EhagTM8Zk9cMBg== dependencies: - "@aws-amplify/ui" "6.4.1" + "@aws-amplify/ui" "^6.6.6" + "@aws-amplify/ui-react" "^6.6.0" + "@aws-amplify/ui-react-core" "^3.0.30" + +"@aws-amplify/ui-react-core@3.1.0", "@aws-amplify/ui-react-core@^3.0.30": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@aws-amplify/ui-react-core/-/ui-react-core-3.1.0.tgz#236ecf10194a27dc57fc983c679ab1de19b8a00d" + integrity sha512-Nime3qjJRQyfRDDA4bnAaFVzRfEBddZFP8NhVIb13z7Uw0XoPQzX+dXwuRW+Bjt2FJnlIUHh7Cfkt0m4PedRHQ== + dependencies: + "@aws-amplify/ui" "6.7.0" "@xstate/react" "^3.2.2" lodash "4.17.21" react-hook-form "^7.43.5" xstate "^4.33.6" -"@aws-amplify/ui-react@^6.3.1": - version "6.3.1" - resolved "https://registry.npmjs.org/@aws-amplify/ui-react/-/ui-react-6.3.1.tgz" - integrity sha512-n/wTjMYYuAhpgpuQ4o+9+IgvNsdjGqbfaA4bAXE7b1apIOfM8HTaO2zant85x+geDl7rbaa1y/z62T4H9AksMQ== +"@aws-amplify/ui-react@^6.6.0", "@aws-amplify/ui-react@^6.7.0": + version "6.7.0" + resolved "https://registry.yarnpkg.com/@aws-amplify/ui-react/-/ui-react-6.7.0.tgz#a3fc28980feee01f319448c360307a5ccc65c7f3" + integrity sha512-3H97gz43+iaVNPqkQIiFj4Ko7zJLyMGtZScfNyt6PK4Ntuit5ZP6hc+Z7BtNsNEkfnAiGL1BiNOuD1IBfsnifw== dependencies: - "@aws-amplify/ui" "6.4.1" - "@aws-amplify/ui-react-core" "3.0.22" + "@aws-amplify/ui" "6.7.0" + "@aws-amplify/ui-react-core" "3.1.0" "@radix-ui/react-direction" "1.0.0" "@radix-ui/react-dropdown-menu" "1.0.0" "@radix-ui/react-slider" "1.0.0" @@ -376,10 +385,10 @@ qrcode "1.5.0" tslib "^2.5.2" -"@aws-amplify/ui@6.4.1": - version "6.4.1" - resolved "https://registry.npmjs.org/@aws-amplify/ui/-/ui-6.4.1.tgz" - integrity sha512-0rGGJjnd60gZNhjqDepk3VpCpzyJDE2+xevVg0iqM8APKpyQ9XRWisNLIvglQy7p/3CauXdw8U0NZVcu29Yhrw== +"@aws-amplify/ui@6.7.0", "@aws-amplify/ui@^6.6.6": + version "6.7.0" + resolved "https://registry.yarnpkg.com/@aws-amplify/ui/-/ui-6.7.0.tgz#f31da1515a25c2fac3d9e17c9638e619a988baf8" + integrity sha512-6hByYfFBQRjsFMoVGdCWMSdo7rwMgz6rxxdWV0xuHb4j3tsPEI9ZhRXG0Z1ivtQFAM3Uaz0D3hcg1kp6QFdCFg== dependencies: csstype "^3.1.1" lodash "4.17.21" From 8ec3737e56671dd07540cc0b73210cc7caf7c81e Mon Sep 17 00:00:00 2001 From: Erik Hanchett Date: Fri, 22 Nov 2024 15:46:59 -0800 Subject: [PATCH 5/9] Updated files --- src/components/Banner/Banner.tsx | 4 +- src/data/gen2Banner-urls.ts | 258 +------------------------------ 2 files changed, 3 insertions(+), 259 deletions(-) diff --git a/src/components/Banner/Banner.tsx b/src/components/Banner/Banner.tsx index c55bfc76d56..c1367cac40a 100644 --- a/src/components/Banner/Banner.tsx +++ b/src/components/Banner/Banner.tsx @@ -24,8 +24,8 @@ export const Banner: React.FC = ({ Amplify AI kit is now generally available - Create fullstack AI capable apps using TypeScript, with just a few - lines of code. + Create fullstack AI-powered apps with TypeScript, no prior + experience in cloud architecture or AI needed. diff --git a/src/data/gen2Banner-urls.ts b/src/data/gen2Banner-urls.ts index dd063f71710..5a9c1707021 100644 --- a/src/data/gen2Banner-urls.ts +++ b/src/data/gen2Banner-urls.ts @@ -1,260 +1,4 @@ /** * List of paths that the gen2 should display on */ -export const GEN2BANNER_URLS = [ - '/', - '/angular/', - '/javascript/', - '/nextjs/', - '/react/', - '/vue/', - '/react-native/', - '/javascript/how-amplify-works/', - '/angular/how-amplify-works/', - '/react/how-amplify-works/', - '/nextjs/how-amplify-works/', - '/vue/how-amplify-works/', - '/angular/start/', - '/javascript/start/', - '/nextjs/start/', - '/react/start/', - '/vue/start/', - '/react-native/start/', - '/javascript/build-a-backend/', - '/angular/build-a-backend/', - '/nextjs/build-a-backend/', - '/react/build-a-backend/', - '/vue/build-a-backend/', - '/react-native/build-a-backend/', - '/javascript/build-a-backend/graphqlapi/', - '/angular/build-a-backend/graphqlapi/', - '/react/build-a-backend/graphqlapi/', - '/nextjs/build-a-backend/graphqlapi/', - '/vue/build-a-backend/graphqlapi/', - '/javascript/build-a-backend/graphqlapi/connect-to-api/', - '/react/build-a-backend/graphqlapi/connect-to-api/', - '/angular/build-a-backend/graphqlapi/connect-to-api/', - '/vue/build-a-backend/graphqlapi/connect-to-api/', - '/nextjs/build-a-backend/graphqlapi/connect-to-api/', - '/javascript/build-a-backend/graphqlapi/connect-existing-data/', - '/react/build-a-backend/graphqlapi/connect-existing-data/', - '/angular/build-a-backend/graphqlapi/connect-existing-data/', - '/vue/build-a-backend/graphqlapi/connect-existing-data/', - '/nextjs/build-a-backend/graphqlapi/connect-existing-data/', - '/javascript/build-a-backend/graphqlapi/mutate-data/', - '/react/build-a-backend/graphqlapi/mutate-data/', - '/angular/build-a-backend/graphqlapi/mutate-data/', - '/vue/build-a-backend/graphqlapi/mutate-data/', - '/nextjs/build-a-backend/graphqlapi/mutate-data/', - '/javascript/build-a-backend/graphqlapi/query-data/', - '/react/build-a-backend/graphqlapi/query-data/', - '/angular/build-a-backend/graphqlapi/query-data/', - '/vue/build-a-backend/graphqlapi/query-data/', - '/nextjs/build-a-backend/graphqlapi/query-data/', - '/javascript/build-a-backend/graphqlapi/subscribe-data/', - '/react/build-a-backend/graphqlapi/subscribe-data/', - '/angular/build-a-backend/graphqlapi/subscribe-data/', - '/vue/build-a-backend/graphqlapi/subscribe-data/', - '/nextjs/build-a-backend/graphqlapi/subscribe-data/', - '/javascript/build-a-backend/graphqlapi/data-modeling/', - '/angular/build-a-backend/graphqlapi/data-modeling/', - '/react/build-a-backend/graphqlapi/data-modeling/', - '/nextjs/build-a-backend/graphqlapi/data-modeling/', - '/vue/build-a-backend/graphqlapi/data-modeling/', - '/javascript/build-a-backend/graphqlapi/customize-authorization-rules/', - '/react/build-a-backend/graphqlapi/customize-authorization-rules/', - '/angular/build-a-backend/graphqlapi/customize-authorization-rules/', - '/vue/build-a-backend/graphqlapi/customize-authorization-rules/', - '/nextjs/build-a-backend/graphqlapi/customize-authorization-rules/', - '/javascript/build-a-backend/graphqlapi/custom-business-logic/', - '/angular/build-a-backend/graphqlapi/custom-business-logic/', - '/react/build-a-backend/graphqlapi/custom-business-logic/', - '/nextjs/build-a-backend/graphqlapi/custom-business-logic/', - '/vue/build-a-backend/graphqlapi/custom-business-logic/', - '/javascript/build-a-backend/graphqlapi/modify-amplify-generated-resources/', - '/angular/build-a-backend/graphqlapi/modify-amplify-generated-resources/', - '/react/build-a-backend/graphqlapi/modify-amplify-generated-resources/', - '/nextjs/build-a-backend/graphqlapi/modify-amplify-generated-resources/', - '/vue/build-a-backend/graphqlapi/modify-amplify-generated-resources/', - '/javascript/build-a-backend/graphqlapi/best-practice/', - '/react/build-a-backend/graphqlapi/best-practice/', - '/angular/build-a-backend/graphqlapi/best-practice/', - '/vue/build-a-backend/graphqlapi/best-practice/', - '/nextjs/build-a-backend/graphqlapi/best-practice/', - '/javascript/build-a-backend/graphqlapi/best-practice/warehouse-management/', - '/angular/build-a-backend/graphqlapi/best-practice/warehouse-management/', - '/react/build-a-backend/graphqlapi/best-practice/warehouse-management/', - '/nextjs/build-a-backend/graphqlapi/best-practice/warehouse-management/', - '/vue/build-a-backend/graphqlapi/best-practice/warehouse-management/', - '/javascript/build-a-backend/graphqlapi/search-and-result-aggregations/', - '/react/build-a-backend/graphqlapi/search-and-result-aggregations/', - '/angular/build-a-backend/graphqlapi/search-and-result-aggregations/', - '/nextjs/build-a-backend/graphqlapi/search-and-result-aggregations/', - '/vue/build-a-backend/graphqlapi/search-and-result-aggregations/', - '/javascript/build-a-backend/graphqlapi/connect-machine-learning-services/', - '/angular/build-a-backend/graphqlapi/connect-machine-learning-services/', - '/react/build-a-backend/graphqlapi/connect-machine-learning-services/', - '/nextjs/build-a-backend/graphqlapi/connect-machine-learning-services/', - '/vue/build-a-backend/graphqlapi/connect-machine-learning-services/', - '/javascript/build-a-backend/graphqlapi/troubleshooting/', - '/react/build-a-backend/graphqlapi/troubleshooting/', - '/angular/build-a-backend/graphqlapi/troubleshooting/', - '/vue/build-a-backend/graphqlapi/troubleshooting/', - '/nextjs/build-a-backend/graphqlapi/troubleshooting/', - '/javascript/tools/cli/graphqlapi/directives-reference/', - '/angular/tools/cli/graphqlapi/directives-reference/', - '/react/tools/cli/graphqlapi/directives-reference/', - '/nextjs/tools/cli/graphqlapi/directives-reference/', - '/vue/tools/cli/graphqlapi/directives-reference/', - '/javascript/build-a-backend/auth/', - '/angular/build-a-backend/auth/', - '/react/build-a-backend/auth/', - '/nextjs/build-a-backend/auth/', - '/vue/build-a-backend/auth/', - '/javascript/build-a-backend/auth/set-up-auth/', - '/react/build-a-backend/auth/set-up-auth/', - '/angular/build-a-backend/auth/set-up-auth/', - '/vue/build-a-backend/auth/set-up-auth/', - '/nextjs/build-a-backend/auth/set-up-auth/', - '/javascript/build-a-backend/auth/enable-sign-up/', - '/react/build-a-backend/auth/enable-sign-up/', - '/angular/build-a-backend/auth/enable-sign-up/', - '/vue/build-a-backend/auth/enable-sign-up/', - '/nextjs/build-a-backend/auth/enable-sign-up/', - '/javascript/build-a-backend/auth/manage-user-session/', - '/react/build-a-backend/auth/manage-user-session/', - '/angular/build-a-backend/auth/manage-user-session/', - '/vue/build-a-backend/auth/manage-user-session/', - '/nextjs/build-a-backend/auth/manage-user-session/', - '/javascript/build-a-backend/auth/add-social-provider/', - '/react/build-a-backend/auth/add-social-provider/', - '/angular/build-a-backend/auth/add-social-provider/', - '/vue/build-a-backend/auth/add-social-provider/', - '/nextjs/build-a-backend/auth/add-social-provider/', - '/javascript/build-a-backend/auth/manage-user-profile/', - '/react/build-a-backend/auth/manage-user-profile/', - '/angular/build-a-backend/auth/manage-user-profile/', - '/vue/build-a-backend/auth/manage-user-profile/', - '/nextjs/build-a-backend/auth/manage-user-profile/', - '/javascript/build-a-backend/auth/password-management/', - '/react/build-a-backend/auth/password-management/', - '/angular/build-a-backend/auth/password-management/', - '/vue/build-a-backend/auth/password-management/', - '/nextjs/build-a-backend/auth/password-management/', - '/javascript/build-a-backend/auth/manage-mfa/', - '/react/build-a-backend/auth/manage-mfa/', - '/angular/build-a-backend/auth/manage-mfa/', - '/vue/build-a-backend/auth/manage-mfa/', - '/nextjs/build-a-backend/auth/manage-mfa/', - '/javascript/build-a-backend/auth/delete-user-account/', - '/react/build-a-backend/auth/delete-user-account/', - '/angular/build-a-backend/auth/delete-user-account/', - '/vue/build-a-backend/auth/delete-user-account/', - '/nextjs/build-a-backend/auth/delete-user-account/', - '/javascript/build-a-backend/server-side-rendering/nextjs/', - '/react/build-a-backend/server-side-rendering/nextjs/', - '/angular/build-a-backend/server-side-rendering/nextjs/', - '/vue/build-a-backend/server-side-rendering/nextjs/', - '/nextjs/build-a-backend/server-side-rendering/nextjs/', - '/javascript/build-a-backend/auth/auth-events/', - '/react/build-a-backend/auth/auth-events/', - '/angular/build-a-backend/auth/auth-events/', - '/vue/build-a-backend/auth/auth-events/', - '/nextjs/build-a-backend/auth/auth-events/', - '/javascript/build-a-backend/build-a-backend/auth/admin-actions/', - '/angular/build-a-backend/build-a-backend/auth/admin-actions/', - '/react/build-a-backend/build-a-backend/auth/admin-actions/', - '/nextjs/build-a-backend/build-a-backend/auth/admin-actions/', - '/vue/build-a-backend/build-a-backend/auth/admin-actions/', - '/javascript/build-a-backend/build-a-backend/auth/override-cognito/', - '/angular/build-a-backend/build-a-backend/auth/override-cognito/', - '/react/build-a-backend/build-a-backend/auth/override-cognito/', - '/nextjs/build-a-backend/build-a-backend/auth/override-cognito/', - '/vue/build-a-backend/build-a-backend/auth/override-cognito/', - '/react-native/build-a-backend/build-a-backend/auth/override-cognito/', - '/react-native/build-a-backend/graphqlapi/', - '/react-native/build-a-backend/graphqlapi/custom-business-logic/', - '/react-native/build-a-backend/graphqlapi/search-and-result-aggregations/', - '/react-native/build-a-backend/graphqlapi/connect-machine-learning-services/', - '/javascript/prev/start/project-setup/create-application/', - '/angular/prev/start/project-setup/create-application/', - '/nextjs/prev/start/project-setup/create-application/', - '/react/prev/start/project-setup/create-application/', - '/vue/prev/start/project-setup/create-application/', - '/javascript/prev/start/project-setup/prerequisites/', - '/angular/prev/start/project-setup/prerequisites/', - '/react/prev/start/project-setup/prerequisites/', - '/nextjs/prev/start/project-setup/prerequisites/', - '/vue/prev/start/project-setup/prerequisites/', - '/javascript/start/project-setup/create-application/', - '/angular/start/project-setup/create-application/', - '/nextjs/start/project-setup/create-application/', - '/react/start/project-setup/create-application/', - '/vue/start/project-setup/create-application/', - '/javascript/start/project-setup/prerequisites/', - '/angular/start/project-setup/prerequisites/', - '/nextjs/start/project-setup/prerequisites/', - '/react/start/project-setup/prerequisites/', - '/vue/start/project-setup/prerequisites/', - '/angular/start/getting-started/auth/', - '/react/start/getting-started/auth/', - '/vue/start/getting-started/auth/', - '/angular/start/getting-started/data-model/', - '/javascript/start/getting-started/data-model/', - '/nextjs/start/getting-started/data-model/', - '/react/start/getting-started/data-model/', - '/vue/start/getting-started/data-model/', - '/angular/start/getting-started/hosting/', - '/javascript/start/getting-started/hosting/', - '/nextjs/start/getting-started/hosting/', - '/react/start/getting-started/hosting/', - '/vue/start/getting-started/hosting/', - '/angular/start/getting-started/installation/', - '/javascript/start/getting-started/installation/', - '/nextjs/start/getting-started/installation/', - '/react/start/getting-started/installation/', - '/vue/start/getting-started/installation/', - '/angular/start/getting-started/nextsteps/', - '/javascript/start/getting-started/nextsteps/', - '/nextjs/start/getting-started/nextsteps/', - '/react/start/getting-started/nextsteps/', - '/vue/start/getting-started/nextsteps/', - '/angular/start/getting-started/setup/', - '/javascript/start/getting-started/setup/', - '/nextjs/start/getting-started/setup/', - '/react/start/getting-started/setup/', - '/vue/start/getting-started/setup/', - '/angular/start/getting-started/introduction/', - '/javascript/start/getting-started/introduction/', - '/nextjs/start/getting-started/introduction/', - '/react/start/getting-started/introduction/', - '/vue/start/getting-started/introduction/', - '/react-native/start/getting-started/auth/', - '/react-native/start/getting-started/data-model/', - '/react-native/start/getting-started/installation/', - '/react-native/start/getting-started/nextsteps/', - '/react-native/start/getting-started/setup/', - '/react-native/start/getting-started/introduction/', - '/android/build-ui/', - '/angular/build-ui/', - '/flutter/build-ui/', - '/react/build-ui/', - '/react-native/build-ui/', - '/swift/build-ui/', - '/vue/build-ui/', - '/javascript/deploy-and-host/', - '/angular/deploy-and-host/', - '/react/deploy-and-host/', - '/nextjs/deploy-and-host/', - '/vue/deploy-and-host/', - '/javascript/prev/tools/libraries/', - '/angular/prev/tools/libraries/', - '/nextjs/prev/tools/libraries/', - '/react/prev/tools/libraries/', - '/vue/prev/tools/libraries/', - '/javascript/tools/libraries/', - '/angular/tools/libraries/', - '/react/tools/libraries/', - '/nextjs/tools/libraries/', - '/vue/tools/libraries/' -]; +export const GEN2BANNER_URLS = ['/']; From 08d8ca62c104ed432b467016604817a5564989d8 Mon Sep 17 00:00:00 2001 From: Erik Hanchett Date: Fri, 22 Nov 2024 15:49:32 -0800 Subject: [PATCH 6/9] Updated yarn.lock --- yarn.lock | 41 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 97b7fc4decc..a97e5c13c88 100644 --- a/yarn.lock +++ b/yarn.lock @@ -359,7 +359,18 @@ "@aws-amplify/ui-react" "^6.6.0" "@aws-amplify/ui-react-core" "^3.0.30" -"@aws-amplify/ui-react-core@3.1.0", "@aws-amplify/ui-react-core@^3.0.30": +"@aws-amplify/ui-react-core@3.0.30", "@aws-amplify/ui-react-core@^3.0.30": + version "3.0.30" + resolved "https://registry.yarnpkg.com/@aws-amplify/ui-react-core/-/ui-react-core-3.0.30.tgz#e86346d5293bfa7f22aae9832fc0bef94ea64a83" + integrity sha512-3AaUSC1Mg+yr7TqHfp34QpP6ICjQl9wUR+x7KxsETc7m5tCv4ANGXOD7qaADCi3CEw2IChBFuVu4NFKsGJbjqQ== + dependencies: + "@aws-amplify/ui" "6.6.6" + "@xstate/react" "^3.2.2" + lodash "4.17.21" + react-hook-form "^7.43.5" + xstate "^4.33.6" + +"@aws-amplify/ui-react-core@3.1.0": version "3.1.0" resolved "https://registry.yarnpkg.com/@aws-amplify/ui-react-core/-/ui-react-core-3.1.0.tgz#236ecf10194a27dc57fc983c679ab1de19b8a00d" integrity sha512-Nime3qjJRQyfRDDA4bnAaFVzRfEBddZFP8NhVIb13z7Uw0XoPQzX+dXwuRW+Bjt2FJnlIUHh7Cfkt0m4PedRHQ== @@ -370,7 +381,22 @@ react-hook-form "^7.43.5" xstate "^4.33.6" -"@aws-amplify/ui-react@^6.6.0", "@aws-amplify/ui-react@^6.7.0": +"@aws-amplify/ui-react@^6.6.0": + version "6.6.0" + resolved "https://registry.yarnpkg.com/@aws-amplify/ui-react/-/ui-react-6.6.0.tgz#1d10f435286fcac5e07330e318a0e30c0c84de94" + integrity sha512-BHth+/CBZ8XE0IBpq+L/7mWbvGRIQxjtOmW50593hW7PvtaSXXDzPHZXRQ5nRhWs1anhxNWDiv4BKuiey6YpOw== + dependencies: + "@aws-amplify/ui" "6.6.6" + "@aws-amplify/ui-react-core" "3.0.30" + "@radix-ui/react-direction" "1.0.0" + "@radix-ui/react-dropdown-menu" "1.0.0" + "@radix-ui/react-slider" "1.0.0" + "@xstate/react" "^3.2.2" + lodash "4.17.21" + qrcode "1.5.0" + tslib "^2.5.2" + +"@aws-amplify/ui-react@^6.7.0": version "6.7.0" resolved "https://registry.yarnpkg.com/@aws-amplify/ui-react/-/ui-react-6.7.0.tgz#a3fc28980feee01f319448c360307a5ccc65c7f3" integrity sha512-3H97gz43+iaVNPqkQIiFj4Ko7zJLyMGtZScfNyt6PK4Ntuit5ZP6hc+Z7BtNsNEkfnAiGL1BiNOuD1IBfsnifw== @@ -385,7 +411,16 @@ qrcode "1.5.0" tslib "^2.5.2" -"@aws-amplify/ui@6.7.0", "@aws-amplify/ui@^6.6.6": +"@aws-amplify/ui@6.6.6", "@aws-amplify/ui@^6.6.6": + version "6.6.6" + resolved "https://registry.yarnpkg.com/@aws-amplify/ui/-/ui-6.6.6.tgz#adf39ea025ed2f35e46bb01323f8d73142b41f59" + integrity sha512-4fBMO5+saXaAgBwhYbQIgudVcK1B9oHuG3WizMpImcYUbB5aL4B6NhFtmSz3DBBqAeqrZHUuUV7gWibU5JxAGQ== + dependencies: + csstype "^3.1.1" + lodash "4.17.21" + tslib "^2.5.2" + +"@aws-amplify/ui@6.7.0": version "6.7.0" resolved "https://registry.yarnpkg.com/@aws-amplify/ui/-/ui-6.7.0.tgz#f31da1515a25c2fac3d9e17c9638e619a988baf8" integrity sha512-6hByYfFBQRjsFMoVGdCWMSdo7rwMgz6rxxdWV0xuHb4j3tsPEI9ZhRXG0Z1ivtQFAM3Uaz0D3hcg1kp6QFdCFg== From fe0f2e2eec6dd6c77d595bda77e537277385b071 Mon Sep 17 00:00:00 2001 From: Erik Hanchett Date: Fri, 22 Nov 2024 15:51:13 -0800 Subject: [PATCH 7/9] fixed package.json --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 92083486721..bb353d977c0 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,7 @@ "private": true, "dependencies": { "@aws-amplify/amplify-cli-core": "^4.3.9", - "@aws-amplify/ui-react": "^6.7.0", - "@aws-amplify/ui-react-ai": "^1.0.0", + "@aws-amplify/ui-react": "^6.3.1", "@docsearch/react": "3", "ajv": "^8.16.0", "aws-amplify": "^6.0.9", From 5ddd7e3ec91d75a29395afc1c0b9defb283ec802 Mon Sep 17 00:00:00 2001 From: Erik Hanchett Date: Tue, 10 Dec 2024 14:50:37 -0800 Subject: [PATCH 8/9] Updated based on review --- src/components/Layout/Layout.tsx | 3 +- src/data/gen2Banner-urls.ts | 4 -- src/directory/directory.d.ts | 2 +- yarn.lock | 76 +++++++------------------------- 4 files changed, 18 insertions(+), 67 deletions(-) delete mode 100644 src/data/gen2Banner-urls.ts diff --git a/src/components/Layout/Layout.tsx b/src/components/Layout/Layout.tsx index 8d3bd84b08f..018fc322e1d 100644 --- a/src/components/Layout/Layout.tsx +++ b/src/components/Layout/Layout.tsx @@ -21,7 +21,6 @@ import { PLATFORM_DISPLAY_NAMES, Platform } from '@/data/platforms'; -import { GEN2BANNER_URLS } from '@/data/gen2Banner-urls'; import { SpaceShip } from '@/components/SpaceShip'; import { LEFT_NAV_LINKS, RIGHT_NAV_LINKS } from '@/utils/globalnav'; import { LayoutProvider, LayoutHeader } from '@/components/Layout'; @@ -73,7 +72,7 @@ export const Layout = ({ const basePath = 'docs.amplify.aws'; const metaUrl = url ? url : basePath + asPathWithNoHash; const pathname = router.pathname; - const shouldShowGen2Banner = GEN2BANNER_URLS.includes(asPathWithNoHash); + const shouldShowGen2Banner = asPathWithNoHash === '/'; const isGen1 = asPathWithNoHash.split('/')[1] === 'gen1'; const isContributor = asPathWithNoHash.split('/')[1] === 'contribute'; const currentGlobalNavMenuItem = isContributor ? 'Contribute' : 'Docs'; diff --git a/src/data/gen2Banner-urls.ts b/src/data/gen2Banner-urls.ts deleted file mode 100644 index 5a9c1707021..00000000000 --- a/src/data/gen2Banner-urls.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * List of paths that the gen2 should display on - */ -export const GEN2BANNER_URLS = ['/']; diff --git a/src/directory/directory.d.ts b/src/directory/directory.d.ts index 763d1f8a8a2..ad0fd85e291 100644 --- a/src/directory/directory.d.ts +++ b/src/directory/directory.d.ts @@ -59,7 +59,7 @@ export type PageNode = { hideChildrenOnBase?: boolean; /** - * This flag indicates that the item is new and will display a pill + * This flag indicates that the item is new and will display a "new" badge */ isNew?: boolean; }; diff --git a/yarn.lock b/yarn.lock index a97e5c13c88..25fb27bfcfc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -350,44 +350,24 @@ fast-xml-parser "^4.4.1" tslib "^2.5.0" -"@aws-amplify/ui-react-ai@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@aws-amplify/ui-react-ai/-/ui-react-ai-1.0.0.tgz#db6dede6b42685f9c03293374a1aaf195de7f02f" - integrity sha512-Y+ezPjjdUajEjN+naWhaBn7TQ4nVEtB0EylGwI8YrLKHFQVJaEGBWvvw9mfiUl3krWv+utP+EhagTM8Zk9cMBg== - dependencies: - "@aws-amplify/ui" "^6.6.6" - "@aws-amplify/ui-react" "^6.6.0" - "@aws-amplify/ui-react-core" "^3.0.30" - -"@aws-amplify/ui-react-core@3.0.30", "@aws-amplify/ui-react-core@^3.0.30": - version "3.0.30" - resolved "https://registry.yarnpkg.com/@aws-amplify/ui-react-core/-/ui-react-core-3.0.30.tgz#e86346d5293bfa7f22aae9832fc0bef94ea64a83" - integrity sha512-3AaUSC1Mg+yr7TqHfp34QpP6ICjQl9wUR+x7KxsETc7m5tCv4ANGXOD7qaADCi3CEw2IChBFuVu4NFKsGJbjqQ== +"@aws-amplify/ui-react-core@3.0.22": + version "3.0.22" + resolved "https://registry.npmjs.org/@aws-amplify/ui-react-core/-/ui-react-core-3.0.22.tgz" + integrity sha512-uL5jspqvTZhpqH1inPV3ifvrzIVgIIriXPgjz4BaceDm+1X03Hc3tfq5TiUKW8PdpuWF6riXXBP3MEFsk29OGw== dependencies: - "@aws-amplify/ui" "6.6.6" + "@aws-amplify/ui" "6.4.1" "@xstate/react" "^3.2.2" lodash "4.17.21" react-hook-form "^7.43.5" xstate "^4.33.6" -"@aws-amplify/ui-react-core@3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@aws-amplify/ui-react-core/-/ui-react-core-3.1.0.tgz#236ecf10194a27dc57fc983c679ab1de19b8a00d" - integrity sha512-Nime3qjJRQyfRDDA4bnAaFVzRfEBddZFP8NhVIb13z7Uw0XoPQzX+dXwuRW+Bjt2FJnlIUHh7Cfkt0m4PedRHQ== +"@aws-amplify/ui-react@^6.3.1": + version "6.3.1" + resolved "https://registry.npmjs.org/@aws-amplify/ui-react/-/ui-react-6.3.1.tgz" + integrity sha512-n/wTjMYYuAhpgpuQ4o+9+IgvNsdjGqbfaA4bAXE7b1apIOfM8HTaO2zant85x+geDl7rbaa1y/z62T4H9AksMQ== dependencies: - "@aws-amplify/ui" "6.7.0" - "@xstate/react" "^3.2.2" - lodash "4.17.21" - react-hook-form "^7.43.5" - xstate "^4.33.6" - -"@aws-amplify/ui-react@^6.6.0": - version "6.6.0" - resolved "https://registry.yarnpkg.com/@aws-amplify/ui-react/-/ui-react-6.6.0.tgz#1d10f435286fcac5e07330e318a0e30c0c84de94" - integrity sha512-BHth+/CBZ8XE0IBpq+L/7mWbvGRIQxjtOmW50593hW7PvtaSXXDzPHZXRQ5nRhWs1anhxNWDiv4BKuiey6YpOw== - dependencies: - "@aws-amplify/ui" "6.6.6" - "@aws-amplify/ui-react-core" "3.0.30" + "@aws-amplify/ui" "6.4.1" + "@aws-amplify/ui-react-core" "3.0.22" "@radix-ui/react-direction" "1.0.0" "@radix-ui/react-dropdown-menu" "1.0.0" "@radix-ui/react-slider" "1.0.0" @@ -396,34 +376,10 @@ qrcode "1.5.0" tslib "^2.5.2" -"@aws-amplify/ui-react@^6.7.0": - version "6.7.0" - resolved "https://registry.yarnpkg.com/@aws-amplify/ui-react/-/ui-react-6.7.0.tgz#a3fc28980feee01f319448c360307a5ccc65c7f3" - integrity sha512-3H97gz43+iaVNPqkQIiFj4Ko7zJLyMGtZScfNyt6PK4Ntuit5ZP6hc+Z7BtNsNEkfnAiGL1BiNOuD1IBfsnifw== - dependencies: - "@aws-amplify/ui" "6.7.0" - "@aws-amplify/ui-react-core" "3.1.0" - "@radix-ui/react-direction" "1.0.0" - "@radix-ui/react-dropdown-menu" "1.0.0" - "@radix-ui/react-slider" "1.0.0" - "@xstate/react" "^3.2.2" - lodash "4.17.21" - qrcode "1.5.0" - tslib "^2.5.2" - -"@aws-amplify/ui@6.6.6", "@aws-amplify/ui@^6.6.6": - version "6.6.6" - resolved "https://registry.yarnpkg.com/@aws-amplify/ui/-/ui-6.6.6.tgz#adf39ea025ed2f35e46bb01323f8d73142b41f59" - integrity sha512-4fBMO5+saXaAgBwhYbQIgudVcK1B9oHuG3WizMpImcYUbB5aL4B6NhFtmSz3DBBqAeqrZHUuUV7gWibU5JxAGQ== - dependencies: - csstype "^3.1.1" - lodash "4.17.21" - tslib "^2.5.2" - -"@aws-amplify/ui@6.7.0": - version "6.7.0" - resolved "https://registry.yarnpkg.com/@aws-amplify/ui/-/ui-6.7.0.tgz#f31da1515a25c2fac3d9e17c9638e619a988baf8" - integrity sha512-6hByYfFBQRjsFMoVGdCWMSdo7rwMgz6rxxdWV0xuHb4j3tsPEI9ZhRXG0Z1ivtQFAM3Uaz0D3hcg1kp6QFdCFg== +"@aws-amplify/ui@6.4.1": + version "6.4.1" + resolved "https://registry.npmjs.org/@aws-amplify/ui/-/ui-6.4.1.tgz" + integrity sha512-0rGGJjnd60gZNhjqDepk3VpCpzyJDE2+xevVg0iqM8APKpyQ9XRWisNLIvglQy7p/3CauXdw8U0NZVcu29Yhrw== dependencies: csstype "^3.1.1" lodash "4.17.21" @@ -4618,7 +4574,7 @@ cross-env@^7.0.3: dependencies: cross-spawn "^7.0.1" -cross-spawn@^6.0.0, cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3, cross-spawn@^7.0.5: +cross-spawn@^6.0.0, "cross-spawn@^6.0.6 || ^7.0.5", cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.6" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== From 621c6f6fa18b899da461f878e3d204301d0e3719 Mon Sep 17 00:00:00 2001 From: Erik Hanchett Date: Tue, 10 Dec 2024 15:50:16 -0800 Subject: [PATCH 9/9] Updated names based on code review --- mdx-components.tsx | 4 ++-- .../{Banner/Banner.tsx => AIBanner/AIBanner.tsx} | 12 +++--------- .../__tests__/AIBanner.test.tsx} | 8 ++++---- src/components/AIBanner/index.tsx | 1 + src/components/Banner/index.tsx | 1 - src/components/Layout/Layout.tsx | 6 +++--- 6 files changed, 13 insertions(+), 19 deletions(-) rename src/components/{Banner/Banner.tsx => AIBanner/AIBanner.tsx} (87%) rename src/components/{Banner/__tests__/Banner.test.tsx => AIBanner/__tests__/AIBanner.test.tsx} (64%) create mode 100644 src/components/AIBanner/index.tsx delete mode 100644 src/components/Banner/index.tsx diff --git a/mdx-components.tsx b/mdx-components.tsx index c5e14e2528e..7ce3e403259 100644 --- a/mdx-components.tsx +++ b/mdx-components.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import type { MDXComponents } from 'mdx/types'; import ExportedImage from 'next-image-export-optimizer'; -import { Banner } from './src/components/Banner'; +import { AIBanner } from './src/components/AIBanner'; import InlineFilter from './src/components/InlineFilter'; import { YoutubeEmbed } from './src/components/YoutubeEmbed'; import { Accordion } from './src/components/Accordion'; @@ -65,7 +65,7 @@ export function useMDXComponents(components: MDXComponents): MDXComponents { InlineFilter, MigrationAlert, YoutubeEmbed, - Banner, + AIBanner, Overview, ExternalLink, ExternalLinkButton, diff --git a/src/components/Banner/Banner.tsx b/src/components/AIBanner/AIBanner.tsx similarity index 87% rename from src/components/Banner/Banner.tsx rename to src/components/AIBanner/AIBanner.tsx index c1367cac40a..fd4db18e93a 100644 --- a/src/components/Banner/Banner.tsx +++ b/src/components/AIBanner/AIBanner.tsx @@ -2,13 +2,8 @@ import { Flex, Message, IconsProvider, Text } from '@aws-amplify/ui-react'; import { IconStar, IconChevron } from '../Icons'; import { Button } from '@aws-amplify/ui-react'; -interface BannerProps { - url?: string; -} - -export const Banner: React.FC = ({ - url = '/react/ai/set-up-ai/' -}) => { +export const AIBanner: React.FC = () => { + const URL = '/react/ai/set-up-ai/'; return ( = ({