-
-
Notifications
You must be signed in to change notification settings - Fork 344
feat(feedback): Report a Bug button #4378
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
Merged
antonis
merged 154 commits into
feedback-ui-2
from
antonis/4358-Feedback-Form-Autoinject-Button
Apr 7, 2025
Merged
Changes from all commits
Commits
Show all changes
154 commits
Select commit
Hold shift + click to select a range
817eac8
Update the client implementation to use the new capture feedback js api
antonis 5370a99
Updates SDK API
antonis 42e2fa1
Adds new feedback button in the sample
antonis 514b102
Adds changelog
antonis 0935bbd
Removes unused mock
antonis 9ea5496
Update CHANGELOG.md
antonis da0d4ac
Directly use captureFeedback from sentry/core
antonis 3e36c6d
Use import from core
antonis 5f3df64
Fixes imports order lint issue
antonis 71b28e8
Fixes build issue
antonis f9d2b59
Adds captureFeedback tests from sentry-javascript
antonis d05d531
Update CHANGELOG.md
krystofwoldrich 2bb104b
Only deprecate client captureUserFeedback
antonis 4339274
Add simple form UI
antonis 6ce799b
Adds basic form functionality
antonis f2cefc6
Update imports
antonis 694ee33
Update imports
antonis 18b1c33
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis 034efde
Remove useState hook to avoid multiple react instances issues
antonis 67a492d
Move types and styles in different files
antonis 8eaa61d
Removes attachment button to be added back separately along with the …
antonis 0b88cc5
Add basic field validation
antonis ae11b8d
Adds changelog
antonis 7f2ca06
Updates changelog
antonis 064b6c4
Updates changelog
antonis e2add4a
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis e21718a
Trim whitespaces from the submitted feedback
antonis 407f179
Adds tests
antonis 14ac005
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis ddade00
Renames FeedbackFormScreen to FeedbackForm
antonis 1bc1e4c
Add beta label
antonis 7934756
Extract default text to constants
antonis 95e1e0f
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis a169362
Moves constant to a separate file and aligns naming with JS
antonis 4b5df7a
Adds input text labels
antonis 4fa81ce
Close screen before sending the feedback to minimise wait time
antonis 4fff82f
Rename file for consistency
antonis 0258bf2
Flatten configuration hierarchy and clean up
antonis 458ebc2
Align required values with JS
antonis f0e1bef
Use Sentry user email and name when set
antonis b9235f2
Simplifies email validation
antonis 6717a84
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis 39a67bd
Show success alert message
antonis 501a134
Aligns naming with JS and unmounts the form by default
antonis 4b290a2
Use the minimum config without props in the changelog
antonis 7109deb
Adds development not for unimplemented function
antonis c80c5cb
Show email and name conditionally
antonis 8c56753
Adds sentry branding (png logo)
antonis d6e9229
Adds sentry logo resource
antonis 5292475
Add assets in module exports
antonis efd809f
Revert "Add assets in module exports"
antonis bc7ae65
Revert "Adds sentry logo resource"
antonis 79ee5ba
Revert "Adds sentry branding (png logo)"
antonis ba13320
Add last event id
antonis 1f5fb56
Mock lastEventId
antonis 439367a
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis 9831482
Adds beta note in the changelog
antonis d92ea89
Autoinject feedback form
antonis 4097347
Updates changelog
antonis f8a82fd
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis 8b9f4d5
Merge branch 'antonis/3859-newCaptureFeedbackAPI-Form' into antonis/4…
antonis 30a7b10
Align colors with JS
antonis 3eccf25
Update CHANGELOG.md
antonis bc96fce
Update CHANGELOG.md
antonis 995a9ca
Update CHANGELOG.md
antonis 3aacaf7
Use regular fonts for both buttons
antonis 20e3a6c
Merge branch 'antonis/3859-newCaptureFeedbackAPI-Form' of https://git…
antonis 78e412c
Handle keyboard properly
antonis c45a5e6
Adds an option on whether the email should be validated
antonis 6e39119
Merge properties only once
antonis 57d99e9
Loads current user data on form construction
antonis 6fb8ab4
Remove unneeded extra padding
antonis fd2e317
Fix background color issue
antonis 0261e04
Merge branch 'antonis/3859-newCaptureFeedbackAPI-Form' into antonis/4…
antonis d4168c1
Adds feedback button
antonis 5a9c02d
Updates the changelog
antonis b793937
Fixes changelog typo
antonis b209ad6
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis 4408071
Merge branch 'antonis/3859-newCaptureFeedbackAPI-Form' into antonis/4…
antonis bdee51b
Merge branch 'antonis/4358-Feedback-Form-Autoinject' into antonis/435…
antonis a40fde6
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis 2a8f13f
Updates styles background color
antonis 0f3a244
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis 9a96e74
Use defaultProps
antonis 10c1c0e
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis 2be08a6
Correct defaultProps
antonis 0588552
Adds test to verify when getUser is called
antonis 89c66d3
Merge branch 'antonis/3859-newCaptureFeedbackAPI-Form' into antonis/4…
antonis 851b63e
Merge branch 'antonis/4358-Feedback-Form-Autoinject' into antonis/435…
antonis f05497c
Use smaller image
antonis 0eb4f68
Add margin next to the icon
antonis fbc8f77
Adds bottom spacing in the ErrorScreen so that the feedback button do…
antonis e0ec92d
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis fada0fb
Merge branch 'antonis/3859-newCaptureFeedbackAPI-Form' into antonis/4…
antonis 2d30fd7
Merge branch 'antonis/4358-Feedback-Form-Autoinject' into antonis/435…
antonis 265e629
(2.2) feat: Add Feedback Form UI Branding logo (#4357)
antonis da0e3ea
Autoinject feedback form (#4370)
antonis a931ba9
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis 5de8841
Merge branch 'antonis/3859-newCaptureFeedbackAPI-Form' into antonis/4…
antonis 5f9dec6
Align changelog entry
antonis 8359696
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis 1e8aa8f
Merge branch 'antonis/3859-newCaptureFeedbackAPI-Form' into antonis/4…
antonis 76518cc
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis cabd570
Merge branch 'antonis/3859-newCaptureFeedbackAPI-Form' into antonis/4…
antonis b0384ed
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis 61886c2
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis 9853630
Update changelog
antonis 209a29b
Merge branch 'antonis/3859-newCaptureFeedbackAPI-Form' into antonis/4…
antonis fe3dc15
Disable bouncing
antonis 72eef2d
Add modal ui appearance
antonis ccc808b
Update snapshot tests
antonis fd47fd2
Fix bottom margin
antonis dcc5d3b
Merge branch 'feedback-ui' into antonis/feedback-modal-ui
antonis 9ecd8a2
Fix sheet height
antonis 05f94f8
Remove extra modal border
antonis d88a599
Do not expose modal styles
antonis ce1de86
Animate background color
antonis a7a4e56
Avoid keyboard in modal
antonis 22fd47b
Merge branch 'feedback-ui' into antonis/4358-Feedback-Form-Autoinject…
antonis 8779886
Merge branch 'feedback-ui' into antonis/feedback-modal-ui
antonis 7832765
Merge branch 'antonis/feedback-modal-ui' into antonis/4358-Feedback-F…
antonis 447e3fe
Update changelog
antonis 47f0fc4
Fix changelog
antonis 63bfc6d
Updates comment
antonis 6f60162
Extract FeedbackButtonProps
antonis ae80f7d
Merge branch 'feedback-ui' into antonis/feedback-modal-ui
antonis 079a436
Merge branch 'antonis/feedback-modal-ui' into antonis/4358-Feedback-F…
antonis 3e5be69
Merge branch 'feedback-ui' into antonis/4358-Feedback-Form-Autoinject…
antonis 0dc5f27
Merge branch 'feedback-ui' into antonis/4358-Feedback-Form-Autoinject…
antonis f80a48d
Merge branch 'feedback-ui' into antonis/4358-Feedback-Form-Autoinject…
antonis b3eec7e
Merge branch 'feedback-ui' into antonis/4358-Feedback-Form-Autoinject…
antonis a79951c
Merge branch 'feedback-ui' into antonis/4358-Feedback-Form-Autoinject…
antonis b08debb
Merge branch 'feedback-ui-2' into antonis/4358-Feedback-Form-Autoinje…
antonis e601785
Add public function description to satisfy lint check
antonis 2e0e5d2
Adds tests
antonis 2620101
Merge branch 'feedback-ui-2' into antonis/4358-Feedback-Form-Autoinje…
antonis 9f631e2
Fix tests
antonis 90402cb
Merge branch 'feedback-ui-2' into antonis/4358-Feedback-Form-Autoinje…
antonis 307839d
Merge branch 'feedback-ui-2' into antonis/4358-Feedback-Form-Autoinje…
antonis 2fbbf11
Include in the feedback integration
antonis bae1620
Fix circular dependency
antonis be791cd
Remove unneeded line
antonis 13de5af
Merge branch 'feedback-ui-2' into antonis/4358-Feedback-Form-Autoinje…
antonis 04f1a8d
Place widget button below the feedback widget shadow
antonis 06adadd
Expose showFeedbackButton/hideFeedbackButton methods
antonis 7473c58
Add dummy integration for tracking usage
antonis 24b3df0
Adds button border
antonis 10a70a3
Fixes tests
antonis b3fe27c
Merge branch 'feedback-ui-2' into antonis/4358-Feedback-Form-Autoinje…
antonis fc01d8c
Rename FeedbackButtonProps in tests for clarity
antonis cbff8fa
Add missing function call in test
antonis 28efb28
Merge branch 'antonis/4358-Feedback-Form-Autoinject-Button' of https:…
antonis e89edea
Adds missing semicolon in test
antonis 722114d
Adds feedback button in expo app
antonis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import * as React from 'react'; | ||
import { Image, Text, TouchableOpacity } from 'react-native'; | ||
|
||
import { defaultButtonConfiguration } from './defaults'; | ||
import { defaultButtonStyles } from './FeedbackWidget.styles'; | ||
import type { FeedbackButtonProps, FeedbackButtonStyles, FeedbackButtonTextConfiguration } from './FeedbackWidget.types'; | ||
import { feedbackIcon } from './icons'; | ||
import { lazyLoadFeedbackIntegration } from './lazy'; | ||
|
||
const showFeedbackWidget = (): void => { | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const { showFeedbackWidget } = require('./FeedbackWidgetManager'); | ||
showFeedbackWidget(); | ||
}; | ||
|
||
/** | ||
* @beta | ||
* Implements a feedback button that opens the FeedbackForm. | ||
*/ | ||
export class FeedbackButton extends React.Component<FeedbackButtonProps> { | ||
public constructor(props: FeedbackButtonProps) { | ||
super(props); | ||
lazyLoadFeedbackIntegration(); | ||
} | ||
|
||
/** | ||
* Renders the feedback button. | ||
*/ | ||
public render(): React.ReactNode { | ||
const text: FeedbackButtonTextConfiguration = { ...defaultButtonConfiguration, ...this.props }; | ||
const styles: FeedbackButtonStyles = { | ||
triggerButton: { ...defaultButtonStyles.triggerButton, ...this.props.styles?.triggerButton }, | ||
triggerText: { ...defaultButtonStyles.triggerText, ...this.props.styles?.triggerText }, | ||
triggerIcon: { ...defaultButtonStyles.triggerIcon, ...this.props.styles?.triggerIcon }, | ||
}; | ||
|
||
return ( | ||
<TouchableOpacity | ||
style={styles.triggerButton} | ||
onPress={showFeedbackWidget} | ||
accessibilityLabel={text.triggerAriaLabel} | ||
> | ||
<Image source={{ uri: feedbackIcon }} style={styles.triggerIcon}/> | ||
<Text style={styles.triggerText}>{text.triggerLabel}</Text> | ||
</TouchableOpacity> | ||
); | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export const feedbackIcon = | ||
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAAk1BMVEUAAAAqIDEqIjMmIDArIjIrIjMoHjErITMrIjMqITIqITIqITIqIjIqITIqITIhHi4qITIqITIeAConHi8rITMqITIqITIcHCopITIpIDEpIDIlGC8qITIqITIpIDIpHjAqITIqIDIqIDEqIDAqITInHjAqIDIqIDEqITIqITIqIDIiFCgpIDEqITIoHS8qIDIrIjMN1S0HAAAAMHRSTlMAhnknzMQy1zyF6/H55PYQ0rIGGPudjAmUTEQUv7p2K6lmWDZxHV9S36J+DD7bI208pRBPAAAGrUlEQVR42uzd6XLaMBSG4Y/YhuAVbAwx+xp2eu7/6tq0nfaHIAizSNbR+5vJJM8EG45lGfrm7EZRSNL5bvcAg1oM6fZaBQxp/0HlylOY0PuRyjbco/L1unRHbVS9RYPuaoxKlzY7dF9xhgpXb9Hd1VDddiHdX4SqNnHpIU1QzcYhPaY5qpjj0aNaooL9iOlhvaFynYZEnAFmAXEGWI2IOAN8BsQZIGsTcQaY+0SMAQZT+hVfgLVPX3EFSLb0J6YARUR/YwmQ5PQvjgD9DcmWJ7hUraoANwy9owIwDuCGofc2gXEANwy9/TVgHMANQ+/pAMYBpLUOSebPAeMAbhh6tzOYByA/9A4+AeMAbhh6j1YwD0B+6B3MAOMAbhh6D09QAdCvtT33ecUkWfwDeD1Ab+yTHnknKABYHEmPwjGgAKAISY/cCVQAvGvy94c7QAVAEpEWtepQA/BBOtRppngYwDaDfAMt3gCNBVAeQKzxUciC/iAN6vZwJ4BYsC0gU5uUd3wHHgAgFu0yXE39IfCjhwcBiHWmE1yJFLfpA+UBJJpOtAbI93gwgFieaQsQFcDzAShYagqwTfAUADF3oiGAvwZeBUD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DcSAGn3hoGhiQDAYSM/MDQSAPv8hqfwmggArH35JwQaCYBBW35gaCQA8BnIDwyNBMBqKD8wNBIAWMbyA0MjATBx5QeGRgIgbXbkB4YmAgCLI91flQHQ+z+H4QkA9CP6E1cAJFP6HVsAYO7TrxgD/HkMEGcAYBYzB8DJYw4AvIXMAVBvMQdA2mUOABw2zAHEgWH5xpUEAAqfHtO8ogDCwLBsk6oCCAPDckWoLoAwMCxTt8oAwsDw9uJVtQHguPeeBCsOIAwMb2uEygMAiwaVbZiYAFB+YJinMAIAWAzp9loFYAoA4OxGUUjS+W73AJgEUCILYAEsgAWwABbAAlgAC2ABLIAFsAAWwAJYAAtgASyABbAAFsACWAALYAEsgAWwABbAAlgAC2ABLIAFsAAWwAKUANg2r+WZDSCRBbAAFsAC/GyfXlIYhIIgitYgGHhoiMmDSPyAgqKz2v/qxIkL0JoU9NlB3+6OABEgAkSACBABnAP0FMvwslGsgpeBYjW8FBQbYeZNqbKFmYlSDex0FEp2BwB8V8rkPwwViSJ5gaX5QYlkuf/DZ0i8rWwM///0m7bni5flqh5dxt8BPG/wrQSMUX8AAAAASUVORK5CYII='; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The cyclic dependency is properly fixed with a small refactoring in a followup PR #4718