Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
jpilomia authored Nov 9, 2023
2 parents 20ff0ed + eed2dd4 commit 460578b
Show file tree
Hide file tree
Showing 25 changed files with 3,807 additions and 471 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,50 +50,51 @@ 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.
- Heading Level – Keep the heading level consistent with your page hierarchy.
- 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 @@ -103,15 +106,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 @@ -130,23 +133,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
Binary file added public/images/how-amplify-works/amplify-flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/how-amplify-works/checkmark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/how-amplify-works/figma-to-code.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/how-amplify-works/hosting-form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 460578b

Please sign in to comment.