-
-
Notifications
You must be signed in to change notification settings - Fork 338
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
(2.2) feat: Add Feedback Form UI Branding logo #4357
base: antonis/3859-newCaptureFeedbackAPI-Form
Are you sure you want to change the base?
Changes from 5 commits
b6953a3
d22d660
c02d84f
61e4d4d
fbb402b
bb79879
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ import { captureFeedback, lastEventId } from '@sentry/core'; | |
import type { SendFeedbackParams } from '@sentry/types'; | ||
import * as React from 'react'; | ||
import type { KeyboardTypeOptions } from 'react-native'; | ||
import { Alert, Text, TextInput, TouchableOpacity, View } from 'react-native'; | ||
import { Alert, Image, Text, TextInput, TouchableOpacity, View } from 'react-native'; | ||
|
||
import { defaultConfiguration } from './defaults'; | ||
import defaultStyles from './FeedbackForm.styles'; | ||
|
@@ -80,7 +80,16 @@ export class FeedbackForm extends React.Component<FeedbackFormProps, FeedbackFor | |
|
||
return ( | ||
<View style={styles.container}> | ||
<Text style={styles.title}>{text.formTitle}</Text> | ||
<View style={styles.titleContainer}> | ||
<Text style={styles.title}>{text.formTitle}</Text> | ||
{config.showBranding && ( | ||
<Image | ||
source={{ uri: 'https://sentry-brand.storage.googleapis.com/sentry-glyph-black.png' }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's include logo locally. I'm not sure who in Sentry owns this storage but it could be gone any time. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a good point @krystofwoldrich 👍 |
||
style={styles.sentryLogo} | ||
testID='sentry-logo' | ||
/> | ||
)} | ||
</View> | ||
|
||
{config.showName && ( | ||
<> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use an svg image?
from here: https://sentry.io/branding/
we could have an SVG image, like this one:
I like the idea of using the svg icon because it's easy to customize the logo color, so if a user decides to use a dark theme, the Sentry logo will not be hidden (by that we would need to allow them to change the sentry color or maybe some logic to know if the background color is dark or bright)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point. I defaulted to PNG due to the discussion with @krystofwoldrich on the form PR.
I think that using an svg directly might require a library which I'm not sure we want to import in core 🤔
Maybe I can try using a JSX with a convertor like https://www.svgviewer.dev/svg-to-react-jsx. Wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't use SVG, because there is no out of the box support and we can't add dependency just to render our logo and vendoring a library would also not work due to size and potential build issues.
https://www.svgviewer.dev/svg-to-react-jsx would work only for web