Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/app/components/chat/chat.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,16 @@
></app-trace-event>
</div>
}
@if (isDeveloperUiDisclaimerEnabledObs | async) {
<div
class="adk-web-developer-ui-disclaimer"
[matTooltip]="i18n.disclosureTooltip"
matTooltipPosition="left"
style="align-self: flex-end"
>
{{i18n.adkWebDeveloperUiMessage}}
</div>
}
</div>
}
</mat-drawer-container>
3 changes: 3 additions & 0 deletions src/app/components/chat/chat.component.i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ export const CHAT_MESSAGES = {
cannotEditSessionMessage:
'Chat is disabled to prevent changes to the end user\'s session.',
readOnlyBadgeLabel: 'Read-only',
disclosureTooltip:
'ADK Web is for development purposes. It has access to all the data and should not be used in production.',
adkWebDeveloperUiMessage: 'ADK Web Developer UI',
};

/**
Expand Down
7 changes: 7 additions & 0 deletions src/app/components/chat/chat.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -735,3 +735,10 @@ app-canvas {
font-weight: 400;
padding-left: unset;
}

.adk-web-developer-ui-disclaimer {
padding-left: 4px;
padding-bottom: 4px;
font-size: 10px;
color: var(--adk-web-text-color-light-gray);
}
2 changes: 2 additions & 0 deletions src/app/components/chat/chat.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ export class ChatComponent implements OnInit, AfterViewInit, OnDestroy {
this.featureFlagService.isDeleteSessionEnabled();
readonly isUserIdOnToolbarEnabledObs: Observable<boolean> =
this.featureFlagService.isUserIdOnToolbarEnabled();
readonly isDeveloperUiDisclaimerEnabledObs: Observable<boolean> =
this.featureFlagService.isDeveloperUiDisclaimerEnabled();

// Trace detail
bottomPanelVisible = false;
Expand Down
4 changes: 4 additions & 0 deletions src/app/core/services/feature-flag.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ export class FeatureFlagService implements FeatureFlagServiceInterface {
return of(true);
}

isDeveloperUiDisclaimerEnabled(): Observable<boolean> {
return of(true);
}

isFeedbackServiceEnabled(): Observable<boolean> {
return of(false);
}
Expand Down
1 change: 1 addition & 0 deletions src/app/core/services/interfaces/feature-flag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,6 @@ export declare abstract class FeatureFlagService {
abstract isSessionFilteringEnabled(): Observable<boolean>;
abstract isSessionReloadOnNewMessageEnabled(): Observable<boolean>;
abstract isUserIdOnToolbarEnabled(): Observable<boolean>;
abstract isDeveloperUiDisclaimerEnabled(): Observable<boolean>;
abstract isFeedbackServiceEnabled(): Observable<boolean>;
}
4 changes: 4 additions & 0 deletions src/app/core/services/testing/mock-feature-flag.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ export class MockFeatureFlagService implements FeatureFlagService {
isUserIdOnToolbarEnabled =
jasmine.createSpy('isUserIdOnToolbarEnabled')
.and.returnValue(this.isUserIdOnToolbarEnabledResponse);
isDeveloperUiDisclaimerEnabledResponse = new ReplaySubject<boolean>(1);
isDeveloperUiDisclaimerEnabled =
jasmine.createSpy('isDeveloperUiDisclaimerEnabled')
.and.returnValue(this.isDeveloperUiDisclaimerEnabledResponse);
isFeedbackServiceEnabledResponse = new ReplaySubject<boolean>(1);
isFeedbackServiceEnabled =
jasmine.createSpy('isFeedbackServiceEnabled')
Expand Down
3 changes: 2 additions & 1 deletion src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ html.dark-theme {
// Expansion panel text color for dark theme
--mat-expansion-container-text-color: #e8eaed;
--mat-expansion-header-text-color: #e8eaed;
--adk-web-text-color-light-gray: #c4c7c5;
}

// Light theme custom properties
Expand Down Expand Up @@ -170,6 +171,7 @@ html.light-theme {
// Expansion panel text color for light theme
--mat-expansion-container-text-color: #202124;
--mat-expansion-header-text-color: #202124;
--adk-web-text-color-light-gray: #c4c7c5;
}

// Dark theme dialog overrides
Expand Down Expand Up @@ -842,7 +844,6 @@ html.light-theme {
// Tooltip styling to prevent overlap
.mat-mdc-tooltip {
z-index: 10000 !important;
white-space: nowrap;
max-width: 300px;
}

Expand Down