Skip to content

Commit

Permalink
[Freestyler] And dogfood info link
Browse files Browse the repository at this point in the history
Adds the link to a `help` icon.
Also remove the `bug` icon

Bug: 348123586
Change-Id: Id5db2e10b8a586cd5f8e3aa735bbb299430c826e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5677362
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org>
Reviewed-by: Ergün Erdoğmuş <ergunsh@chromium.org>
Auto-Submit: Nikolay Vitkov <nvitkov@chromium.org>
Commit-Queue: Ergün Erdoğmuş <ergunsh@chromium.org>
  • Loading branch information
Lightning00Blade authored and Devtools-frontend LUCI CQ committed Jul 5, 2024
1 parent 2d68150 commit f4b4722
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions front_end/panels/freestyler/FreestylerPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import * as LitHtml from '../../ui/lit-html/lit-html.js';

import {
ChatMessageEntity,
DOGFOOD_FEEDBACK_URL,
FreestylerChatUi,
type ModelChatMessage,
type Props as FreestylerChatUiProps,
Expand All @@ -21,6 +20,8 @@ import {
import {FIX_THIS_ISSUE_PROMPT, FreestylerAgent, Step} from './FreestylerAgent.js';
import freestylerPanelStyles from './freestylerPanel.css.js';

const DOGFOOD_INFO = ' https://goo.gle/freestyler-dogfood' as Platform.DevToolsPath.UrlString;

/*
* TODO(nvitkov): b/346933425
* Temporary string that should not be translated
Expand Down Expand Up @@ -68,12 +69,12 @@ function createToolbar(target: HTMLElement, {onClearClick}: {onClearClick: () =>
leftToolbar.appendToolbarItem(clearButton);

rightToolbar.appendSeparator();
const feedbackButton =
new UI.Toolbar.ToolbarButton(i18nString(TempUIStrings.sendFeedback), 'bug', undefined, 'freestyler.feedback');
feedbackButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => {
Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(DOGFOOD_FEEDBACK_URL);
const helpButton =
new UI.Toolbar.ToolbarButton(i18nString(TempUIStrings.sendFeedback), 'help', undefined, 'freestyler.feedback');
helpButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => {
Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(DOGFOOD_INFO);
});
rightToolbar.appendToolbarItem(feedbackButton);
rightToolbar.appendToolbarItem(helpButton);
}

function defaultView(input: FreestylerChatUiProps, output: ViewOutput, target: HTMLElement): void {
Expand Down
2 changes: 1 addition & 1 deletion front_end/panels/freestyler/components/FreestylerChatUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {type ActionStepData, type CommonStepData, Step, type StepData} from '../

import freestylerChatUiStyles from './freestylerChatUi.css.js';

export const DOGFOOD_FEEDBACK_URL = 'https://goo.gle/freestyler-feedback' as Platform.DevToolsPath.UrlString;
const DOGFOOD_FEEDBACK_URL = 'https://goo.gle/freestyler-feedback' as Platform.DevToolsPath.UrlString;

/*
* TODO(nvitkov): b/346933425
Expand Down

0 comments on commit f4b4722

Please sign in to comment.