mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-23 08:49:33 -10:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e68ee47052 | ||
|
|
a700e6257e |
No files matched your search
@@ -75,7 +75,7 @@ for (const locale of ["en", "zh"]) {
|
||||
const path = "/src/platform/i18n.ts";
|
||||
await (await import(/* @vite-ignore */ path)).setLocale(locale);
|
||||
}, locale);
|
||||
for (const id of ["appearance", "editor.font", "general", "general.httpProxy"]) {
|
||||
for (const id of ["appearance", "editor.font", "general", "general.httpProxy", "vcs.log"]) {
|
||||
await selectPage(page, id);
|
||||
const body = page.locator("[class*='pageBody']");
|
||||
for (const width of [1000, 784, 640, 520]) {
|
||||
@@ -108,6 +108,28 @@ test("keeps Open project in options within narrow System Settings", async ({ wor
|
||||
expect(overflow).toBeLessThanOrEqual(1);
|
||||
});
|
||||
|
||||
test("Git Log settings group display and column options with aligned checkboxes", async ({ workbench: page }) => {
|
||||
await page.keyboard.press("Meta+,");
|
||||
const dialog = page.getByRole("dialog", { name: "Settings", exact: true });
|
||||
await selectPage(page, "vcs.log");
|
||||
const view = dialog.getByRole("region", { name: "View Options" });
|
||||
const columns = dialog.getByRole("region", { name: "Visible columns" });
|
||||
const tagNames = view.getByRole("checkbox", { name: "Show tag names" });
|
||||
const hash = columns.getByRole("checkbox", { name: "Hash" });
|
||||
await expect(view.getByRole("checkbox")).toHaveCount(5);
|
||||
await expect(columns.getByRole("checkbox")).toHaveCount(4);
|
||||
|
||||
for (const width of [1000, 520]) {
|
||||
await page.setViewportSize({ width, height: 760 });
|
||||
expect((await tagNames.boundingBox())!.x).toBeCloseTo((await hash.boundingBox())!.x, 0);
|
||||
}
|
||||
|
||||
await expect(hash).not.toBeChecked();
|
||||
await hash.focus();
|
||||
await page.keyboard.press("Space");
|
||||
await expect(hash).toBeChecked();
|
||||
});
|
||||
|
||||
test("settings sidebar resizes with mouse and keyboard and remembers its width", async ({ workbench: page }) => {
|
||||
await page.keyboard.press("Meta+,");
|
||||
const dialog = page.getByRole("dialog", { name: "Settings", exact: true });
|
||||
|
||||
@@ -1,22 +1,33 @@
|
||||
.page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
color: var(--fg);
|
||||
display: grid;
|
||||
gap: var(--space-4);
|
||||
font-size: var(--fs-ui);
|
||||
}
|
||||
.section {
|
||||
|
||||
.heading {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: var(--space-2);
|
||||
margin-top: 6px;
|
||||
min-height: var(--h-field);
|
||||
margin: 0 0 var(--space-1);
|
||||
color: var(--fg-strong);
|
||||
font-size: inherit;
|
||||
font-weight: 500;
|
||||
}
|
||||
.header {
|
||||
color: var(--fg-muted);
|
||||
|
||||
.heading::after {
|
||||
content: "";
|
||||
flex: 1;
|
||||
height: 1px;
|
||||
background: var(--border);
|
||||
}
|
||||
.columns {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-2);
|
||||
padding-left: 18px;
|
||||
|
||||
.options {
|
||||
display: grid;
|
||||
gap: var(--space-1);
|
||||
padding-inline-start: var(--space-4);
|
||||
}
|
||||
|
||||
.options > label {
|
||||
min-height: var(--h-field);
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
/** Settings › Version Control › Log: how the Git Log shows references, dates and columns. */
|
||||
import { useId, type ReactNode } from "react";
|
||||
import { Checkbox, T } from "@/ui";
|
||||
import { setLogOptions, useLogOptions, type LogOptions } from "./logOptions";
|
||||
import styles from "./LogSettingsPage.module.css";
|
||||
import { tx } from "@/platform/i18n";
|
||||
|
||||
type Flag = { [K in keyof LogOptions]: LogOptions[K] extends boolean ? K : never }[keyof LogOptions];
|
||||
|
||||
@@ -21,6 +21,18 @@ const COLUMNS: { key: Flag; label: string }[] = [
|
||||
{ key: "showGitHubChecks", label: "GitHub Commit Checks" },
|
||||
];
|
||||
|
||||
function OptionGroup({ title, children }: { title: string; children: ReactNode }) {
|
||||
const heading = useId();
|
||||
return (
|
||||
<section aria-labelledby={heading}>
|
||||
<h2 id={heading} className={styles.heading}>
|
||||
<T>{title}</T>
|
||||
</h2>
|
||||
<div className={styles.options}>{children}</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
export function LogSettingsPage() {
|
||||
const o = useLogOptions();
|
||||
// Display options only: the log needs no reload.
|
||||
@@ -29,13 +41,8 @@ export function LogSettingsPage() {
|
||||
);
|
||||
return (
|
||||
<div className={styles.page}>
|
||||
{OPTIONS.map(flag)}
|
||||
<section className={styles.section} aria-label={tx("Visible columns")}>
|
||||
<div className={styles.header}>
|
||||
<T>Visible columns:</T>
|
||||
</div>
|
||||
<div className={styles.columns}>{COLUMNS.map(flag)}</div>
|
||||
</section>
|
||||
<OptionGroup title="View Options">{OPTIONS.map(flag)}</OptionGroup>
|
||||
<OptionGroup title="Visible columns">{COLUMNS.map(flag)}</OptionGroup>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -3707,5 +3707,7 @@
|
||||
"Previous Rows": "Previous Rows",
|
||||
"Next Rows": "Next Rows",
|
||||
"Previous Columns": "Previous Columns",
|
||||
"Next Columns": "Next Columns"
|
||||
"Next Columns": "Next Columns",
|
||||
"View Options": "View Options",
|
||||
"Visible columns": "Visible columns"
|
||||
}
|
||||
@@ -4751,7 +4751,6 @@
|
||||
"Show commit time rather than author time": "Mostrar fecha y hora de la confirmación en lugar de la del autor",
|
||||
"Show references on the left": "Mostrar referencias a la izquierda",
|
||||
"Visible columns": "Columnas visibles",
|
||||
"Visible columns:": "Columnas visibles:",
|
||||
"Get from Revision": "Obtener de la revisión",
|
||||
"Replace '{path}' with its content from the revision? Local changes to it are lost.": "¿Reemplazar '{path}' con su contenido de la revisión? Los cambios locales se perderán.",
|
||||
"Replace {length} files with their content from the revision? Local changes to them are lost.": "¿Reemplazar {length} archivos con su contenido de la revisión? Los cambios locales en ellos se perderán.",
|
||||
|
||||
@@ -4606,7 +4606,6 @@
|
||||
"Show commit time rather than author time": "Afficher l'heure du commit plutôt que celle de l'auteur",
|
||||
"Show references on the left": "Afficher les références à gauche",
|
||||
"Visible columns": "Colonnes visibles",
|
||||
"Visible columns:": "Colonnes visibles :",
|
||||
"Get from Revision": "Récupérer depuis la révision",
|
||||
"Replace '{path}' with its content from the revision? Local changes to it are lost.": "Remplacer '{path}' par son contenu de la révision ? Ses modifications locales seront perdues.",
|
||||
"Replace {length} files with their content from the revision? Local changes to them are lost.": "Remplacer {length} fichiers par leur contenu de la révision ? Leurs modifications locales seront perdues.",
|
||||
|
||||
@@ -4823,7 +4823,6 @@
|
||||
"Show commit time rather than author time": "작성자 시간 대신 커밋 시간 표시",
|
||||
"Show references on the left": "왼쪽에 참조 표시",
|
||||
"Visible columns": "표시할 열",
|
||||
"Visible columns:": "표시할 열:",
|
||||
"Get from Revision": "리비전에서 가져오기",
|
||||
"Replace '{path}' with its content from the revision? Local changes to it are lost.": "'{path}'을(를) 리비전의 내용으로 바꾸시겠습니까? 해당 파일의 로컬 변경 사항은 손실됩니다.",
|
||||
"Replace {length} files with their content from the revision? Local changes to them are lost.": "파일 {length}개를 리비전의 내용으로 바꾸시겠습니까? 해당 파일의 로컬 변경 사항은 손실됩니다.",
|
||||
|
||||
@@ -4702,7 +4702,6 @@
|
||||
"Show commit time rather than author time": "Pokaż czas zatwierdzenia zamiast czasu autora",
|
||||
"Show references on the left": "Pokaż odnośniki po lewej stronie",
|
||||
"Visible columns": "Widoczne kolumny",
|
||||
"Visible columns:": "Widoczne kolumny:",
|
||||
"Get from Revision": "Pobierz z wersji",
|
||||
"Replace '{path}' with its content from the revision? Local changes to it are lost.": "Zastąpić '{path}' zawartością z tej wersji? Lokalne zmiany w tym pliku zostaną utracone.",
|
||||
"Replace {length} files with their content from the revision? Local changes to them are lost.": "Zastąpić pliki w liczbie {length} ich zawartością z tej wersji? Lokalne zmiany w nich zostaną utracone.",
|
||||
|
||||
@@ -4717,7 +4717,6 @@
|
||||
"Show commit time rather than author time": "Mostrar data/hora do commit em vez da do autor",
|
||||
"Show references on the left": "Mostrar referências à esquerda",
|
||||
"Visible columns": "Colunas visíveis",
|
||||
"Visible columns:": "Colunas visíveis:",
|
||||
"Get from Revision": "Obter da revisão",
|
||||
"Replace '{path}' with its content from the revision? Local changes to it are lost.": "Substituir '{path}' pelo seu conteúdo da revisão? Alterações locais nele serão perdidas.",
|
||||
"Replace {length} files with their content from the revision? Local changes to them are lost.": "Substituir {length} arquivos pelo seu conteúdo da revisão? Alterações locais neles serão perdidas.",
|
||||
|
||||
@@ -7428,7 +7428,6 @@
|
||||
"Show commit time rather than author time": "Yazar zamanı yerine commit zamanını göster",
|
||||
"Show references on the left": "Başvuruları solda göster",
|
||||
"Visible columns": "Görünür sütunlar",
|
||||
"Visible columns:": "Görünür sütunlar:",
|
||||
"Get from Revision": "Revizyondan Al",
|
||||
"Replace '{path}' with its content from the revision? Local changes to it are lost.": "'{path}' dosyası revizyondaki içeriğiyle değiştirilsin mi? Yerel değişiklikleri kaybolacak.",
|
||||
"Replace {length} files with their content from the revision? Local changes to them are lost.": "{length} dosya revizyondaki içerikleriyle değiştirilsin mi? Yerel değişiklikleri kaybolacak.",
|
||||
|
||||
@@ -5736,7 +5736,6 @@
|
||||
"Show commit time rather than author time": "顯示提交時間而非作者時間",
|
||||
"Show references on the left": "在左側顯示引用",
|
||||
"Visible columns": "可見欄",
|
||||
"Visible columns:": "可見欄:",
|
||||
"Get from Revision": "從修訂取得",
|
||||
"Replace '{path}' with its content from the revision? Local changes to it are lost.": "用修訂中的內容取代「{path}」?其本機更改將遺失。",
|
||||
"Replace {length} files with their content from the revision? Local changes to them are lost.": "用修訂中的內容取代 {length} 個檔案?它們的本機更改將遺失。",
|
||||
|
||||
@@ -6227,7 +6227,6 @@
|
||||
"Show commit time rather than author time": "显示提交时间而非作者时间",
|
||||
"Show references on the left": "在左侧显示引用",
|
||||
"Visible columns": "可见列",
|
||||
"Visible columns:": "可见列:",
|
||||
"Get from Revision": "从修订获取",
|
||||
"Replace '{path}' with its content from the revision? Local changes to it are lost.": "用修订中的内容替换“{path}”?其本地更改将丢失。",
|
||||
"Replace {length} files with their content from the revision? Local changes to them are lost.": "用修订中的内容替换 {length} 个文件?它们的本地更改将丢失。",
|
||||
|
||||
Reference in new issue
Block a user