Skip to content

Commit bcaa805

Browse files
committed
all the feedback2 stuff
1 parent 7650483 commit bcaa805

31 files changed

+1788
-891
lines changed

packages/core/src/baseclient.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,12 @@ export abstract class BaseClient<O extends ClientOptions> implements Client<O> {
490490
callback: (feedback: FeedbackEvent, options?: { includeReplay: boolean }) => void,
491491
): void;
492492

493+
/** @inheritdoc */
494+
public on(
495+
hook: 'createFeedbackModal',
496+
callback: (options: Record<string, unknown>, appendChild: (child: HTMLElement) => void) => void,
497+
): void;
498+
493499
/** @inheritdoc */
494500
public on(hook: 'startPageLoadSpan', callback: (options: StartSpanOptions) => void): void;
495501

@@ -536,6 +542,13 @@ export abstract class BaseClient<O extends ClientOptions> implements Client<O> {
536542
/** @inheritdoc */
537543
public emit(hook: 'beforeSendFeedback', feedback: FeedbackEvent, options?: { includeReplay: boolean }): void;
538544

545+
/** @inheritdoc */
546+
public emit(
547+
hook: 'createFeedbackModal',
548+
options: Record<string, unknown>,
549+
appendChild: (child: HTMLElement) => void,
550+
): void;
551+
539552
/** @inheritdoc */
540553
public emit(hook: 'startPageLoadSpan', options: StartSpanOptions): void;
541554

packages/feedback-async/src/types/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ export interface FeedbackGeneralConfiguration {
8080
email: string;
8181
name: string;
8282
};
83-
84-
// getScreenshotIntegration: () => Integration;
8583
}
8684

8785
/**

packages/feedback2-modal/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"access": "public"
3030
},
3131
"dependencies": {
32-
"@sentry-internal/feedback-screenshot": "7.100.0",
3332
"@sentry/core": "7.100.0",
3433
"@sentry/types": "7.100.0",
3534
"@sentry/utils": "7.100.0",

packages/feedback2-modal/src/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ import { GLOBAL_OBJ } from '@sentry/utils';
44
// prevents the browser package from being bundled in the CDN bundle, and avoids a
55
// circular dependency between the browser and feedback packages
66
export const WINDOW = GLOBAL_OBJ as typeof GLOBAL_OBJ & Window;
7+
export const DOCUMENT = WINDOW.document;

packages/feedback2/src/constants.ts renamed to packages/feedback2-modal/src/constants/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ import { GLOBAL_OBJ } from '@sentry/utils';
44
// prevents the browser package from being bundled in the CDN bundle, and avoids a
55
// circular dependency between the browser and feedback packages
66
export const WINDOW = GLOBAL_OBJ as typeof GLOBAL_OBJ & Window;
7+
export const DOCUMENT = WINDOW.document;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
declare const __DEBUG_BUILD__: boolean;
2+
3+
/**
4+
* This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.
5+
*
6+
* ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.
7+
*/
8+
export const DEBUG_BUILD = __DEBUG_BUILD__;

packages/feedback2-modal/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export {
22
// eslint-disable-next-line deprecation/deprecation
3-
FeedbackAsync,
4-
feedbackAsyncIntegration,
3+
Feedback2Modal,
4+
feedback2ModalIntegration,
55
} from './integration';

0 commit comments

Comments
 (0)