Skip to content

Commit

Permalink
CCA: Remove introduction nudge for time-lapse
Browse files Browse the repository at this point in the history
Since time-lapse recording is already launched in M117 stable channel,
we can remove the feature introduction nudge in M120.

Bug: chromium:1489810
Test: Manually, tast run $DUT camera.CCAUITimeLapse
Change-Id: If78120dc4212d36ed2c72ea206a8fa602af574e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4937892
Reviewed-by: Chu-Hsuan Yang <chuhsuan@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>
Commit-Queue: Kam Kwankajornkiet <kamchonlathorn@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1209295}
  • Loading branch information
Kam Kwankajornkiet authored and Chromium LUCI CQ committed Oct 13, 2023
1 parent 64ef046 commit 64a8a21
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 58 deletions.
1 change: 0 additions & 1 deletion ash/webui/camera_app_ui/resources.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ const struct {
{"msg_processing_image", IDS_MSG_PROCESSING_IMAGE},
{"msg_processing_video", IDS_MSG_PROCESSING_VIDEO},
{"name", IDS_NAME},
{"new_time_lapse_toast", IDS_NEW_TIME_LAPSE_TOAST},
{"next_page_count", IDS_NEXT_PAGE_COUNT},
{"no_document_guide_msg", IDS_NO_DOCUMENT_GUIDE_MSG},
{"open_grid_panel_button", IDS_OPEN_GRID_PANEL_BUTTON},
Expand Down
21 changes: 0 additions & 21 deletions ash/webui/camera_app_ui/resources/css/custom_toast.css
Original file line number Diff line number Diff line change
Expand Up @@ -186,24 +186,3 @@ Use these custom properties to control the feature toasts, for example:
.ripple.animate {
animation: ripple-scale var(--duration) cubic-bezier(0.4, 0, 0, 1), ripple-opacity var(--duration) cubic-bezier(0, 0, 0.4, 1);
}

#modes-group .mode-item {
--ripple-start-height: 20px;
--ripple-start-width: 54px;

--toast-ref-x: left;
--toast-element-ref-x: left;
--toast-offset-x: 0;

--toast-ref-y: bottom;
--toast-element-ref-y: top;
--toast-offset-y: -30px;

--indicator-dot-ref-x: left;
--indicator-dot-element-ref-x: center;
--indicator-dot-offset-x: 0px;

--indicator-dot-ref-y: bottom;
--indicator-dot-element-ref-y: top;
--indicator-dot-offset-y: -14px;
}
9 changes: 0 additions & 9 deletions ash/webui/camera_app_ui/resources/js/custom_effect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,12 +397,3 @@ export function focus(): void {
}
globalEffectPayload.toast.focus();
}

/**
* Show the new feature toast for time-lapse video recording.
*/
export function showTimeLapseIntroToast(parent: HTMLElement): void {
const videoModeButton = dom.get(
'.mode-item[i18n-new-feature=new_time_lapse_toast]', HTMLDivElement);
showNewFeature(videoModeButton, parent);
}
1 change: 0 additions & 1 deletion ash/webui/camera_app_ui/resources/js/i18n_string.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ export enum I18nString {
MSG_DOCUMENT_DETECTED = 'msg_document_detected',
MSG_PROCESSING_IMAGE = 'msg_processing_image',
MSG_PROCESSING_VIDEO = 'msg_processing_video',
NEW_TIME_LAPSE_TOAST = 'new_time_lapse_toast',
// I18nString.NAME: Bypass the presubmit check for unused strings. Used here:
// https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ash/system_web_apps/apps/camera_app/camera_system_web_app_info.cc
// NAME = 'name',
Expand Down
20 changes: 0 additions & 20 deletions ash/webui/camera_app_ui/resources/js/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,25 +286,6 @@ async function setupDynamicColor(): Promise<void> {
}
}

function setupNewFeatureToast(
cameraManager: CameraManager, cameraView: Camera) {
// TODO(b/236800499): Remove the toast around 3 milestones after the feature
// is launched.
if (loadTimeData.getChromeFlag(Flag.TIME_LAPSE)) {
cameraManager.registerCameraUI({
onUpdateConfig: () => {
if (localStorage.getBool(LocalStorageKey.TIME_LAPSE_DIALOG_SHOWN) ||
state.get(Mode.VIDEO)) {
return;
}
customEffect.showTimeLapseIntroToast(cameraView.root);
// Do not show the toast to users who has already seen it.
localStorage.set(LocalStorageKey.TIME_LAPSE_DIALOG_SHOWN, true);
},
});
}
}

async function setupMultiWindowHandling(
cameraManager: CameraManager, cameraView: Camera,
cameraResourceInitialized: WaitableEvent): Promise<void> {
Expand Down Expand Up @@ -530,7 +511,6 @@ async function main() {
setupToggles();
localStorage.cleanup();
setupEffect();
setupNewFeatureToast(cameraManager, cameraView);
setupExperimentalFeatures();
preloadImages();
preloadSounds();
Expand Down
1 change: 0 additions & 1 deletion ash/webui/camera_app_ui/resources/js/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,6 @@ export enum LocalStorageKey {
SAVE_METADATA = 'saveMetadata',
SHOW_ALL_RESOLUTIONS = 'showAllResolutions',
SHOW_METADATA = 'showMetadata',
TIME_LAPSE_DIALOG_SHOWN = 'timeLapseDialogShown',
TOGGLE_MIC = 'toggleMic',
}

Expand Down
3 changes: 0 additions & 3 deletions ash/webui/camera_app_ui/resources/strings/camera_strings.grd
Original file line number Diff line number Diff line change
Expand Up @@ -465,9 +465,6 @@
<message desc="Label for spoken feedback to read out for recording time lapse video." name="IDS_RECORD_TIME_LAPSE_VIDEO_OPTION">
Record time lapse video
</message>
<message desc="Toast message notifying user about new time lapse mode is available." name="IDS_NEW_TIME_LAPSE_TOAST">
Time Lapse mode is now available!
</message>
<message desc="Label for the confirm button to confirm with the reviewed photo or video." name="IDS_CONFIRM_REVIEW_BUTTON">
Confirm
</message>
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion ash/webui/camera_app_ui/resources/views/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@
<div id="mode-selector" class="bottom-stripe">
<div id="modes-group" class="buttons" role="radiogroup"
i18n-aria="aria_camera_mode_group">
<div class="mode-item" i18n-new-feature="new_time_lapse_toast">
<div class="mode-item">
<input type="radio" name="mode"
data-mode="video" tabindex="0"
i18n-aria="switch_record_video_button">
Expand Down

0 comments on commit 64a8a21

Please sign in to comment.