Skip to content

Commit b6368aa

Browse files
dbanksdesignlawmichaJordan-NelsonjosefaidtHuiSF
authored
Updating next-release/main branch (#7862)
* Update versions.ts Android Amplify V2.19.1 (#7767) * chore(flutter): update android section of Amplify Flutter getting started guide (#7760) * chore: update android section of Flutter getting started guide * chore: update gen 2 flutter platform setup * chore: add info to enable network permissions on android * chore: update H3 headers to H2 * chore: update min Xcode version to 15 * chore: update xcode verison to 15.0 for macOS * chore: update ios and macos setup to be consistent with Android, add callout for missing podfile * update mobile quickstarts with link to fullstack branch deployment guide #7741 (#7746) * chore: add serverComponentsExternalPackages callout for Next.js (#7757) * chore: add serverComponentsExternalPackages callout for Next.js * Apply suggestions from code review Co-authored-by: Jim Blanchard <[email protected]> * Apply suggestions from code review * Update src/pages/gen1/[platform]/build-a-backend/server-side-rendering/nextjs/index.mdx Co-authored-by: Jim Blanchard <[email protected]> * Update src/pages/gen1/[platform]/build-a-backend/server-side-rendering/nextjs/index.mdx Co-authored-by: josef <[email protected]> * Update src/pages/[platform]/build-a-backend/server-side-rendering/index.mdx Co-authored-by: josef <[email protected]> --------- Co-authored-by: Jim Blanchard <[email protected]> Co-authored-by: josef <[email protected]> * add warning callout to gen1 backend-config (#7773) * Revert "chore: add region to scrollable table (#7744)" (#7784) This reverts commit 67496c5. * chore: change outputs to amplifyConfig in flutter gen 2 docs (#7764) * chore: change outputs to amplifyConfig in flutter gen 2 docs * chore: change amplifyconfiguration.dart import to amplify_outputs.dart * chore: remove --outputs-version 0 and downgrade config file callout * chore: remove --outputs-version 0 from snippets * chore: remove gen 2 config conversion callout * chore: remove amplifyconfiguration.dart references from gen 2 * fix: heading order on gen1/prev subscribe-data page (#7790) * add warning regarding subscription and mutation redaction of relational fields (#7768) * add warning regarding subscription and mutation redaction of relational fields * replace authn with authz in warning * chore(api): Callout for field redaction on Swift Android relational models * Update src/pages/gen1/[platform]/build-a-backend/graphqlapi/relational-models/index.mdx * add feature flag to warning for gen 1 * Fix heading order in fragments affecting this page * add protected redaction message components * Add tests for redaction message Gen 1 and Gen 2 components * add snapshots for redaction Gen 1 and Gen 2 component tests * Adds ProtectedRedactionMessage components for Gen 1 and Gen2 * Render ProtectedRedactionGen1Message component on Gen 1 realtime page * Render ProtectedRedactionGen1Message component on Gen 2 data modeling page * Render ProtectedRedactionGen2Message component on Gen 2 realtime page * Render ProtectedRedactionGen1Message component on Gen 1 data modeling page * Render ProtectedRedactionGen1Message component on Gen 1 V5 realtime page * add subscriptionsInheritPrimaryAuth as a feature flag * correct version for subscriptionsInheritPrimaryAuth * remove commented code * fix heading order --------- Co-authored-by: Michael Law <[email protected]> Co-authored-by: Heather <[email protected]> Co-authored-by: katiegoines <[email protected]> * fix subscriptionsInheritPrimaryAuth default value (#7795) * change overview card titles from p to h2 (#7780) Co-authored-by: katiegoines <[email protected]> * remove conditional in aria-describedby={codeId} for MDXCopyCodeButton (#7779) Co-authored-by: katiegoines <[email protected]> * Update index.mdx to fix typo (#7798) Removed mention of create-vite-app * add workflow to validate redirects (#7726) * add workflow to validate redirects * change filename * removing testing errors * finding all invalid redirects * running validation to catch all issues * remove unneeded code --------- Co-authored-by: katiegoines <[email protected]> * update set up function guide with data example (#7759) * update set up function guide with data example * add mobile snippets * remove checkboxes and circle (#7783) * fix: heading order (#7803) * restore autoSignIn section for SignIn page, and Switching Authentication Flows page for js categories (#7769) Co-authored-by: JoonWon Choi <[email protected]> * replace `amplify` to `ampx` (#7804) * feat(js): list api subpathStrategy parameter (#7794) * feat(js): list api subpathStrategy parameter * fix: adds style guide suggestions * fix: adds result structure * fix: tried to delineate between recursive exploration of entire path and subpathStrategy option * Update src/pages/[platform]/build-a-backend/storage/list-files/index.mdx Co-authored-by: Harshita Daddala <[email protected]> * Update src/pages/[platform]/build-a-backend/storage/list-files/index.mdx Co-authored-by: Harshita Daddala <[email protected]> * Update src/pages/[platform]/build-a-backend/storage/list-files/index.mdx Co-authored-by: Harshita Daddala <[email protected]> * Update src/pages/[platform]/build-a-backend/storage/list-files/index.mdx Co-authored-by: Harshita Daddala <[email protected]> * Update src/pages/[platform]/build-a-backend/storage/list-files/index.mdx Co-authored-by: ashika112 <[email protected]> * Update src/pages/[platform]/build-a-backend/storage/list-files/index.mdx Co-authored-by: josef <[email protected]> * comments and prettier * undid prettier table change * Update src/pages/[platform]/build-a-backend/storage/list-files/index.mdx Co-authored-by: josef <[email protected]> --------- Co-authored-by: haverchuck <[email protected]> Co-authored-by: Harshita Daddala <[email protected]> Co-authored-by: ashika112 <[email protected]> Co-authored-by: josef <[email protected]> * chore: update domains for proxy (#7808) * fix: typo on client code generation page (#7809) * Fix anchor link, add some scroll margin to h4 headings (#7810) * chore(deps): bump @aws-amplify/amplify-cli-core from 4.3.8 to 4.3.9 (#7788) Bumps [@aws-amplify/amplify-cli-core](https://github.com/aws-amplify/amplify-cli/tree/HEAD/packages/amplify-cli-core) from 4.3.8 to 4.3.9. - [Release notes](https://github.com/aws-amplify/amplify-cli/releases) - [Changelog](https://github.com/aws-amplify/amplify-cli/blob/dev/packages/amplify-cli-core/CHANGELOG.md) - [Commits](https://github.com/aws-amplify/amplify-cli/commits/@aws-amplify/[email protected]/packages/amplify-cli-core) --- updated-dependencies: - dependency-name: "@aws-amplify/amplify-cli-core" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump aws-actions/aws-secretsmanager-get-secrets (#7792) Bumps [aws-actions/aws-secretsmanager-get-secrets](https://github.com/aws-actions/aws-secretsmanager-get-secrets) from 2.0.3 to 2.0.5. - [Release notes](https://github.com/aws-actions/aws-secretsmanager-get-secrets/releases) - [Commits](aws-actions/aws-secretsmanager-get-secrets@ff26a0a...98c2d6b) --- updated-dependencies: - dependency-name: aws-actions/aws-secretsmanager-get-secrets dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * storage(android): update getURL options (#7736) * storage(android): update getURL options * add more code examples * Add Gen 2 SDL docs (#7793) * add gen 2 SDL docs * Update src/pages/[platform]/build-a-backend/data/data-modeling/index.mdx Co-authored-by: josef <[email protected]> * Update src/pages/[platform]/build-a-backend/data/data-modeling/index.mdx Co-authored-by: josef <[email protected]> * move support callout to migration page * update doc to state ddb-backed sources only * made updates to the sdl explanation --------- Co-authored-by: josef <[email protected]> Co-authored-by: Nikhil Swaminathan <[email protected]> * Cbonif/add-non-model-auth-section (#7817) * add callout for sql custom query/mutation return types with example * Merge branch 'main' of github.com:aws-amplify/docs * revert sql page change * revert change on gen 1 sql page * add auth permissions (#7796) * add auth permissions * fix accessibility error * fix heading * callout for mysql/postgres custom query return types (#7813) * add callout for sql custom query/mutation return types with example * add gen 1 example * shorten gen 2 example a bit * remove line breaks from gen 1 example * remove line break * Update index.mdx Co-authored-by: josef <[email protected]> * Update src/pages/gen1/[platform]/build-a-backend/graphqlapi/connect-api-to-existing-database/index.mdx Co-authored-by: josef <[email protected]> * remove ts import from bottom of page --------- Co-authored-by: josef <[email protected]> * Clarify Manual Loading of Environment Variables in Sandbox Environments (#7822) * Clarify Manual Loading of Environment Variables in Sandbox Environments * Update src/pages/[platform]/deploy-and-host/fullstack-branching/secrets-and-vars/index.mdx Co-authored-by: josef <[email protected]> --------- Co-authored-by: josef <[email protected]> * fix data env name in function example, ref #7825 (#7826) * Update app id reference for CI/CD deployments (#7832) * fix(swift): updated concurrency in quickstart (#7828) * chore(android): Update versions.ts - Android SDK 2.76.0(#7833) * feat(Swift): Adding SubpathStrategy documentation for Storage.List (#7831) * Add Gen1 banner to getting started pages (#7839) * add Gen1 Banner to all gen 1 getting started pages * update link location and add banner to how amplify works --------- Co-authored-by: Jacob Logan <[email protected]> * remove temporary disabling of copy-code button (#7835) Co-authored-by: katiegoines <[email protected]> * add streaming function logs docs (#7841) * add streaming function logs docs * Update src/pages/[platform]/build-a-backend/functions/streaming-logs/index.mdx Co-authored-by: Amplifiyer <[email protected]> * rm multiline log callout, added note for chaining --out-file * clarify log output in terminal where sandbox is running --------- Co-authored-by: Amplifiyer <[email protected]> * a11y-when closing accordion from bottom, focus back on summary element (#7837) * when closing accordion from bottom, focus back on summary element * add test * remove extra spaces --------- Co-authored-by: katiegoines <[email protected]> * a11y-remove alt text for decorative image (#7836) * remove alt text for decorative image * mark images as decorative --------- Co-authored-by: katiegoines <[email protected]> * Update index.mdx (#7840) * put feedback responses in aria-live (#7844) Co-authored-by: katiegoines <[email protected]> * when clicking on toc entry, focus on respective heading in content (#7845) Co-authored-by: katiegoines <[email protected]> * add scheduling functions docs (#7842) * add scheduling functions docs * fix path * Update src/pages/[platform]/build-a-backend/functions/scheduling-functions/index.mdx * add docs for auth custom attribute support (#7846) * add docs for auth custom attribute support * Update src/pages/[platform]/build-a-backend/auth/concepts/user-attributes/index.mdx * correct heading order * fix broken links * add mobile platform to concepts page for user attributes * remove studio reference in Amplify Gen 2 docs (#7860) * storage(android): update storage list with delimiter support (#7830) * feat(Swift): Adding SubpathStrategy documentation for Storage.List * storage(android): update storage list with delimiter support * feat(Swift): Adding SubpathStrategy documentation for Storage.List * chore: resolve review comments * chore: update per review comments * chore: resolve review comments * fix exclude subpath sample --------- Co-authored-by: Sebastian Villena <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Michael Law <[email protected]> Co-authored-by: Jordan Nelson <[email protected]> Co-authored-by: josef <[email protected]> Co-authored-by: Hui Zhao <[email protected]> Co-authored-by: Jim Blanchard <[email protected]> Co-authored-by: Heather Buchel <[email protected]> Co-authored-by: Kha Truong <[email protected]> Co-authored-by: Chris Bonifacio <[email protected]> Co-authored-by: katiegoines <[email protected]> Co-authored-by: Dane Pilcher <[email protected]> Co-authored-by: Katie Goines <[email protected]> Co-authored-by: Nikhil Swaminathan <[email protected]> Co-authored-by: Kethan sai <[email protected]> Co-authored-by: Joon Choi <[email protected]> Co-authored-by: JoonWon Choi <[email protected]> Co-authored-by: MURAKAMI Masahiko <[email protected]> Co-authored-by: Dustin Noyes <[email protected]> Co-authored-by: haverchuck <[email protected]> Co-authored-by: Harshita Daddala <[email protected]> Co-authored-by: ashika112 <[email protected]> Co-authored-by: MJ Zhang <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tuan Pham <[email protected]> Co-authored-by: Nikhil Swaminathan <[email protected]> Co-authored-by: Kazuki Hamasaki <[email protected]> Co-authored-by: Jay Raval <[email protected]> Co-authored-by: Sébastien Stormacq <[email protected]> Co-authored-by: Sebastian Villena <[email protected]> Co-authored-by: jacoblogan <[email protected]> Co-authored-by: Jacob Logan <[email protected]> Co-authored-by: Amplifiyer <[email protected]> Co-authored-by: taka <[email protected]>
1 parent 5c0932e commit b6368aa

File tree

82 files changed

+2763
-390
lines changed

Some content is hidden

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

82 files changed

+2763
-390
lines changed

.github/workflows/check_for_broken_links.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
role-to-assume: arn:aws:iam::464149486631:role/github_action_read_slack_webhook_url
3333
aws-region: us-west-2
3434
- name: Read secrets from AWS Secrets Manager into environment variables
35-
uses: aws-actions/aws-secretsmanager-get-secrets@ff26a0aa6bd4dd5e51326b5afb3f5f6874c958c7 # v2.0.3
35+
uses: aws-actions/aws-secretsmanager-get-secrets@98c2d6bf1dd67c2575fa2bb14294aa64103d426c # v2.0.5
3636
with:
3737
secret-ids: |
3838
SLACK_WEBHOOK_URL
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
module.exports = {
2+
invalidRedirects: () => {
3+
const Ajv = require('ajv');
4+
const redirects = require('../../../redirects.json');
5+
const ajv = new Ajv();
6+
7+
const schema = {
8+
type: 'array',
9+
items: {
10+
type: 'object',
11+
required: ['source', 'target', 'status'],
12+
properties: {
13+
source: {
14+
description: 'The address the user requested.',
15+
type: 'string',
16+
pattern: '^/'
17+
},
18+
target: {
19+
description:
20+
'The address that actually serves the content that the user sees',
21+
type: 'string',
22+
pattern: '^[(https)(/)]'
23+
},
24+
status: {
25+
description:
26+
'Types include a permanent redirect (301), a temporary redirect (302), a rewrite (200), or not found (404).',
27+
type: 'string',
28+
pattern: '^[0-5-]+$'
29+
}
30+
}
31+
}
32+
};
33+
34+
const errors = [];
35+
const validate = ajv.compile(schema);
36+
37+
const validateEntries = (redirects) => {
38+
const valid = validate(redirects);
39+
40+
if (!valid) {
41+
const error = validate.errors[0];
42+
const invalidEntry =
43+
JSON.stringify(redirects[error.instancePath.slice(1, -7)]);
44+
const loc = error.schemaPath.slice(error.schemaPath.indexOf('properties') + 11, -8);
45+
const errorMessage = '\n\n' + 'INVALID ENTRY: Please correct the error in the "' + loc +'" property of the following entry: \n' + invalidEntry + '\n' + 'ERROR MESSAGE: ' + error.message;
46+
errors.push(errorMessage);
47+
48+
validateEntries(redirects.splice(parseInt(error.instancePath.slice(1, -7)) + 1));
49+
50+
}
51+
}
52+
validateEntries(redirects);
53+
54+
return errors;
55+
}
56+
}
57+
58+
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Validate Redirects
2+
on:
3+
pull_request:
4+
branches: [main]
5+
types: [opened, synchronize]
6+
env:
7+
BUILD_DIR: 'client/www/next-build'
8+
permissions:
9+
contents: read
10+
jobs:
11+
ValidateRedirects:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
16+
- name: Setup Node.js 20.x
17+
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
18+
with:
19+
node-version: 20.x
20+
- name: Install Dependencies
21+
run: yarn
22+
- name: Validate redirects
23+
id: redirects
24+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
25+
with:
26+
result-encoding: string
27+
script: |
28+
const { invalidRedirects } = require('./.github/workflows/scripts/validate-redirects.js');
29+
return await invalidRedirects();
30+
- name: Fail if any invalid redirects have been found
31+
if: ${{ steps.redirects.outputs.result }}
32+
run: exit 1 && echo ${{ steps.redirects.outputs.result }}

cspell.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,10 +532,12 @@
532532
"Didfinishlaunchingwithoptions",
533533
"displayMode",
534534
"displayOrder",
535+
"dists",
535536
"DocSet",
536537
"DocSets",
537538
"Donef",
538539
"Dont",
540+
"dotenvx",
539541
"downcasting",
540542
"dropdown",
541543
"dynamoDB",

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
"license": "Apache-2.0",
1010
"private": true,
1111
"dependencies": {
12-
"@aws-amplify/amplify-cli-core": "^4.3.8",
12+
"@aws-amplify/amplify-cli-core": "^4.3.9",
1313
"@aws-amplify/ui-react": "^6.1.12",
1414
"@docsearch/react": "3",
15+
"ajv": "^8.16.0",
1516
"aws-amplify": "^6.0.9",
1617
"next": "^14.2.3",
1718
"next-image-export-optimizer": "^1.8.3",

redirects.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3011,7 +3011,7 @@
30113011
},
30123012
{
30133013
"source": "/lib/client-configuration/configuring-amplify-categories/q/platform/react-native/",
3014-
"target": "react-native/tools/libraries/configure-categories/",
3014+
"target": "/react-native/tools/libraries/configure-categories/",
30153015
"status": "301"
30163016
},
30173017
{

src/components/Accordion/Accordion.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,12 @@ export const Accordion: React.FC<AccordionProps> = ({
6969

7070
const closeAccordion = () => {
7171
const details = detailsRef.current;
72+
const summary = summaryRef.current;
7273
if (details) {
7374
const scrollToLoc = details.offsetTop - 48 - 70 - 10; // account for nav heights and 10px buffer
7475
setDetailsOpen(false);
7576
details.animate(collapse, animationTiming);
77+
summary?.focus();
7678
window.scrollTo({
7779
left: 0,
7880
top: scrollToLoc,

src/components/Accordion/__tests__/Accordion.test.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,13 @@ describe('Accordion', () => {
6565
});
6666
});
6767

68-
it('should collapse Accordion when close button is clicked', async () => {
68+
it('should collapse Accordion and refocus on Accordion element when close button is clicked', async () => {
6969
render(component);
7070
const accordionHeading = screen.getByText('Accordion component example');
7171
userEvent.click(accordionHeading);
7272
const detailsEl = await screen.getByRole('group');
73+
const summaryEl = detailsEl.firstChild;
74+
7375
expect(detailsEl).toHaveAttribute('open');
7476

7577
const text = await screen.getByText(content);
@@ -79,6 +81,7 @@ describe('Accordion', () => {
7981
await waitFor(() => {
8082
expect(text).not.toBeVisible();
8183
expect(detailsEl).not.toHaveAttribute('open');
84+
expect(summaryEl).toHaveFocus();
8285
});
8386
});
8487

src/components/Callout/Callout.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,21 @@ import { Message, View } from '@aws-amplify/ui-react';
33
interface CalloutProps {
44
info?: boolean;
55
warning?: boolean;
6+
backgroundColor?: string;
67
children?: React.ReactNode;
78
}
89

9-
export const Callout = ({ warning, children }: CalloutProps) => {
10+
export const Callout = ({
11+
warning,
12+
backgroundColor,
13+
children
14+
}: CalloutProps) => {
1015
return (
11-
<Message variation="filled" colorTheme={warning ? 'warning' : 'info'}>
16+
<Message
17+
variation="filled"
18+
colorTheme={warning ? 'warning' : 'info'}
19+
backgroundColor={backgroundColor}
20+
>
1221
<View>{children}</View>
1322
</Message>
1423
);

src/components/Callout/__tests__/Callout.test.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,17 @@ describe('Callout', () => {
1919

2020
consoleErrorFn.mockRestore();
2121
});
22+
23+
it('should pass the backgroundColor through to the Message component', async () => {
24+
const child = <div>Callout Child</div>;
25+
const ele = render(
26+
<Callout info={true} backgroundColor={'red'}>
27+
{child}
28+
</Callout>
29+
);
30+
31+
const styles = getComputedStyle(ele.container.children[0]);
32+
console.log(styles);
33+
expect(styles.backgroundColor).toBe('red');
34+
});
2235
});

0 commit comments

Comments
 (0)