Skip to content

Commit a28db55

Browse files
committed
update error UI
1 parent 15e5b72 commit a28db55

File tree

17 files changed

+518
-335
lines changed

17 files changed

+518
-335
lines changed

.prettierrc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
module.exports = {
22
plugins: [require('@ianvs/prettier-plugin-sort-imports')],
33
bracketSpacing: true,
4-
jsxBracketSameLine: true,
54
singleQuote: true,
65
trailingComma: 'all',
76
arrowParens: 'avoid',

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
"repository": "https://github.com/FormidableLabs/react-native-ama.git",
77
"homepage": "https://commerce.nearform.com/open-source/react-native-ama/",
88
"scripts": {
9-
"playground": "yarn --cwd playground",
10-
"playground:ios": "yarn --cwd playground run ios",
9+
"playground": "cd playground && yarn start",
10+
"playground:ios": "cd playground && yarn ios",
11+
"playground:android": "cd playground && yarn android",
1112
"build:animations": "yarn workspace @react-native-ama/animations build",
1213
"build:core": "yarn workspace @react-native-ama/core build",
1314
"build:extras": "yarn workspace @react-native-ama/extras build",

packages/core/android/src/debug/java/expo/modules/ama/a11yChecker.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ class A11yChecker(private val appContext: AppContext, private val config: AMACon
217217

218218
private fun checkForMinimumTargetSize(view: View) {
219219
if (view.width < 48 || view.height < 48) {
220-
Logger.error("checkView", "Small touch target")
220+
Logger.info("checkView", "Small touch target")
221221

222222
addIssue(
223223
rule = Rule.MINIMUM_SIZE,

packages/core/ios/A11yChecker.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,9 @@ public class A11yChecker {
144144
if view.isPressable {
145145
checkForA11yLabel(view)
146146
checkForA11yRole(view)
147+
checkForMinimumTargetArea(view)
147148
}
148149

149-
// checkForMinimumTargetArea(view)
150-
151150
//
152151
// // Minimum touch target
153152

@@ -197,9 +196,6 @@ public class A11yChecker {
197196
if !(hasRoleTrait || defaultRole != nil) {
198197
let label = view.getTextOrContent()
199198
let traitNames = view.accessibilityTraits.names
200-
Logger.info(
201-
label, defaultRole ?? "no role",
202-
extra: traitNames.joined(separator: ", "))
203199

204200
addIssue(
205201
rule: .noAccessibilityRole,

packages/core/src/ReactNativeAmaView.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import { requireNativeView } from 'expo';
22
import * as React from 'react';
33
import { ReactNativeAmaViewProps } from './ReactNativeAma.types';
44

5-
const NativeView: React.ComponentType<ReactNativeAmaViewProps> =
6-
requireNativeView('ReactNativeAma');
5+
const NativeView: React.ComponentType = requireNativeView('ReactNativeAma');
76

87
export default function ReactNativeAmaView(props: ReactNativeAmaViewProps) {
98
return <NativeView {...props} />;

0 commit comments

Comments
 (0)