Skip to content

Commit

Permalink
Merge branch 'main' into FocusIndicatorUpdates
Browse files Browse the repository at this point in the history
  • Loading branch information
hbuchel authored Nov 6, 2023
2 parents 5415295 + bb4e683 commit f595948
Show file tree
Hide file tree
Showing 90 changed files with 4,128 additions and 868 deletions.
24 changes: 0 additions & 24 deletions .changeset/breezy-rabbits-change.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/cold-news-jump.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/five-ghosts-hug.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/loud-dodos-confess.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/mean-vans-attend.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/modern-melons-doubt.md

This file was deleted.

2 changes: 2 additions & 0 deletions .github/workflows/build-system-test-react-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ jobs:
brew tap wix/brew
brew install applesimutils
brew install watchman
brew link --overwrite [email protected]
echo "ruby --version"
ruby --version
continue-on-error: true # brew overwrite step addresses a python install issue: https://github.com/actions/runner-images/issues/8500
- name: Install packages
if: steps.restore-cache.outputs.cache-hit != 'true'
uses: ./.github/actions/install-with-retries
Expand Down
11 changes: 7 additions & 4 deletions build-system-tests/scripts/checkReactNativeLog.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fs from 'fs';
import { Command } from 'commander';
import { PromisePool } from '@supercharge/promise-pool';
import { Command } from 'commander';
import fs from 'fs';

const program = new Command();

Expand Down Expand Up @@ -91,7 +91,10 @@ const checkStartMessage = async (
* @returns {boolean} hasError
*/
const checkErrorMessage = async (logLines: string[]): Promise<boolean> => {
log('info', `Checking log file ${logFileName} for errors...`);
log(
'info',
`Checking log file ${logFileName} on ${platform} platform for errors...`
);

const { results } = await PromisePool.withConcurrency(1)
.for(logLines)
Expand Down Expand Up @@ -135,7 +138,7 @@ const checkReactNativeLog = async (): Promise<void> => {
process.chdir(`mega-apps/${megaAppName}`);

// Wait for the logging messages to be ready. The number is based on real experiments in Github Actions.
let timeToWait = platform === 'android' ? 500 : 300;
const timeToWait = 500;

log('info', `Sleep for '${timeToWait}' seconds...`);
await sleep(timeToWait);
Expand Down
1 change: 0 additions & 1 deletion docs/__tests__/__snapshots__/sitemap.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ exports[`Sitemap Snapshot 1`] = `
/react/getting-started/migration,
/react/getting-started/troubleshooting,
/react/getting-started/usage,
/react/getting-started/usage/create-react-app,
/react/getting-started/usage/nextjs,
/react/getting-started/usage/vite,
/react/guides,
Expand Down
8 changes: 8 additions & 0 deletions docs/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,14 @@ module.exports = withNextPluginPreval({
'/:platform(react|react-native|angular|vue)/connected-components/authenticator/advanced',
permanent: true,
},
/**
* Redirect traffic from CRA to Vite getting started page
*/
{
source: '/react/getting-started/usage/create-react-app',
destination: '/react/getting-started/usage/vite',
permanent: true,
},
];
},

Expand Down
6 changes: 3 additions & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"test:links": "node --require esbuild-register ./scripts/link-checker-puppeteer.ts"
},
"dependencies": {
"@aws-amplify/ui-react": "5.3.0",
"@aws-amplify/ui-react-storage": "2.3.0",
"@aws-amplify/ui-react": "5.3.1",
"@aws-amplify/ui-react-storage": "2.3.1",
"@cucumber/gherkin": "^19.0.3",
"@cucumber/messages": "^16.0.1",
"@docsearch/react": "3",
Expand Down Expand Up @@ -78,7 +78,7 @@
"eslint-config-next": "12.0.10",
"globby": "^13.1.1",
"jest": "^27",
"postcss": "^8.2.6",
"postcss": "^8.4.31",
"puppeteer": "^19.7.2",
"react-markdown": "^8.0.3",
"sitemap-urls": "^3.0.0",
Expand Down
6 changes: 5 additions & 1 deletion docs/scripts/util/checkLink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@ export async function checkLink(
`⚠️[WARNING...] page #${pageIdx} link #${linkIdx} "${tagName}" tag "${tagText}" doesn't have a href.`
);
res({ ...linkData, statusCode: 0 });
} else if (IGNORED_LINKS.includes(href) || requestedUrl.has(href)) {
} else if (
IGNORED_LINKS.includes(href) ||
requestedUrl.has(href) ||
(href as string).includes('www.w3.org')
) {
res({ ...linkData, statusCode: 0 });
} else {
const { get } = href.includes('https:') ? https : http;
Expand Down
3 changes: 2 additions & 1 deletion docs/src/components/ExpoSnack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ const defaultOptions: SnackOptions = {
loading: 'lazy',
sdkVersion: '45.0.0',
dependencies: [
'@aws-amplify/ui-react-native,aws-amplify',
'@aws-amplify/ui-react-native',
'[email protected]',
'react-native-safe-area-context',
'amazon-cognito-identity-js',
'@react-native-community/netinfo',
Expand Down
5 changes: 4 additions & 1 deletion docs/src/components/home/HomeEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,7 @@ const HomeEditor = () => {
);
};

export default HomeEditor;
HomeEditor.displayName = 'HomeEditor';

const MemoHomeEditor = React.memo(HomeEditor);
export default MemoHomeEditor;
2 changes: 1 addition & 1 deletion docs/src/data/frameworks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ export const FRAMEWORK_INSTALL_SCRIPTS = {
vue: 'npm i @aws-amplify/ui-vue aws-amplify',
angular: 'npm i @aws-amplify/ui-angular aws-amplify',
flutter: 'flutter pub add amplify_authenticator',
android: "implementation 'com.amplifyframework.ui:liveness:1.1.2'",
android: "implementation 'com.amplifyframework.ui:liveness:1.1.3'",
'react-native': `npm i @aws-amplify/ui-react-native aws-amplify ${REACT_NATIVE_DEPENDENCIES}`,
};
12 changes: 12 additions & 0 deletions docs/src/data/ignoredLinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,16 @@ export const IGNORED_LINKS = [
'https://tfhub.dev/tensorflow/tfjs-model/blazeface/1/default/1/model.json?tfjs-format=file', // 302 to a google cdn
'https://cdn.liveness.rekognition.amazonaws.com/face-detection/tensorflow/tfjs-backend-wasm/3.11.0/', // 404 this is the intentional path as the tfjs library will append the correct file name
'https://cdn.liveness.rekognition.amazonaws.com',
'https://www.figma.com/community/file/1047600760128127424',
'https://www.figma.com/community/plugin/1040722185526429545/AWS-Amplify-Theme-Editor',
'https://www.w3.org/WAI/ARIA/apg/patterns/tabs/',
'https://www.w3.org/WAI/standards-guidelines/act/rules/0ssw9k/proposed/',
'https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/#aria_lh_step3',
'https://www.w3.org/WAI/ARIA/apg/patterns/alert/examples/alert/',
'https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/',
'https://www.w3.org/WAI/ARIA/apg/patterns/breadcrumb/',
'https://pub.dev/documentation/amplify_authenticator/latest/amplify_authenticator/AuthenticatorStep.html',
'https://pub.dev/documentation/amplify_authenticator/latest/amplify_authenticator/AuthenticatorState-class.html',
'https://pub.dev/documentation/amplify_authenticator/latest/amplify_authenticator/amplify_authenticator-library.html',
'https://docs.flutter.dev/ui/accessibility-and-localization/internationalization',
];
6 changes: 0 additions & 6 deletions docs/src/data/links.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -613,12 +613,6 @@ export const gettingStarted: ComponentNavItem[] = [
platforms: ['react'],
tertiary: true,
},
{
href: '/getting-started/usage/create-react-app',
label: 'Create React App',
platforms: ['react'],
tertiary: true,
},
{
href: '/getting-started/figma',
platforms: ['react'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,7 @@ with the exception of `address`, `gender`, `locale`, `picture`, `updated_at`, an
<Fragment useCommonWebContent platforms={['web', 'react-native', 'swift']}>
{({ platform }) => import(`./hidesignup.${platform}.mdx`)}
</Fragment>

<Fragment useCommonWebContent platforms={['swift']}>
{({ platform }) => import(`./totpIssuer.${platform}.mdx`)}
</Fragment>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## TOTP Issuer

The TOTP issuer is the name that will be shown in TOTP applications preceding the account name. In most cases, this should be the name of your app. For example, if your app is called "My App", your user will see "My App" - "username" in their TOTP app. This can be customized by adding the `totpOptions` argument to the Authenticator component with a value for `issuer`.

Note: Unless changed, the default issuer is the application name retrieved from the project configuration. The key for this value is `CFBundleDisplayName` on iOS found in `info.plist`.

```swift
Authenticator(totpOptions: .init(issuer: "My App")) { _ in
Text("Signed In Content")
}
```
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,30 @@ struct CustomSignInView: View {
}

```

### TOTP Setup

You can also customize the TOTP setup experience. We make available arguments in the `ContinueSignInWithTOTPSetupView` i.e. `qrCodeContent` and `copyKeyContent` that can help you provide custom content for the TOTP Setup Experience. In the example below, examine how you could customize the setup screen.

```swift
Authenticator(
continueSignInWithTOTPSetupContent: { state in
ContinueSignInWithTOTPSetupView(
state: state,

// Example of how a customer can pass a custom QR code
qrCodeContent: { state in
// Your custom QR Code implementation goes here

},
copyKeyContent: { state in
// YOUR custom implementation goes here
}
)
},
content: { state in
Text("Signed In Content")
}
)

```
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Add the following dependencies to your **app**'s `build.gradle` file and click "
```groovy
dependencies {
// Authenticator dependency
implementation 'com.amplifyframework.ui:authenticator:1.0.0'
implementation 'com.amplifyframework.ui:authenticator:1.0.1'
// Support for Java 8 features
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Add the following dependencies to your **app**'s `build.gradle` file and click "
```groovy
dependencies {
// FaceLivenessDetector dependency
implementation 'com.amplifyframework.ui:liveness:1.1.2'
implementation 'com.amplifyframework.ui:liveness:1.1.3'
// Material3 dependency for theming FaceLivenessDetector
implementation 'androidx.compose.material3:material3:1.1.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Add the following dependencies to your **app**'s `build.gradle` file and click "
```groovy
dependencies {
// FaceLivenessDetector dependency
implementation 'com.amplifyframework.ui:liveness:1.1.2'
implementation 'com.amplifyframework.ui:liveness:1.1.3'
// Amplify Auth dependency (unnecessary if using your own credentials provider)
implementation 'com.amplifyframework:aws-auth-cognito:2.11.1'
Expand Down
Loading

0 comments on commit f595948

Please sign in to comment.