Skip to content

Commit

Permalink
Revert "Adds sentry branding (png logo)"
Browse files Browse the repository at this point in the history
This reverts commit 8c56753.
  • Loading branch information
antonis committed Dec 11, 2024
1 parent bc7ae65 commit 79ee5ba
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 36 deletions.
11 changes: 1 addition & 10 deletions packages/core/src/js/feedback/FeedbackForm.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ const defaultStyles: FeedbackFormStyles = {
fontSize: 24,
fontWeight: 'bold',
marginBottom: 20,
textAlign: 'left',
flex: 1,
textAlign: 'center',
},
label: {
marginBottom: 4,
Expand Down Expand Up @@ -50,14 +49,6 @@ const defaultStyles: FeedbackFormStyles = {
color: '#6a1b9a',
fontSize: 16,
},
titleContainer: {
flexDirection: 'row',
width: '100%',
},
sentryLogo: {
width: 40,
height: 40,
},
};

export default defaultStyles;
9 changes: 2 additions & 7 deletions packages/core/src/js/feedback/FeedbackForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { captureFeedback } from '@sentry/core';
import type { SendFeedbackParams } from '@sentry/types';
import * as React from 'react';
import type { KeyboardTypeOptions } from 'react-native';
import { Alert, Image, Text, TextInput, TouchableOpacity, View } from 'react-native';
import { Alert, Text, TextInput, TouchableOpacity, View } from 'react-native';

import { defaultConfiguration } from './defaults';
import defaultStyles from './FeedbackForm.styles';
Expand Down Expand Up @@ -78,12 +78,7 @@ export class FeedbackForm extends React.Component<FeedbackFormProps, FeedbackFor

return (
<View style={styles.container}>
<View style={styles.titleContainer}>
<Text style={styles.title}>{text.formTitle}</Text>
{config.showBranding && (
<Image source={require('../../../assets/sentrylogo.png')} style={styles.sentryLogo} />
)}
</View>
<Text style={styles.title}>{text.formTitle}</Text>

{config.showName && (
<>
Expand Down
18 changes: 1 addition & 17 deletions packages/core/src/js/feedback/FeedbackForm.types.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import type { ImageStyle, TextStyle, ViewStyle } from 'react-native';
import type { TextStyle, ViewStyle } from 'react-native';

/**
* The props for the feedback form
*/
export interface FeedbackFormProps extends FeedbackGeneralConfiguration, FeedbackTextConfiguration, FeedbackCallbacks {
styles?: FeedbackFormStyles;
}
Expand All @@ -11,11 +8,6 @@ export interface FeedbackFormProps extends FeedbackGeneralConfiguration, Feedbac
* General feedback configuration
*/
export interface FeedbackGeneralConfiguration {
/**
* Show the Sentry branding
*/
showBranding?: boolean;

/**
* Should the email field be required?
*/
Expand Down Expand Up @@ -131,9 +123,6 @@ export interface FeedbackCallbacks {
onFormClose?: () => void;
}

/**
* The styles for the feedback form
*/
export interface FeedbackFormStyles {
container?: ViewStyle;
title?: TextStyle;
Expand All @@ -144,13 +133,8 @@ export interface FeedbackFormStyles {
submitText?: TextStyle;
cancelButton?: ViewStyle;
cancelText?: TextStyle;
titleContainer?: ViewStyle;
sentryLogo?: ImageStyle;
}

/**
* The state of the feedback form
*/
export interface FeedbackFormState {
isVisible: boolean;
name: string;
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/js/feedback/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export const defaultConfiguration: Partial<FeedbackFormProps> = {
},

// FeedbackGeneralConfiguration
showBranding: true,
isEmailRequired: false,
isNameRequired: false,
showEmail: true,
Expand Down
1 change: 0 additions & 1 deletion packages/core/test/feedback/FeedbackForm.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ const defaultProps: FeedbackFormProps = {
formError: 'Please fill out all required fields.',
emailError: 'The email address is not valid.',
successMessageText: 'Feedback success',
showBranding: false,
};

describe('FeedbackForm', () => {
Expand Down

0 comments on commit 79ee5ba

Please sign in to comment.