diff --git a/packages/core/src/types-hoist/feedback/config.ts b/packages/core/src/types-hoist/feedback/config.ts index 49bc7231e9e2..f6a90c7c5b73 100644 --- a/packages/core/src/types-hoist/feedback/config.ts +++ b/packages/core/src/types-hoist/feedback/config.ts @@ -176,6 +176,21 @@ export interface FeedbackTextConfiguration { * The label for the button that removes a screenshot and hides the image editor */ removeScreenshotButtonLabel: string; + + /** + * The label for the button that highlights portions ofthe screenshot + */ + highlightToolText: string; + + /** + * The label for the button that hides portions of the screenshot + */ + hideToolText: string; + + /** + * The label for the button that removed a highlight/hidden section of the screenshot. + */ + removeHighlightText: string; } /** diff --git a/packages/feedback/src/constants/index.ts b/packages/feedback/src/constants/index.ts index 198b6e199bb5..d18392258417 100644 --- a/packages/feedback/src/constants/index.ts +++ b/packages/feedback/src/constants/index.ts @@ -22,6 +22,9 @@ export const SUCCESS_MESSAGE_TEXT = 'Thank you for your report!'; export const IS_REQUIRED_LABEL = '(required)'; export const ADD_SCREENSHOT_LABEL = 'Add a screenshot'; export const REMOVE_SCREENSHOT_LABEL = 'Remove screenshot'; +export const HIGHLIGHT_TOOL_TEXT = 'Highlight'; +export const HIDE_TOOL_TEXT = 'Hide'; +export const REMOVE_HIGHLIGHT_TEXT = 'Remove'; export const FEEDBACK_WIDGET_SOURCE = 'widget'; export const FEEDBACK_API_SOURCE = 'api'; diff --git a/packages/feedback/src/core/integration.ts b/packages/feedback/src/core/integration.ts index d70f563b6136..87ab62cfec1b 100644 --- a/packages/feedback/src/core/integration.ts +++ b/packages/feedback/src/core/integration.ts @@ -1,3 +1,5 @@ +/* eslint-disable max-lines */ + import type { FeedbackInternalOptions, FeedbackModalIntegration, @@ -14,11 +16,14 @@ import { EMAIL_LABEL, EMAIL_PLACEHOLDER, FORM_TITLE, + HIDE_TOOL_TEXT, + HIGHLIGHT_TOOL_TEXT, IS_REQUIRED_LABEL, MESSAGE_LABEL, MESSAGE_PLACEHOLDER, NAME_LABEL, NAME_PLACEHOLDER, + REMOVE_HIGHLIGHT_TEXT, REMOVE_SCREENSHOT_LABEL, SUBMIT_BUTTON_LABEL, SUCCESS_MESSAGE_TEXT, @@ -110,6 +115,9 @@ export const buildFeedbackIntegration = ({ successMessageText = SUCCESS_MESSAGE_TEXT, triggerLabel = TRIGGER_LABEL, triggerAriaLabel = '', + highlightToolText = HIGHLIGHT_TOOL_TEXT, + hideToolText = HIDE_TOOL_TEXT, + removeHighlightText = REMOVE_HIGHLIGHT_TEXT, // FeedbackCallbacks onFormOpen, @@ -152,6 +160,9 @@ export const buildFeedbackIntegration = ({ isRequiredLabel, addScreenshotButtonLabel, removeScreenshotButtonLabel, + highlightToolText, + hideToolText, + removeHighlightText, onFormClose, onFormOpen, diff --git a/packages/feedback/src/screenshot/components/ScreenshotEditor.tsx b/packages/feedback/src/screenshot/components/ScreenshotEditor.tsx index 083f5c16dec6..8995566fa8c2 100644 --- a/packages/feedback/src/screenshot/components/ScreenshotEditor.tsx +++ b/packages/feedback/src/screenshot/components/ScreenshotEditor.tsx @@ -310,7 +310,7 @@ export function ScreenshotEditorFactory({ }} >