diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 193b6dacb5..934fccea4a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,10 +4,10 @@ Great to have you here! Here are a few ways you can help make this project bette ## Setting up a development environment -Refer to [React Native environment setup](https://reactnative.dev/docs/environment-setup) to make sure everything is up and running. -Follow the `React Native CLI Quickstart` section as we don't support Expo managed flow. +Refer to [React Native environment setup](https://reactnative.dev/docs/set-up-your-environment) to make sure everything is up and running. *Note: you'll need a MacOS to run iOS apps* +*Note: We don't support Expo managed flow* ### How to run @@ -104,8 +104,6 @@ We use [Detox](https://github.com/wix/Detox) framework to end-to-end test our ap As soon as your changes are ready, you can open a Pull Request. -The title of your PR should be descriptive, including either [NEW], [IMPROVEMENT] or [FIX] at the beginning, e.g. [FIX] App crashing on startup. +Refer to [Pull request's tags](https://developer.rocket.chat/docs/pull-requests-tags) to write a good PR title. -You may share working results prior to finishing, please include [WIP] in the title. This way anyone can look at your code: you can ask for help within the PR if you don't know how to solve a problem. - -Your PR is automatically inspected by various tools, check their response and try to improve your code accordingly. Requests that fail to build or have wrong coding style won't be merged. +Open your PR as draft before asking for review. Your PR is automatically inspected by various tools, check their response and try to improve your code accordingly. Requests that fail to build or have wrong coding style won't be merged. \ No newline at end of file diff --git a/app/containers/ActionSheet/ActionSheetContentWithInputAndSubmit/index.tsx b/app/containers/ActionSheet/ActionSheetContentWithInputAndSubmit/index.tsx index ae0f2c3bb2..103a61b4ac 100644 --- a/app/containers/ActionSheet/ActionSheetContentWithInputAndSubmit/index.tsx +++ b/app/containers/ActionSheet/ActionSheetContentWithInputAndSubmit/index.tsx @@ -12,24 +12,25 @@ import { useActionSheet } from '../Provider'; const styles = StyleSheet.create({ subtitleText: { - fontSize: 14, ...sharedStyles.textRegular, - marginBottom: 10 + fontSize: 16, + lineHeight: 24 }, buttonSeparator: { - marginRight: 8 + marginRight: 12 }, footerButtonsContainer: { flexDirection: 'row', paddingTop: 16 }, titleContainerText: { + ...sharedStyles.textBold, fontSize: 16, - ...sharedStyles.textSemibold + lineHeight: 24 }, titleContainer: { paddingRight: 80, - marginBottom: 16, + marginBottom: 12, flexDirection: 'row', alignItems: 'center' } @@ -53,8 +54,8 @@ const FooterButtons = ({ styles.buttonSeparator, { flex: 1, backgroundColor: cancelBackgroundColor || colors.buttonBackgroundSecondaryDefault } ]} - color={colors.backdropColor} title={cancelTitle} + color={colors.buttonFontSecondary} onPress={cancelAction} testID={`${testID}-cancel`} /> @@ -120,7 +121,6 @@ const ActionSheetContentWithInputAndSubmit = ({ handleInputChange(value, index)} onSubmitEditing={() => { if (index < inputs.length - 1) { @@ -143,7 +143,6 @@ const ActionSheetContentWithInputAndSubmit = ({ return ( handleInputChange(value, 0)} onSubmitEditing={() => { setTimeout(() => { @@ -151,9 +150,11 @@ const ActionSheetContentWithInputAndSubmit = ({ }, 100); if (inputValues[0]) onSubmit(inputValues[0]); }} + accessibilityLabel={placeholder} testID={`${testID}-input`} secureTextEntry={secureTextEntry} bottomSheet={isIOS} + containerStyle={{ marginTop: 12, marginBottom: 36 }} /> ); }; @@ -164,9 +165,9 @@ const ActionSheetContentWithInputAndSubmit = ({ return ( <> - + {iconName ? : null} - {title} + {title} {description ? {description} : null} {customText} diff --git a/app/containers/Avatar/Avatar.tsx b/app/containers/Avatar/Avatar.tsx index 95584d3819..7887d3448f 100644 --- a/app/containers/Avatar/Avatar.tsx +++ b/app/containers/Avatar/Avatar.tsx @@ -9,6 +9,7 @@ import { getAvatarURL } from '../../lib/methods/helpers/getAvatarUrl'; import { SubscriptionType } from '../../definitions'; import { IAvatar } from './interfaces'; import MarkdownContext from '../markdown/contexts/MarkdownContext'; +import I18n from '../../i18n'; const Avatar = React.memo( ({ @@ -32,12 +33,14 @@ const Avatar = React.memo( type = SubscriptionType.DIRECT, avatarExternalProviderUrl, roomAvatarExternalProviderUrl, - cdnPrefix + cdnPrefix, + accessibilityLabel }: IAvatar) => { if ((!text && !avatar && !emoji && !rid) || !server) { return null; } + const avatarAccessibilityLabel = accessibilityLabel ?? I18n.t('Avatar_Photo', { username: text }); const avatarStyle = { width: size, height: size, @@ -88,11 +91,19 @@ const Avatar = React.memo( } if (onPress) { - image = {image}; + image = ( + + {image} + + ); } return ( - + {image} {children} diff --git a/app/containers/Avatar/AvatarContainer.tsx b/app/containers/Avatar/AvatarContainer.tsx index 3e1282d429..29274a49dc 100644 --- a/app/containers/Avatar/AvatarContainer.tsx +++ b/app/containers/Avatar/AvatarContainer.tsx @@ -19,7 +19,8 @@ const AvatarContainer = ({ onPress, getCustomEmoji, isStatic, - rid + rid, + accessibilityLabel }: IAvatar): React.ReactElement => { const server = useSelector((state: IApplicationState) => state.server.server); const serverVersion = useSelector((state: IApplicationState) => state.server.version); @@ -66,6 +67,7 @@ const AvatarContainer = ({ avatarETag={avatarETag} serverVersion={serverVersion} cdnPrefix={cdnPrefix} + accessibilityLabel={accessibilityLabel} /> ); }; diff --git a/app/containers/Avatar/AvatarWithEdit.tsx b/app/containers/Avatar/AvatarWithEdit.tsx index 892f439c1d..a3bcca44c8 100644 --- a/app/containers/Avatar/AvatarWithEdit.tsx +++ b/app/containers/Avatar/AvatarWithEdit.tsx @@ -13,7 +13,7 @@ import sharedStyles from '../../views/Styles'; const styles = StyleSheet.create({ editAvatarButton: { - marginTop: 8, + marginTop: 16, paddingVertical: 8, paddingHorizontal: 12, marginBottom: 0, @@ -67,6 +67,7 @@ const AvatarWithEdit = ({ /> {handleEdit && serverVersion && compareServerVersion(serverVersion, 'greaterThanOrEqualTo', '3.6.0') ? (