diff --git a/webviews/src/pages/changelog/Localizable.xcstrings b/webviews/src/pages/changelog/Localizable.xcstrings index 58f306a64b46..45e12cffd094 100644 --- a/webviews/src/pages/changelog/Localizable.xcstrings +++ b/webviews/src/pages/changelog/Localizable.xcstrings @@ -6460,6 +6460,270 @@ } } } + }, + "changelog.page.close": { + "comment": "Changelog page: closes the enlarged picture.", + "extractionState": "manual", + "localizations": { + "en": { + "stringUnit": { + "state": "translated", + "value": "Close" + } + }, + "ar": { + "stringUnit": { + "state": "translated", + "value": "إغلاق" + } + }, + "bs": { + "stringUnit": { + "state": "translated", + "value": "Zatvori" + } + }, + "da": { + "stringUnit": { + "state": "translated", + "value": "Luk" + } + }, + "de": { + "stringUnit": { + "state": "translated", + "value": "Schließen" + } + }, + "es": { + "stringUnit": { + "state": "translated", + "value": "Cerrar" + } + }, + "fr": { + "stringUnit": { + "state": "translated", + "value": "Fermer" + } + }, + "it": { + "stringUnit": { + "state": "translated", + "value": "Chiudi" + } + }, + "ja": { + "stringUnit": { + "state": "translated", + "value": "閉じる" + } + }, + "km": { + "stringUnit": { + "state": "translated", + "value": "បិទ" + } + }, + "ko": { + "stringUnit": { + "state": "translated", + "value": "닫기" + } + }, + "nb": { + "stringUnit": { + "state": "translated", + "value": "Lukk" + } + }, + "pl": { + "stringUnit": { + "state": "translated", + "value": "Zamknij" + } + }, + "pt-BR": { + "stringUnit": { + "state": "translated", + "value": "Fechar" + } + }, + "ru": { + "stringUnit": { + "state": "translated", + "value": "Закрыть" + } + }, + "th": { + "stringUnit": { + "state": "translated", + "value": "ปิด" + } + }, + "tr": { + "stringUnit": { + "state": "translated", + "value": "Kapat" + } + }, + "uk": { + "stringUnit": { + "state": "translated", + "value": "Закрити" + } + }, + "vi": { + "stringUnit": { + "state": "translated", + "value": "Đóng" + } + }, + "zh-Hans": { + "stringUnit": { + "state": "translated", + "value": "关闭" + } + }, + "zh-Hant": { + "stringUnit": { + "state": "translated", + "value": "關閉" + } + } + } + }, + "changelog.page.enlarge": { + "comment": "Changelog page: label of a change's picture, which opens it enlarged; the picture's description follows.", + "extractionState": "manual", + "localizations": { + "en": { + "stringUnit": { + "state": "translated", + "value": "Enlarge picture" + } + }, + "ar": { + "stringUnit": { + "state": "translated", + "value": "تكبير الصورة" + } + }, + "bs": { + "stringUnit": { + "state": "translated", + "value": "Uvećaj sliku" + } + }, + "da": { + "stringUnit": { + "state": "translated", + "value": "Forstør billedet" + } + }, + "de": { + "stringUnit": { + "state": "translated", + "value": "Bild vergrößern" + } + }, + "es": { + "stringUnit": { + "state": "translated", + "value": "Ampliar imagen" + } + }, + "fr": { + "stringUnit": { + "state": "translated", + "value": "Agrandir l’image" + } + }, + "it": { + "stringUnit": { + "state": "translated", + "value": "Ingrandisci immagine" + } + }, + "ja": { + "stringUnit": { + "state": "translated", + "value": "画像を拡大" + } + }, + "km": { + "stringUnit": { + "state": "translated", + "value": "ពង្រីករូបភាព" + } + }, + "ko": { + "stringUnit": { + "state": "translated", + "value": "이미지 확대" + } + }, + "nb": { + "stringUnit": { + "state": "translated", + "value": "Forstørr bildet" + } + }, + "pl": { + "stringUnit": { + "state": "translated", + "value": "Powiększ obraz" + } + }, + "pt-BR": { + "stringUnit": { + "state": "translated", + "value": "Ampliar imagem" + } + }, + "ru": { + "stringUnit": { + "state": "translated", + "value": "Увеличить изображение" + } + }, + "th": { + "stringUnit": { + "state": "translated", + "value": "ขยายภาพ" + } + }, + "tr": { + "stringUnit": { + "state": "translated", + "value": "Resmi büyüt" + } + }, + "uk": { + "stringUnit": { + "state": "translated", + "value": "Збільшити зображення" + } + }, + "vi": { + "stringUnit": { + "state": "translated", + "value": "Phóng to hình ảnh" + } + }, + "zh-Hans": { + "stringUnit": { + "state": "translated", + "value": "放大图片" + } + }, + "zh-Hant": { + "stringUnit": { + "state": "translated", + "value": "放大圖片" + } + } + } } }, "version": "1.0" diff --git a/webviews/src/pages/changelog/ReleaseParts.tsx b/webviews/src/pages/changelog/ReleaseParts.tsx index f17dfaf4dc73..88f3909f41f3 100644 --- a/webviews/src/pages/changelog/ReleaseParts.tsx +++ b/webviews/src/pages/changelog/ReleaseParts.tsx @@ -1,7 +1,9 @@ // The pieces every changelog design shares (cx-urd.61): release meta, the hero, the grouped // change rows and the folded commit list by area. Colors are theme tokens, sizes the type scale // (styles.css); nothing here knows which design it sits in. -import { useState, useSyncExternalStore } from "react"; +import { useRef, useState, useSyncExternalStore } from "react"; +import { Dialog } from "../../ui/Dialog"; +import { DialogButton } from "../../ui/DialogButton"; import type { Strings } from "../shared/i18n"; import { getColorScheme, subscribeColorScheme } from "./colorScheme"; import { byArea } from "./areas"; @@ -31,21 +33,77 @@ export function ReleaseMeta({ date, version, strings }: { date: string; version: ); } -/** The release's picture in the theme's scheme; the box keeps its ratio before the file arrives. */ -export function Media({ media, className }: { media: MediaRef; className?: string }) { +/** The release's picture in the theme's scheme; the box keeps its ratio before the file arrives. It + loads as it nears the viewport. Given `strings`, a click (or Return) opens it enlarged. */ +export function Media({ media, className, strings }: { media: MediaRef; className?: string; strings?: Strings }) { const scheme = useSyncExternalStore(subscribeColorScheme, getColorScheme, () => "light" as const); const src = scheme === "dark" ? media.dark : media.light; + const [open, setOpen] = useState(false); + const picture = media.video ? ( +