Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: disable slide gesture around confirm slider button #3240

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/graphql/generated.gql
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,7 @@ query StatefulNotifications($after: String) {
deepLink
createdAt
acknowledgedAt
addToBulletin
__typename
}
pageInfo {
Expand Down
7 changes: 6 additions & 1 deletion app/graphql/generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,7 @@ export type Mutation = {
readonly quizClaim: QuizClaimPayload;
readonly statefulNotificationAcknowledge: StatefulNotificationAcknowledgePayload;
readonly supportChatMessageAdd: SupportChatMessageAddPayload;
readonly supportChatReset: SuccessPayload;
/** @deprecated will be moved to AccountContact */
readonly userContactUpdateAlias: UserContactUpdateAliasPayload;
readonly userEmailDelete: UserEmailDeletePayload;
Expand Down Expand Up @@ -1814,6 +1815,7 @@ export type SettlementViaOnChain = {
export type StatefulNotification = {
readonly __typename: 'StatefulNotification';
readonly acknowledgedAt?: Maybe<Scalars['Timestamp']['output']>;
readonly addToBulletin: Scalars['Boolean']['output'];
readonly body: Scalars['String']['output'];
readonly createdAt: Scalars['Timestamp']['output'];
readonly deepLink?: Maybe<Scalars['String']['output']>;
Expand Down Expand Up @@ -2621,7 +2623,7 @@ export type StatefulNotificationsQueryVariables = Exact<{
}>;


export type StatefulNotificationsQuery = { readonly __typename: 'Query', readonly me?: { readonly __typename: 'User', readonly statefulNotifications: { readonly __typename: 'StatefulNotificationConnection', readonly nodes: ReadonlyArray<{ readonly __typename: 'StatefulNotification', readonly id: string, readonly title: string, readonly body: string, readonly deepLink?: string | null, readonly createdAt: number, readonly acknowledgedAt?: number | null }>, readonly pageInfo: { readonly __typename: 'PageInfo', readonly endCursor?: string | null, readonly hasNextPage: boolean, readonly hasPreviousPage: boolean, readonly startCursor?: string | null } } } | null };
export type StatefulNotificationsQuery = { readonly __typename: 'Query', readonly me?: { readonly __typename: 'User', readonly statefulNotifications: { readonly __typename: 'StatefulNotificationConnection', readonly nodes: ReadonlyArray<{ readonly __typename: 'StatefulNotification', readonly id: string, readonly title: string, readonly body: string, readonly deepLink?: string | null, readonly createdAt: number, readonly acknowledgedAt?: number | null, readonly addToBulletin: boolean }>, readonly pageInfo: { readonly __typename: 'PageInfo', readonly endCursor?: string | null, readonly hasNextPage: boolean, readonly hasPreviousPage: boolean, readonly startCursor?: string | null } } } | null };

export type StatefulNotificationAcknowledgeMutationVariables = Exact<{
input: StatefulNotificationAcknowledgeInput;
Expand Down Expand Up @@ -4821,6 +4823,7 @@ export const StatefulNotificationsDocument = gql`
deepLink
createdAt
acknowledgedAt
addToBulletin
}
pageInfo {
endCursor
Expand Down Expand Up @@ -8825,6 +8828,7 @@ export type MutationResolvers<ContextType = any, ParentType extends ResolversPar
quizClaim?: Resolver<ResolversTypes['QuizClaimPayload'], ParentType, ContextType, RequireFields<MutationQuizClaimArgs, 'input'>>;
statefulNotificationAcknowledge?: Resolver<ResolversTypes['StatefulNotificationAcknowledgePayload'], ParentType, ContextType, RequireFields<MutationStatefulNotificationAcknowledgeArgs, 'input'>>;
supportChatMessageAdd?: Resolver<ResolversTypes['SupportChatMessageAddPayload'], ParentType, ContextType, RequireFields<MutationSupportChatMessageAddArgs, 'input'>>;
supportChatReset?: Resolver<ResolversTypes['SuccessPayload'], ParentType, ContextType>;
userContactUpdateAlias?: Resolver<ResolversTypes['UserContactUpdateAliasPayload'], ParentType, ContextType, RequireFields<MutationUserContactUpdateAliasArgs, 'input'>>;
userEmailDelete?: Resolver<ResolversTypes['UserEmailDeletePayload'], ParentType, ContextType>;
userEmailRegistrationInitiate?: Resolver<ResolversTypes['UserEmailRegistrationInitiatePayload'], ParentType, ContextType, RequireFields<MutationUserEmailRegistrationInitiateArgs, 'input'>>;
Expand Down Expand Up @@ -9120,6 +9124,7 @@ export interface SignedDisplayMajorAmountScalarConfig extends GraphQLScalarTypeC

export type StatefulNotificationResolvers<ContextType = any, ParentType extends ResolversParentTypes['StatefulNotification'] = ResolversParentTypes['StatefulNotification']> = {
acknowledgedAt?: Resolver<Maybe<ResolversTypes['Timestamp']>, ParentType, ContextType>;
addToBulletin?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>;
body?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
createdAt?: Resolver<ResolversTypes['Timestamp'], ParentType, ContextType>;
deepLink?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ gql`
deepLink
createdAt
acknowledgedAt
addToBulletin
}
pageInfo {
endCursor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useState } from "react"
import { ActivityIndicator, TouchableOpacity, View } from "react-native"
import { PanGestureHandler } from "react-native-gesture-handler"
import ReactNativeHapticFeedback from "react-native-haptic-feedback"

import { gql } from "@apollo/client"
Expand Down Expand Up @@ -422,13 +423,18 @@ const SendBitcoinConfirmationScreen: React.FC<Props> = ({ route }) => {
</View>
) : null}
<View style={styles.buttonContainer}>
<GaloySliderButton
isLoading={sendPaymentLoading}
initialText={LL.SendBitcoinConfirmationScreen.slideToConfirm()}
loadingText={LL.SendBitcoinConfirmationScreen.slideConfirming()}
onSwipe={handleSendPayment}
disabled={!validAmount || hasAttemptedSend}
/>
{/* disable slide gestures in area around the slider button */}
<PanGestureHandler>
<View style={styles.sliderContainer}>
<GaloySliderButton
isLoading={sendPaymentLoading}
initialText={LL.SendBitcoinConfirmationScreen.slideToConfirm()}
loadingText={LL.SendBitcoinConfirmationScreen.slideConfirming()}
onSwipe={handleSendPayment}
disabled={!validAmount || hasAttemptedSend}
/>
</View>
</PanGestureHandler>
</View>
</View>
</Screen>
Expand All @@ -442,6 +448,7 @@ const useStyles = makeStyles(({ colors }) => ({
flex: 1,
},
fieldContainer: {
paddingHorizontal: 20,
marginBottom: 12,
},
noteText: {
Expand Down Expand Up @@ -537,7 +544,7 @@ const useStyles = makeStyles(({ colors }) => ({
alignItems: "center",
},
screenStyle: {
padding: 20,
paddingTop: 20,
flexGrow: 1,
},
iconContainer: {
Expand All @@ -560,4 +567,7 @@ const useStyles = makeStyles(({ colors }) => ({
justifyContent: "space-between",
alignItems: "center",
},
sliderContainer: {
padding: 20,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we make it even a bit bigger?

Suggested change
padding: 20,
padding: 32,

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging for now. we can change in a future PR later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this may help.

},
}))
Loading