Skip to content

Commit

Permalink
chore(next-release/main): Merge latest from main (#6208)
Browse files Browse the repository at this point in the history
* Update common content from Flutter revisions

* Update based on API ref

* Updating directory for new page

* Adding new page for managing user sessions

* Updating the directory with new page title

* First half of updates to social sign-in

* Second half update for js content

* Added React Native content

* Update CLI diff for js and react-native

* dan changes part1

* Updating menu for manage user profiles

* Updates to the Manage User Profile

* Updating directory for password mgmt

* Updates for password management

* Updated wording and small edits

* docs (js): Copyedited Set up Amplify Auth guide

* additional clarifications

* Copyedit of Auth guide for sign-in, sign-up, and sign-out

* additional clarifications

* additional changes

* additional changes

* add pr version of link checker script

* Updated authenticator callout for react native

* Updating directory title

* Removed comment

* Updates to delete user guide

* Minor update to note testing

* Removed comment markers

* convert server to use serve instead of next-start

* add static server for testing

* update broken link for pr script

* first round of changes

* update link checker script, add dev mode and pr link checker

* update link script

* remove unused code

* final changes

* latest changes

* initial changes

* add axios timeout

* remove unused command

* final changes

* Updating directory name

* final changes

* Staging for auth events content

* remove choose filter filtering

* update links

* correct directory.mjs entry add react-native lib-v1 base page

* Update overview.mdx

* remove permissions

* update pathmap default

* GH action to check bundlesize of PR (#5986)

* add gh workflow to check bundle size of selected pages

* pinning versions

* remove unnecessary package

* remove errant script from package.json

* consolidating functions

* change logic for check

* fix issues

* fix main branch ref

---------

Co-authored-by: katiegoines <katiegoines@gmail.com>

* adding needed index files

* Update csp (#5987)

* Remove deprecated prefetch-src header

* Update alpha CSP to remove warnings during local testing

* update index script

* update write script

* add missing index files

* final RN changes

* revert ssg revert

* add static generation to new js docs

* add static paths to page

* remove unlinked and unbuilt pages

* adding highlight for CDK support on main page

* update pages to match filters and generate the same index files as main

* Added What's New Banner

* addressed based on Janaina's feedback

* Update data-modeling.mdx

* update table in fragment to resolve hydration issue

* render contribute getting started text in spans

* Removed inline comment and minor edits

* chore(flutter): remove null safety references (#5998)

Co-authored-by: Tim Nguyen <54393192+timngyn@users.noreply.github.com>

* Removed mkdwn comments and minor edits and links

* Updated directory

* Update versions.ts

Updating the android library version

* Updates for manage user profiles per comments

* Updated password mgmt per comments

* Removed mrkdwn comment and minor edits

* Update-project-setup (#6007)

* updated project set up

* update framework info

* updated project set up

* update project set up

* Update src/pages/lib-v1/project-setup/create-application/q/platform/[platform].mdx

added period

* Update src/pages/lib-v1/project-setup/create-application/q/platform/[platform].mdx

Co-authored-by: Ashwin Kumar <ashwinkumar2468@gmail.com>

---------

Co-authored-by: Chris Womack <67726635+cwomack@users.noreply.github.com>
Co-authored-by: Ashwin Kumar <ashwinkumar2468@gmail.com>
Co-authored-by: Katie Goines <30757403+katiegoines@users.noreply.github.com>

* chore(deps): bump @aws-amplify/amplify-cli-core from 4.2.7 to 4.2.10 (#6011)

Bumps [@aws-amplify/amplify-cli-core](https://github.com/aws-amplify/amplify-cli/tree/HEAD/packages/amplify-cli-core) from 4.2.7 to 4.2.10.
- [Release notes](https://github.com/aws-amplify/amplify-cli/releases)
- [Changelog](https://github.com/aws-amplify/amplify-cli/blob/@aws-amplify/amplify-cli-core@4.2.10/packages/amplify-cli-core/CHANGELOG.md)
- [Commits](https://github.com/aws-amplify/amplify-cli/commits/@aws-amplify/amplify-cli-core@4.2.10/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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Katie Goines <30757403+katiegoines@users.noreply.github.com>

* Removed mkdwn comments and small edits

* Add custom analytics event for the "What's New" banner (#6006)

* Add a custom adobe analytics event for the WhatsNewBanner component

* Add comment for function

* Updated with react-native links

* update home page to update page context

* Removed mkdwn comment and minor edit

* Update directory

* Updating directory

* Fixing directory

* Fix directory update

* Update directory

* fix: updating @babel/traverse (#6025)

* update @babel/core and @babel/traverse

* updated @babel/traverse

---------

Co-authored-by: katiegoines <katiegoines@gmail.com>

* update base lib, sdk, and guides pages

* final changes

* update next/previous styles

* Removed mkdwn and minor edits

* Amplify Android API Relational Models (#6020)

* feat(api): iOS Android API GraphQL relational models pages

* update schema

* Add callout, update many-to-many schema

* update callout to point to migration guide for existing developers

* add new sections for query and css

* Updates to Android API Relationship page

* Defragmented pages and reordered content.

* Remove iOS docs for now

* Remove iOS docs for now

* Remove fragments

* Add delete code snippet

* Correct description of query

---------

Co-authored-by: Michael Law <1365977+lawmicha@users.noreply.github.com>
Co-authored-by: Rene Brandel <renbran@amazon.com>

* Update CODEOWNERS to exclude documentation team from all files (#6030)

* chore: update auth docs now that cdk tokens are supported for adminRole and identityPoolId

* Update src/pages/cli/graphql/authorization-rules.mdx

* fix: update example naming

* Revert "Update CODEOWNERS to exclude documentation team from all files (#6030)" (#6031)

* update new page to include ssg required exports

* update sample amplifyconfiguration json file (#5874)

Co-authored-by: Tim Nguyen <54393192+timngyn@users.noreply.github.com>
Co-authored-by: Katie Goines <30757403+katiegoines@users.noreply.github.com>

* add choose your filter page

* filter out all but android (#6036)

Co-authored-by: katiegoines <katiegoines@gmail.com>
Co-authored-by: Rene Brandel <4989523+renebrandel@users.noreply.github.com>

* Update Amplify Android Version

* fix: Fix CDK types in overview

Fix CDK types in the overview. Previous version referred to non-existent types.

* chore(Auth): add singedIn and signedOut Hub events in v6 (#6048)

* chore: add SignIn and SignOut events

* chore: update 'guest' to `guest` (#5981)

Co-authored-by: Jim Blanchard <jim.l.blanchard@gmail.com>
Co-authored-by: AllanZhengYP <zheallan@amazon.com>

* update algolia index function to remove INTEGRATION_FILTER_OPTIONS from meta object before parsing

* Update src/pages/lib/auth/manageusers/q/platform/[platform].mdx

Co-authored-by: Venkata Ramyasri Kota <34170013+kvramyasri7@users.noreply.github.com>

* Update src/pages/lib/auth/manageusers/q/platform/[platform].mdx

Co-authored-by: Venkata Ramyasri Kota <34170013+kvramyasri7@users.noreply.github.com>

* Update src/pages/lib/auth/password_management/q/platform/[platform].mdx

Co-authored-by: Venkata Ramyasri Kota <34170013+kvramyasri7@users.noreply.github.com>

* Update src/pages/lib/auth/password_management/q/platform/[platform].mdx

Co-authored-by: Venkata Ramyasri Kota <34170013+kvramyasri7@users.noreply.github.com>

* Update src/pages/lib/auth/manageusers/q/platform/[platform].mdx

Co-authored-by: Venkata Ramyasri Kota <34170013+kvramyasri7@users.noreply.github.com>

* Apply suggestions for password title update

Co-authored-by: Venkata Ramyasri Kota <34170013+kvramyasri7@users.noreply.github.com>

* Update recap based on review

Co-authored-by: Venkata Ramyasri Kota <34170013+kvramyasri7@users.noreply.github.com>

* Update meta content in headers

* Change instance of my to your

* Adding 4 guides and updating directory

* Updating directory entry for password_management

* Updating from feedback and adding react-native

* Adding index page for new page

* Updating per feedback

* update the choose a filter component to try and pull filters from directory and prefer those instead of the passed in values

* Punctuation edits

* don't parse BlockSwitchers for headers

* Removing comments, minor edits, added react-native

* Updating header and feedback

* Remove SSR link

* formatting

* Set isExternal to true for whats new banner (#6077)

* add debugging line to ampliy.yml

* Update next config (#6095)

* Use 'output' config for exporting

* Update maxWorkers to jest run

* Update next to 13.5.6

* applied "connect" changes

* Updated per feedback

* Release Amplify Android 2.14.2, also reference AppSync SDK v3.4.0 which fixed a bug (#6096)

Co-authored-by: Thomas Leing <leint@amazon.com>

* Update src/pages/lib/auth/manage-session/q/platform/[platform].mdx

Update the `clear()` example to include use of `this` reference.

* Update src/pages/lib/auth/mfa/q/platform/[platform].mdx

nit

* Adding redirects tracking file and update README (#6082)

* add redirects tracking file and update README

* Update Readme.md

---------

Co-authored-by: katiegoines <katiegoines@gmail.com>
Co-authored-by: Tim Nguyen <54393192+timngyn@users.noreply.github.com>

* add standalone how amplify works page (#6051)

* add standalone how amplify works page

* merged in main

* merging jims changes

* update content

* refresh yarn

* add checkmark png

* table changes

* add addtl space where needed

* remove directory.json

---------

Co-authored-by: katiegoines <katiegoines@gmail.com>

* feat: remove docs team approval for spelling changes using codeowners

* chore: update readme for cspell check

* Revert "Chore: Update codeowners file to exclude documentation team for approvals on cspell json file changes"

* chore: update codeowner for console

* fix(flutter/analytics): temporarily remove broken url (#6177)

* Update how-amplify-works.mdx

* Update how-amplify-works.mdx

* remove files removed in initial refactor, fix a merge conflict

* remove stray index, [platform].index pages

* merge InternalLink changes from next-release/main to not reference Page component

* Clean up linting errors and string/booleans in next.config

* fix prettier version

* fix missing json5 dependency

* remove unused script in package.json

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Heather Pundt <119376175+heatheramz@users.noreply.github.com>
Co-authored-by: Dan Kiuna <dkkiuna11@gmail.com>
Co-authored-by: Jim Eagan <jeeagan@amazon.com>
Co-authored-by: Jim Eagan <84857865+hibler13@users.noreply.github.com>
Co-authored-by: Dan Kiuna <dkkiuna@amazon.com>
Co-authored-by: Jacob Logan <lognjc@amazon.com>
Co-authored-by: Katie Goines <30757403+katiegoines@users.noreply.github.com>
Co-authored-by: jacoblogan <jacob.maiola.logan@gmail.com>
Co-authored-by: Rene Brandel <4989523+renebrandel@users.noreply.github.com>
Co-authored-by: katiegoines <katiegoines@gmail.com>
Co-authored-by: Tim Nguyen <54393192+timngyn@users.noreply.github.com>
Co-authored-by: Rene Brandel <renbran@amazon.com>
Co-authored-by: Dustin Noyes <dustin.noyes.dev@gmail.com>
Co-authored-by: gpanshu <91897496+gpanshu@users.noreply.github.com>
Co-authored-by: Abdallah Shaban <awshaban@amazon.com>
Co-authored-by: Chris Womack <67726635+cwomack@users.noreply.github.com>
Co-authored-by: Ashwin Kumar <ashwinkumar2468@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyler Roach <tjroach@amazon.com>
Co-authored-by: Michael Law <1365977+lawmicha@users.noreply.github.com>
Co-authored-by: Al Harris <alharris@amazon.com>
Co-authored-by: Tuan Pham <103537251+phantumcode@users.noreply.github.com>
Co-authored-by: Tim Schmelter <schmelte@amazon.com>
Co-authored-by: Venkata Ramyasri Kota <34170013+kvramyasri7@users.noreply.github.com>
Co-authored-by: Jim Blanchard <jim.l.blanchard@gmail.com>
Co-authored-by: AllanZhengYP <zheallan@amazon.com>
Co-authored-by: Thomas Leing <bluezebragames@gmail.com>
Co-authored-by: Thomas Leing <leint@amazon.com>
Co-authored-by: israx <70438514+israx@users.noreply.github.com>
Co-authored-by: sowmyadev-kota <124720934+sowmyadev-kota@users.noreply.github.com>
Co-authored-by: Sowmya Kota <kvsowmyasri21@gmail.com>
Co-authored-by: Scott Rees <6165315+reesscot@users.noreply.github.com>
  • Loading branch information
1 parent df96bb0 commit 36e2e4e
Show file tree
Hide file tree
Showing 168 changed files with 3,314 additions and 1,439 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/src/**/cli/ @josefaidt @aws-amplify/documentation-team

#Studio
/src/pages/console/ @wrpeck @aws-amplify/documentation-team
/src/pages/console/ @dbanksdesign @aws-amplify/documentation-team

#Analytics
/src/**/**/analytics @abdallahshaban557 @aws-amplify/documentation-team
Expand Down
60 changes: 33 additions & 27 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,20 @@

1. [Fork this repo](/fork) and `git clone` it.
2. In your terminal, navigate to the repo from where it was just cloned. This should be located at the `/docs` directory.
2. From your command line, run `yarn && yarn dev`.
3. <http://localhost:3000/> should open automatically.
3. From your command line, run `yarn && yarn dev`.
4. <http://localhost:3000/> should open automatically.

## How to contribute

We welcome contributions to the documentation site! Here's how to do it:

1. Follow our [styleguide](https://github.com/aws-amplify/docs/blob/main/STYLEGUIDE.md), especially if writing longer pieces.
2. Verify your changes locally.
2. Verify your changes locally.
3. Make a PR to our `main` branch.
1. Please include any [issues](https://github.com/aws-amplify/docs/issues) your PR addresses.
2. If any files have been deleted with your PR, please indicate that `redirects are needed` in your PR description and/or add the `redirects-needed` label.
1. Please include any [issues](https://github.com/aws-amplify/docs/issues) your PR addresses.
2. If any files have been deleted with your PR, please add the redirects required to [`redirects.json`](https://github.com/aws-amplify/docs/blob/main/redirects.json) and ensure that the `redirects-needed` label has been added.
- Please see the [Amplify Hosting user guide](https://docs.aws.amazon.com/amplify/latest/userguide/redirects.html) for guidance on values and ordering.
- Please note that there is a manual step for the Docs Engineering team to complete before the redirects are live.

**What's next?** After your PR is reviewed and all tests pass, it will be merged and the branch will be deleted.

Expand All @@ -48,49 +50,50 @@ IMPORTANT: Every page has to have a `title` and `description` meta field.
The markdown body is parsed as [MDX](https://mdxjs.com/) and can include any valid HTML or JSX.

### Fragments

To incorporate new platform-specific content within a page, please use [Inline Filters](https://github.com/aws-amplify/docs/blob/main/Readme.md#inline-filters).

When editing content that hasn't been migrated, you may see the following pattern:

```jsx
import js from "/src/fragments/lib/datastore/js/conflict.mdx";
import js from '/src/fragments/lib/datastore/js/conflict.mdx';

<Fragments fragments={{js: js}} />;
<Fragments fragments={{ js: js }} />;
```

This pattern incorporates fragment files into a page and conditionally renders content based off selected platform added as a condition to the `Fragments` tag.

This fragment would exist in: `pages/src/fragments/lib/datastore/js/conflict.mdx`

### Inline Filters
### Inline Filters

We are incorporating the use of `<InlineFilters>` to add platform-specific content within the context of one page rather than in fragments. These filters allow you to still specify content by platform and they reference platforms using the same naming convention as our fragments. You can enclose your platform-specific content by updating the opening tag:

````md
```md
<InlineFilter filters={["js", "react-native", "android", "ios", "flutter"]}>

</InlineFilter>
````
```

If you are updating content on a page, please note any inline filter tags which may be indicating a specific platform as you make your edits.

### Accordion
### Accordion

`Accordion` This single-use accordion hides peripheral content until the reader selects to expand the section. This helps you keep your pages focused on the need-to-know information upfront, while also providing readers an option to dive deeper when they choose. These accordions can provide peripheral content such as additional context for beginners, advanced deep dives for those who want to off-road, and troubleshooting guidance for errors users may encounter.

Here is an example of its usage:

````md
```md
<Accordion title='Review recommended accordion usage' headingLevel='4' eyebrow='Learn more'>

- Title – Make your title descriptive to help readers know what the accordion contains before they click.
- Eyebrow – Update this text to reflect the purpose of the accordion. We recommend:
- Learn more – used to add additional context that is not needed upfront but is useful for users to review when they choose.
- Troubleshooting – used when adding details to troubleshoot specific errors within context.
- Walkthrough – used when adding a step-by-step example for those who need more direct guidance.
- Learn more – used to add additional context that is not needed upfront but is useful for users to review when they choose.
- Troubleshooting – used when adding details to troubleshoot specific errors within context.
- Walkthrough – used when adding a step-by-step example for those who need more direct guidance.

</Accordion>
````
```

### Tab-switchable Blocks

Expand All @@ -102,15 +105,15 @@ Here is an example of its usage:
<Block name="JavaScript">

```js
const a = "a";
const a = 'a';
```

</Block>

<Block name="TypeScript">

```ts
const a: "a" = "a";
const a: 'a' = 'a';
```

</Block>
Expand All @@ -129,23 +132,26 @@ let mut a = String::from("a");
## Debug client-side code with browser developer tools

### Prerequisites
- [React Dev Tools](https://reactjs.org/tutorial/tutorial.html#developer-tools)
- [Chrome](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en)
- [Firefox](https://addons.mozilla.org/en-US/firefox/addon/react-devtools/)

- [React Dev Tools](https://reactjs.org/tutorial/tutorial.html#developer-tools)
- [Chrome](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en)
- [Firefox](https://addons.mozilla.org/en-US/firefox/addon/react-devtools/)

### To debug

1. Set up the repo and run it with the `dev` script mentioned above in the "Getting Started" section.
2. On your localhost page, go to the page with the React component you want to debug and open up the developer tools.
3. To know which source file to breakpoint on, we need to find the name of the component first.
- Open up the dev tools and use the react dev tools to find the component. Do this by using the "Select an element on the page to inspect it" tool under the "Components" tab.

- Search for the variable/component name inside the source code to find the file you want to debug.
- Open up the dev tools and use the react dev tools to find the component. Do this by using the "Select an element on the page to inspect it" tool under the "Components" tab.

- Search for the variable/component name inside the source code to find the file you want to debug.

- Place the breakpoint inside the file under the "Sources" tab in the browser's dev tools.
- Note that since the Amplify Docs site is built with nextjs, file paths will start with "`webpack://_N_E/./`"

- Place the breakpoint inside the file under the "Sources" tab in the browser's dev tools.
- Note that since the Amplify Docs site is built with nextjs, file paths will start with "`webpack://_N_E/./`"
4. Refresh your localhost site and the breakpoint should hit in the browser's dev tools. You should be able to debug the code.

Another way to find which file you want to debug is to search for strings/paragraphs seen in Amplify docs site. Search for the strings in your code editor and you'll find that they will be in a `.mdx` file. You should see the components that are being rendered and be able to find the file name you want to debug.


More info on debugging can be found here: https://nextjs.org/docs/advanced-features/debugging
1 change: 1 addition & 0 deletions amplify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ frontend:
build:
commands:
- echo "BUILD_ENV=$BUILD_ENV" >> .env.custom
- node -e 'console.log(`node heap limit = ${require("v8").getHeapStatistics().heap_size_limit / (1024 * 1024)} Mb`)'
- NODE_ENV=production yarn build:release
- if [ "${AWS_BRANCH}" = "main" ]; then node tasks/build-algolia-search.mjs; fi
artifacts:
Expand Down
44 changes: 13 additions & 31 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import rehypeImgSize from 'rehype-img-size';
import remarkGfm from 'remark-gfm';
dotenv.config({ path: './.env.custom' });

export default async () => {
export default () => {
const withMDX = createMDX({
extension: /\.mdx$/,
options: {
Expand All @@ -19,18 +19,26 @@ export default async () => {
const shouldAnalyzeBundles = process.env.ANALYZE === 'true';

let nextConfig = withMDX({
output: 'export',
distDir: 'client/www/next-build',
env: {
BUILD_ENV: process.env.BUILD_ENV,
// eslint-disable-next-line @typescript-eslint/camelcase
nextImageExportOptimizer_imageFolderPath: 'public',
// eslint-disable-next-line @typescript-eslint/camelcase
nextImageExportOptimizer_exportFolderPath: 'out',
nextImageExportOptimizer_quality: 75,
nextImageExportOptimizer_storePicturesInWEBP: true,
// eslint-disable-next-line @typescript-eslint/camelcase
nextImageExportOptimizer_quality: '75',
// eslint-disable-next-line @typescript-eslint/camelcase
nextImageExportOptimizer_storePicturesInWEBP: 'true',
// eslint-disable-next-line @typescript-eslint/camelcase
nextImageExportOptimizer_exportFolderName: 'nextImageExportOptimizer',

// If you do not want to use blurry placeholder images, then you can set
// nextImageExportOptimizer_generateAndUseBlurImages to false and pass
// `placeholder="empty"` to all <ExportedImage> components.
nextImageExportOptimizer_generateAndUseBlurImages: true
// eslint-disable-next-line @typescript-eslint/camelcase
nextImageExportOptimizer_generateAndUseBlurImages: 'true'
},
images: {
loader: 'custom',
Expand All @@ -49,33 +57,7 @@ export default async () => {
transpilePackages: [
'@algolia/autocomplete-shared',
'next-image-export-optimizer'
],
// eslint-disable-next-line @typescript-eslint/require-await
async headers() {
return [
{
// Apply these headers to all routes in your application.
source: '/(.*)',
headers: [
// IMPORTANT:
// These are ONLY used for the Dev server and MUST
// be kept in sync with customHttp.yml
{
key: 'Strict-Transport-Security',
value: 'max-age=63072000; includeSubDomains'
},
{
key: 'X-Frame-Options',
value: 'SAMEORIGIN'
},
{
key: 'X-Content-Type-Options',
value: 'nosniff'
}
]
}
];
}
]
});

if (shouldAnalyzeBundles) {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"html-entities": "^1.2.1",
"instantsearch.js": "^4.39.1",
"mdx-prism": "^0.3.4",
"next": "^13.2.4",
"next": "^13.5.6",
"next-image-export-optimizer": "^1.8.3",
"next-transpile-modules": "^9.0.0",
"parse-imports": "^1.1.0",
Expand Down Expand Up @@ -148,7 +148,7 @@
"dev": "yarn prebuild && next dev",
"spellcheck": "cspell \"src/**/*.mdx\" --no-progress",
"spellcheck-diff": "git diff --name-only --cached | awk \"/src.*\\.mdx/{print}\" | npx cspell --no-must-find-files --file-list stdin",
"build": "node tasks/generate-sitemap.mjs && next build && next export -o client/www/next-build",
"build": "node tasks/generate-sitemap.mjs && next build",
"build:release": "yarn build && next-image-export-optimizer --exportFolderPath client/www/next-build",
"next-build": "next build",
"next-start": "next start",
Expand Down
Loading

0 comments on commit 36e2e4e

Please sign in to comment.