Skip to content

Commit da8b135

Browse files
author
katiegoines
committed
Merge branch 'next-release/main' into next-release/redirects
2 parents d316b1a + 21c9165 commit da8b135

File tree

333 files changed

+5585
-2530
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

333 files changed

+5585
-2530
lines changed

cspell.json

+14-3
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@
466466
"CSRF",
467467
"css",
468468
"Ctrl-c",
469+
"customauth",
469470
"CUSTOM_AUTH",
470471
"customerEmail",
471472
"customizable",
@@ -1536,14 +1537,24 @@
15361537
"autobranch",
15371538
"gitflow",
15381539
"SIWA",
1539-
"hotswap"
1540+
"hotswap",
1541+
"clijson",
1542+
"parametersjson"
1543+
],
1544+
"flagWords": [
1545+
"hte",
1546+
"full-stack",
1547+
"Full-stack",
1548+
"Full-Stack",
1549+
"sudo"
15401550
],
1541-
"flagWords": ["hte", "full-stack", "Full-stack", "Full-Stack", "sudo"],
15421551
"patterns": [
15431552
{
15441553
"name": "youtube-embed-ids",
15451554
"pattern": "/embedId=\".*\" /"
15461555
}
15471556
],
1548-
"ignoreRegExpList": ["youtube-embed-ids"]
1557+
"ignoreRegExpList": [
1558+
"youtube-embed-ids"
1559+
]
15491560
}

public/assets/classic-og.png

96.2 KB
Loading

public/assets/gen2-og.png

95.5 KB
Loading
274 KB
Loading

public/images/gen-ai/claude.png

29.2 KB
Loading

public/images/gen-ai/login-form.png

62.9 KB
Loading

src/components/CliCommands/Command.tsx

+31-15
Original file line numberDiff line numberDiff line change
@@ -15,33 +15,49 @@ export function Command({
1515
<Flex className="commands-list__command">
1616
<CommandHeading>{name}</CommandHeading>
1717
<Text>{description}</Text>
18+
1819
<MDXCode language="terminal" codeString={usage} showLineNumbers={false} />
20+
1921
{flags && flags.length > 0 && (
2022
<Flex className="commands-list__command__flags">
21-
{flags.map((flag: CliCommandFlag) => (
22-
<Fragment key={`${name}-${flag.short}`}>
23-
<code className="commands-list__command__flags__code">
24-
{flag.short && <span>-{flag.short}|</span>}
25-
<span>--{flag.long}</span>
26-
</code>
27-
<Text>{flag.description}</Text>
28-
</Fragment>
29-
))}
23+
<table>
24+
<thead>
25+
<tr>
26+
<th>Flag</th>
27+
<th>Description</th>
28+
</tr>
29+
</thead>
30+
<tbody>
31+
{flags.map((flag: CliCommandFlag) => (
32+
<tr key={`${name}-${flag.short}`}>
33+
<td>
34+
<code>
35+
{flag.short && <span>-{flag.short}|</span>}
36+
<span>--{flag.long}</span>
37+
</code>
38+
</td>
39+
<td>{flag.description}</td>
40+
</tr>
41+
))}
42+
</tbody>
43+
</table>
3044
</Flex>
3145
)}
3246
{subCommands && subCommands.length > 0 && (
33-
<Flex className="commands-list__command__subcommands">
47+
<Flex
48+
className="commands-list__command__subcommands"
49+
alignItems="flex-start"
50+
gap="small"
51+
>
3452
{subCommands.map((subCommand) => (
3553
<Fragment key={`${name}-${subCommand.name}`}>
3654
<SubCommandHeading parentCommand={name}>
3755
{subCommand.name}
3856
</SubCommandHeading>
3957
<Text>{subCommand.description}</Text>
40-
<MDXCode
41-
language="terminal"
42-
codeString={`amplify ${name} ${subCommand.name}`}
43-
showLineNumbers={false}
44-
/>
58+
<code>
59+
amplify {name} {subCommand.name}
60+
</code>
4561
</Fragment>
4662
))}
4763
</Flex>

src/components/CliCommands/CommandHeading.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export function SubCommandHeading({
2929
return (
3030
<Heading
3131
className="commands-list__command__subcommands__heading"
32+
marginTop="medium"
3233
id={value}
3334
level={3}
3435
>

src/components/FeatureLists/PlatformFeatureList.tsx

+12-3
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@ import {
77

88
import { Flex } from '@aws-amplify/ui-react';
99
import featureListData from '@/constants/feature-lists-data';
10+
import { DEFAULT_PLATFORM } from '@/data/platforms';
1011
import type { Platform } from '@/data/platforms';
1112
import { PLATFORM_DISPLAY_NAMES } from '@/data/platforms';
13+
import { usePathname } from 'next/navigation';
1214
interface PlatformFeatureListProps {
13-
platform: Platform;
15+
platform: Platform | typeof DEFAULT_PLATFORM;
1416
}
1517
const PlatformFeatureList: React.FC<PlatformFeatureListProps> = ({
1618
platform
1719
}) => {
20+
const pathname = usePathname();
1821
const categories = featureListData[platform].categories;
1922

2023
return categories.length > 0 ? (
@@ -25,8 +28,14 @@ const PlatformFeatureList: React.FC<PlatformFeatureListProps> = ({
2528
{category.items.map((categoryItem, index) => (
2629
<FeatureItem
2730
linkText={categoryItem.linkText}
28-
href={categoryItem.link}
29-
isExternal={true}
31+
href={
32+
platform === DEFAULT_PLATFORM &&
33+
pathname === '/' &&
34+
!categoryItem.isExternal
35+
? `${platform}/${categoryItem.link}`
36+
: categoryItem.link
37+
}
38+
isExternal={categoryItem.isExternal}
3039
key={index}
3140
>
3241
{categoryItem.content}

src/components/Layout/Layout.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export const Layout = ({
190190
<meta property="og:url" content={metaUrl} key="og:url" />
191191
<meta
192192
property="og:image"
193-
content="https://docs.amplify.aws/assets/ogp.jpg"
193+
content={`https://docs.amplify.aws/assets/${isGen2 ? 'gen2' : 'classic'}-og.png`}
194194
key="og:image"
195195
/>
196196
<meta property="description" content={description} key="description" />
@@ -203,7 +203,7 @@ export const Layout = ({
203203
/>
204204
<meta
205205
property="twitter:image"
206-
content="https://docs.amplify.aws/assets/ogp.jpg"
206+
content={`https://docs.amplify.aws/assets/${isGen2 ? 'gen2' : 'classic'}-og.png`}
207207
key="twitter:image"
208208
/>
209209
</Head>
@@ -233,7 +233,7 @@ export const Layout = ({
233233
Menu
234234
</Button>
235235

236-
<View
236+
{/* <View
237237
className={classNames(
238238
'layout-search__search',
239239
`layout-search__search--${pageType}`,
@@ -254,7 +254,7 @@ export const Layout = ({
254254
}}
255255
/>
256256
</View>
257-
</View>
257+
</View> */}
258258
</Flex>
259259
<View
260260
className={classNames('layout-sidebar', {

src/components/Menu/Menu.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ type MenuProps = {
1010
path: string;
1111
};
1212

13-
const invalidChildren = ['/[platform]/prev'];
13+
const invalidChildren = ['/[platform]/prev', '/[platform]/tools/cli-legacy', '/[platform]/sdk'];
1414

1515
export function Menu({
1616
currentPlatform,

src/components/Menu/MenuItem.tsx

+13-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { ReactElement, useContext, useEffect, useState } from 'react';
33
import { Link as AmplifyUILink, Flex } from '@aws-amplify/ui-react';
44
import { IconExternalLink, IconChevron } from '@/components/Icons';
55
import Link from 'next/link';
6-
import { Platform } from '@/data/platforms';
6+
import { JS_PLATFORMS, Platform } from '@/data/platforms';
77
import { LayoutContext } from '@/components/Layout';
88
import { PageNode } from 'src/directory/directory';
99

@@ -97,6 +97,14 @@ export function MenuItem({
9797

9898
const currentStyle = current ? 'menu__list-item__link--current' : '';
9999

100+
let hideAPIResources = false;
101+
102+
if (JS_PLATFORMS.includes(currentPlatform)
103+
&& !usePathWithoutHash().includes('/prev/')
104+
&& pageNode.route == 'https://aws-amplify.github.io/amplify-js/api/') {
105+
hideAPIResources = true
106+
}
107+
100108
let listItemStyle = '';
101109
let listItemLinkStyle = '';
102110
let listItemLinkInnerStyle = '';
@@ -121,7 +129,10 @@ export function MenuItem({
121129
return <></>;
122130
}
123131

124-
if (pageNode.isExternal) {
132+
if (hideAPIResources) {
133+
return <></>;
134+
} else if (pageNode.isExternal &&((currentPlatform && pageNode?.platforms?.includes(currentPlatform)) ||
135+
!pageNode.platforms)) {
125136
return (
126137
<li key={pageNode.route} className="menu__list-item">
127138
<AmplifyUILink

0 commit comments

Comments
 (0)