дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-29 05:52:23 +02:00
Порівняти коміти
| Автор | SHA1 | Дата | |
|---|---|---|---|
|
|
2a415418e4 | ||
|
|
c209e189e0 | ||
|
|
0b83b3ffbc | ||
|
|
7caec95fee |
No files matched your search
@@ -906,6 +906,7 @@ pub async fn build_run(
|
||||
let detected = project.detected_roots.read().clone();
|
||||
let config_dir = host.config_dir.clone();
|
||||
let token = host.begin_project_request(window, request);
|
||||
let launch_project = project.clone();
|
||||
let result = tokio::task::spawn_blocking(move || {
|
||||
// Fast path (#2476): an unchanged single-project Maven build skips
|
||||
// Maven entirely. Previous diagnostics stay: nothing changed, so they
|
||||
@@ -1003,7 +1004,12 @@ pub async fn build_run(
|
||||
};
|
||||
let result = compile::run(&root, &plan, &token, &|e| {
|
||||
let _ = on_event.send(e);
|
||||
})?;
|
||||
});
|
||||
if kind == BuildKind::Rebuild {
|
||||
// The clean removed outputs that earlier launch snapshots still hold.
|
||||
launch_project.java_launch_snapshots.lock().forget_reusable_snapshots();
|
||||
}
|
||||
let result = result?;
|
||||
if result.success && single && kind == BuildKind::Build {
|
||||
let model = with_profiles(load(&root, &cache, &settings), &cache);
|
||||
compile::record_menu_build(&cache, &root, &model, file.as_deref(), &token);
|
||||
|
||||
@@ -135,6 +135,16 @@ impl Session {
|
||||
}
|
||||
}
|
||||
|
||||
/// Build › Rebuild replaced the module outputs. The recorded snapshots were copied from
|
||||
/// the outputs before the clean and may hold classes it removed (a class moved to another
|
||||
/// package leaves its old file behind when jdtls wrote it), so none of them is reused:
|
||||
/// the next launch copies the rebuilt outputs.
|
||||
pub(crate) fn forget_reusable_snapshots(&mut self) {
|
||||
if let Err(error) = forget_reusable_snapshots(&self.cache) {
|
||||
tracing::warn!(%error, "Cannot invalidate Java launch snapshots");
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn build(
|
||||
&mut self,
|
||||
root: &Path,
|
||||
@@ -341,6 +351,32 @@ impl Drop for Session {
|
||||
}
|
||||
}
|
||||
|
||||
/// Clears the fingerprint of every launch record under `cache`, so no snapshot matches the
|
||||
/// sources any more. The records stay: their modules keep delegating to Maven.
|
||||
fn forget_reusable_snapshots(cache: &Path) -> std::io::Result<()> {
|
||||
let records = cache.join("java-launch/records");
|
||||
if !records.try_exists()? {
|
||||
return Ok(());
|
||||
}
|
||||
let mut pending = vec![records];
|
||||
while let Some(dir) = pending.pop() {
|
||||
for entry in fs::read_dir(dir)? {
|
||||
let entry = entry?;
|
||||
let kind = entry.file_type()?;
|
||||
if kind.is_dir() {
|
||||
pending.push(entry.path());
|
||||
} else if kind.is_file() && entry.path().extension().is_some_and(|ext| ext == "json") {
|
||||
let outputs: Option<Outputs> = serde_json::from_slice(&fs::read(entry.path())?).unwrap_or(None);
|
||||
if let Some(mut outputs) = outputs.filter(|o| o.fingerprint.is_some()) {
|
||||
outputs.fingerprint = None;
|
||||
write_record(&entry.path(), &outputs).map_err(|e| std::io::Error::other(e.message))?;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn referenced_snapshots(cache: &Path) -> std::io::Result<HashSet<PathBuf>> {
|
||||
let mut referenced = HashSet::new();
|
||||
let records = cache.join("java-launch/records");
|
||||
@@ -610,6 +646,34 @@ mod tests {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_menu_rebuild_stops_reusing_snapshots_that_hold_removed_classes() {
|
||||
let dir = tempfile::tempdir().unwrap();
|
||||
let root = dir.path();
|
||||
let model = fixture(root);
|
||||
let cancel = CancellationToken::new();
|
||||
// A class jdtls wrote for a source since moved to another package; an incremental
|
||||
// Maven build leaves it in target/classes.
|
||||
fs::create_dir_all(root.join("target/classes")).unwrap();
|
||||
fs::write(root.join("target/classes/Stale.class"), "stale").unwrap();
|
||||
let mut session = Session::new(root.join("cache"));
|
||||
let first = session.build(root, &model, root, BuildOptions::default(), None, &cancel).unwrap();
|
||||
assert!(first.snapshot.join("0/Stale.class").is_file());
|
||||
let reused = session.build(root, &model, root, BuildOptions::default(), None, &cancel).unwrap();
|
||||
assert_eq!(reused.snapshot, first.snapshot);
|
||||
|
||||
// Build › Rebuild cleans the outputs and compiles again.
|
||||
fs::remove_file(root.join("target/classes/Stale.class")).unwrap();
|
||||
session.forget_reusable_snapshots();
|
||||
assert!(has_record(root, &root.join("cache"), root));
|
||||
let next = session.build(root, &model, root, BuildOptions::default(), None, &cancel).unwrap();
|
||||
assert_ne!(next.snapshot, first.snapshot);
|
||||
assert!(!next.snapshot.join("0/Stale.class").exists());
|
||||
assert!(next.snapshot.join("0/Main.class").is_file());
|
||||
let again = session.build(root, &model, root, BuildOptions::default(), None, &cancel).unwrap();
|
||||
assert_eq!(again.snapshot, next.snapshot);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn jdt_errors_reuse_an_unchanged_snapshot_and_rebuild_only_on_a_cache_miss() {
|
||||
let dir = tempfile::tempdir().unwrap();
|
||||
|
||||
@@ -297,14 +297,14 @@ launching as before.
|
||||
|
||||
## Running programs
|
||||
|
||||
| Function | What it does |
|
||||
| ------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `Project::run_process(program, &args, stdin)` | Runs the pinned program in the project root and waits: `{ status, stdout, stderr }`, 4 MiB each. |
|
||||
| `host::run_command(&Command, Some(&project), stdin)` | API 1.3: the same, with environment variables added by `Command::env`. |
|
||||
| `host::run_captured(&Command, Some(&project), stdin, options)` | API 1.15: configurable output limit (up to 128 MiB per stream); errors explicitly if either stdout or stderr overflows. |
|
||||
| `host::start(&Command, Some(&project))` | API 1.3: a `Child` left running: `poll`, `write`, `close_stdin`, `wait`, `kill`. At most 8. |
|
||||
| `host::start_stream(&Command, Some(&project), options)` | API 1.15: lossless streaming with backpressure and bounded buffer, terminating with an explicit error on total overflow.|
|
||||
| `host::open_terminal(title, program, &args)` | A Terminal tab running the program (see [Views](/en/plugins/guides/views)). |
|
||||
| Function | What it does |
|
||||
| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `Project::run_process(program, &args, stdin)` | Runs the pinned program in the project root and waits: `{ status, stdout, stderr }`, 4 MiB each. |
|
||||
| `host::run_command(&Command, Some(&project), stdin)` | API 1.3: the same, with environment variables added by `Command::env`. |
|
||||
| `host::run_captured(&Command, Some(&project), stdin, options)` | API 1.15: configurable output limit (up to 128 MiB per stream); errors explicitly if either stdout or stderr overflows. |
|
||||
| `host::start(&Command, Some(&project))` | API 1.3: a `Child` left running: `poll`, `write`, `close_stdin`, `wait`, `kill`. At most 8. |
|
||||
| `host::start_stream(&Command, Some(&project), options)` | API 1.15: lossless streaming with backpressure and bounded buffer, terminating with an explicit error on total overflow. |
|
||||
| `host::open_terminal(title, program, &args)` | A Terminal tab running the program (see [Views](/en/plugins/guides/views)). |
|
||||
|
||||
```rust
|
||||
use openidea_plugin::host::{self, Command};
|
||||
|
||||
@@ -254,14 +254,14 @@ register_plugin!(MyPlugin, run_target_validation);
|
||||
|
||||
## 运行程序
|
||||
|
||||
| 函数 | 作用 |
|
||||
| ------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- |
|
||||
| `Project::run_process(program, &args, stdin)` | 在项目根目录运行已固定的程序并等待结束:`{ status, stdout, stderr }`,各 4 MiB。 |
|
||||
| `host::run_command(&Command, Some(&project), stdin)` | API 1.3:同上,可用 `Command::env` 追加环境变量。 |
|
||||
| `host::run_captured(&Command, Some(&project), stdin, options)` | API 1.15:可配置输出上限(每个流最高 128 MiB),stdout 或 stderr 溢出时明确报错。 |
|
||||
| `host::start(&Command, Some(&project))` | API 1.3:保持运行的 `Child`:`poll`、`write`、`close_stdin`、`wait`、`kill`。最多 8 个。 |
|
||||
| `host::start_stream(&Command, Some(&project), options)` | API 1.15:基于管道背压的有界无损流式传输,超出总预算时明确报错并终止进程。 |
|
||||
| `host::open_terminal(title, program, &args)` | 运行该程序的终端标签页(见 [视图](/zh/plugins/guides/views))。 |
|
||||
| 函数 | 作用 |
|
||||
| -------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
|
||||
| `Project::run_process(program, &args, stdin)` | 在项目根目录运行已固定的程序并等待结束:`{ status, stdout, stderr }`,各 4 MiB。 |
|
||||
| `host::run_command(&Command, Some(&project), stdin)` | API 1.3:同上,可用 `Command::env` 追加环境变量。 |
|
||||
| `host::run_captured(&Command, Some(&project), stdin, options)` | API 1.15:可配置输出上限(每个流最高 128 MiB),stdout 或 stderr 溢出时明确报错。 |
|
||||
| `host::start(&Command, Some(&project))` | API 1.3:保持运行的 `Child`:`poll`、`write`、`close_stdin`、`wait`、`kill`。最多 8 个。 |
|
||||
| `host::start_stream(&Command, Some(&project), options)` | API 1.15:基于管道背压的有界无损流式传输,超出总预算时明确报错并终止进程。 |
|
||||
| `host::open_terminal(title, program, &args)` | 运行该程序的终端标签页(见 [视图](/zh/plugins/guides/views))。 |
|
||||
|
||||
```rust
|
||||
use openidea_plugin::host::{self, Command};
|
||||
|
||||
@@ -117,7 +117,7 @@ test("fits a wide graph and saved columns without horizontal scrolling", async (
|
||||
expect(await list.evaluate((element) => element.scrollLeft)).toBe(0);
|
||||
});
|
||||
|
||||
test("keeps expanded ref names visible when a long commit subject competes for space", async ({ workbench: page }) => {
|
||||
test("keeps ref names visible when a long commit subject competes for space", async ({ workbench: page }) => {
|
||||
const branch = "origin/feature/workspace-settings";
|
||||
const tag = "v2.1";
|
||||
const summary = "Keep workspace settings and commit references visible ".repeat(4).trim();
|
||||
@@ -127,7 +127,7 @@ test("keeps expanded ref names visible when a long commit subject competes for s
|
||||
const options = "/src/features/vcs/logOptions.ts";
|
||||
const { useGitLog } = await import(/* @vite-ignore */ log);
|
||||
const { useLogOptions } = await import(/* @vite-ignore */ options);
|
||||
useLogOptions.setState({ tagNames: true, compactRefs: false });
|
||||
useLogOptions.setState({ tagNames: true });
|
||||
const [first, ...rest] = useGitLog.getState().commits;
|
||||
useGitLog.setState({ commits: [{ ...first, summary, refs: [branch, `tag: ${tag}`] }, ...rest] });
|
||||
},
|
||||
|
||||
@@ -112,57 +112,6 @@ test("Git Log separates commit message typography from compact metadata", async
|
||||
await expect(author).toHaveCSS("font-size", "12px");
|
||||
});
|
||||
|
||||
test("compact Git Log refs give the subject room on either side", async ({ workbench: page }) => {
|
||||
await page.setViewportSize({ width: 630, height: 720 });
|
||||
const refSubject = "Reconcile shipping credits";
|
||||
const longReference = "release-quarterly-settlement-and-backoffice-invoice-reconciliation";
|
||||
await page.evaluate(
|
||||
async ({ refSubject, longReference }) => {
|
||||
const optionsModule = "/src/features/vcs/logOptions.ts";
|
||||
const logModule = "/src/features/vcs/logStore.ts";
|
||||
const { setLogOptions } = await import(/* @vite-ignore */ optionsModule);
|
||||
const { useGitLog } = await import(/* @vite-ignore */ logModule);
|
||||
setLogOptions({ showBranches: false, showDetails: false });
|
||||
const [first, ...rest] = useGitLog.getState().commits;
|
||||
useGitLog.setState({
|
||||
commits: [{ ...first, summary: refSubject, message: refSubject, refs: [longReference] }, ...rest],
|
||||
});
|
||||
},
|
||||
{ refSubject, longReference },
|
||||
);
|
||||
const row = page.getByRole("listbox", { name: "Commits" }).getByRole("option").filter({ hasText: refSubject });
|
||||
const subject = row.getByText(refSubject, { exact: true });
|
||||
const ref = row.getByTitle(longReference, { exact: true });
|
||||
const expectLayout = async () => {
|
||||
await expect
|
||||
.poll(() =>
|
||||
subject.evaluate((el) => {
|
||||
const text = document.createRange();
|
||||
text.selectNodeContents(el);
|
||||
return el.getBoundingClientRect().width + 0.02 >= text.getBoundingClientRect().width;
|
||||
}),
|
||||
)
|
||||
.toBe(true);
|
||||
await expect
|
||||
.poll(() =>
|
||||
ref.evaluate((el) => {
|
||||
const refs = el.parentElement!;
|
||||
return refs.clientWidth / refs.parentElement!.clientWidth;
|
||||
}),
|
||||
)
|
||||
.toBeLessThanOrEqual(0.34);
|
||||
await expect(ref).toHaveCSS("font-size", "12px");
|
||||
await expect(subject).toHaveCSS("font-size", "13px");
|
||||
};
|
||||
await expectLayout();
|
||||
await expect.poll(async () => (await subject.boundingBox())!.x < (await ref.boundingBox())!.x).toBe(true);
|
||||
|
||||
await page.getByRole("toolbar", { name: "Log filters" }).getByRole("button", { name: "View Options" }).click();
|
||||
await page.getByRole("menuitemcheckbox", { name: "References on the Left" }).click();
|
||||
await expectLayout();
|
||||
await expect.poll(async () => (await subject.boundingBox())!.x > (await ref.boundingBox())!.x).toBe(true);
|
||||
});
|
||||
|
||||
test("a second click on a Git Log toolbar button closes its popup", async ({ workbench: page }) => {
|
||||
const toolbar = page.getByRole("toolbar", { name: "Log filters" });
|
||||
const branchPopup = page.getByRole("dialog", { name: "Filter by Branch" });
|
||||
|
||||
@@ -1,5 +1,38 @@
|
||||
import { expect, test } from "./fixtures";
|
||||
|
||||
test("keeps the current settings page name readable when the path is wider than the pane", async ({
|
||||
workbench: page,
|
||||
}) => {
|
||||
await page.keyboard.press("Meta+,");
|
||||
const settings = page.getByRole("dialog", { name: "Settings", exact: true });
|
||||
const search = settings.getByRole("textbox", { name: "Search settings" });
|
||||
await search.fill("Maven");
|
||||
const path = settings.getByLabel("Breadcrumb", { exact: true });
|
||||
const parent = path.getByText("Build, Execution, Deployment", { exact: true });
|
||||
const current = path.getByText("Maven", { exact: true });
|
||||
await expect(current).toBeVisible();
|
||||
await search.clear();
|
||||
|
||||
for (const width of [400, 560, 1120]) {
|
||||
await page.setViewportSize({ width, height: 720 });
|
||||
await expect
|
||||
.poll(() =>
|
||||
current.evaluate((label) => {
|
||||
const box = label.getBoundingClientRect();
|
||||
const trail = label.closest("[aria-label=Breadcrumb]")!.getBoundingClientRect();
|
||||
return label.clientWidth >= label.scrollWidth && box.width > 0 && box.right <= trail.right + 1;
|
||||
}),
|
||||
)
|
||||
.toBe(true);
|
||||
}
|
||||
await expect(parent).toBeInViewport({ ratio: 1 });
|
||||
expect(await parent.evaluate((label) => label.scrollWidth <= label.clientWidth)).toBe(true);
|
||||
await settings.getByRole("button", { name: "Back", exact: true }).click();
|
||||
await expect(current).toBeHidden();
|
||||
await settings.getByRole("button", { name: "Forward", exact: true }).click();
|
||||
await expect(current).toBeVisible();
|
||||
});
|
||||
|
||||
test("dirty settings keep scope labels and navigation inside the page header", async ({ workbench: page }) => {
|
||||
await page.keyboard.press("Meta+,");
|
||||
await expect(page.getByRole("dialog", { name: "Settings", exact: true })).toBeVisible();
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/// <reference types="node" />
|
||||
/**
|
||||
* Compact mode must match JetBrains' Islands `Tree.border` insets: the normal
|
||||
* left/right padding is 12px and compact is 8px (ManyIslandsDark.theme.json
|
||||
* `Tree.border` "4,12,4,12" / `Tree.border.compact` "2,8,2,8"). In OpenIDEA
|
||||
* that padding is split into the island gap plus the tree inset, so both must
|
||||
* step 6→4 together.
|
||||
* Compact mode must match JetBrains' Islands `*.compact` theme keys
|
||||
* (ManyIslandsDark.theme.json). In OpenIDEA the metrics live in two tokens.css
|
||||
* blocks: `:root` holds the normal value, `:root[data-compact]` the compact
|
||||
* override, and components read them through `var(--…, fallback)`. Swing `arc`
|
||||
* is a diameter, so the radii here are half of the theme's arc.
|
||||
*/
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { readFileSync } from "node:fs";
|
||||
@@ -29,3 +29,33 @@ describe("compact tree insets match JetBrains Tree.border", () => {
|
||||
expect(px(compact["--island-gap"]) + px(compact["--tree-inset"])).toBe(8);
|
||||
});
|
||||
});
|
||||
|
||||
describe("compact combo box matches JetBrains ComboBox keys", () => {
|
||||
it("steps the radius 4px → 2px (Component.arc 8, ComboBox.arc.compact 4) and the label padding 9/6 → 6/6", () => {
|
||||
expect(normal["--radius-combo"]).toBe("4px");
|
||||
expect(compact["--radius-combo"]).toBe("2px");
|
||||
expect(normal["--combo-pad-start"]).toBe("9px");
|
||||
expect(normal["--combo-pad-end"]).toBe("6px");
|
||||
expect(compact["--combo-pad-start"]).toBe("6px");
|
||||
expect(compact["--combo-pad-end"]).toBe("6px");
|
||||
});
|
||||
});
|
||||
|
||||
describe("compact editor tabs match JetBrains EditorTabs.tabInsets", () => {
|
||||
it("steps the tab pill's inline padding 8px → 6px", () => {
|
||||
expect(normal["--tab-pad-x"]).toBe("8px");
|
||||
expect(compact["--tab-pad-x"]).toBe("6px");
|
||||
});
|
||||
});
|
||||
|
||||
describe("compact radii match JetBrains arc keys", () => {
|
||||
it("steps toolbar and stripe button radii 6px → 4px (MainToolbar.Button.arc, Button.ToolWindow.arc 12 → 8)", () => {
|
||||
expect(normal["--radius-toolbar-button"]).toBe("6px");
|
||||
expect(compact["--radius-toolbar-button"]).toBe("4px");
|
||||
});
|
||||
|
||||
it("steps the control radius 4px → 3px (Component.arc 8 → 6)", () => {
|
||||
expect(normal["--radius-control"]).toBe("4px");
|
||||
expect(compact["--radius-control"]).toBe("3px");
|
||||
});
|
||||
});
|
||||
@@ -101,19 +101,28 @@
|
||||
color: var(--fg-strong);
|
||||
font-weight: 600;
|
||||
}
|
||||
.crumb:last-child {
|
||||
.parentCrumbs {
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
}
|
||||
.crumb > span {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.crumb {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
min-width: 0;
|
||||
}
|
||||
.crumbLabel {
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.currentCrumb {
|
||||
flex: none;
|
||||
max-width: 100%;
|
||||
}
|
||||
.crumbSep {
|
||||
margin: 0 4px;
|
||||
flex: none;
|
||||
margin-inline: var(--space-1);
|
||||
color: var(--fg-subtle);
|
||||
}
|
||||
.reset {
|
||||
|
||||
@@ -165,21 +165,29 @@ function PageHost({
|
||||
const [headerSlot, setHeaderSlot] = useState<HTMLElement | null>(null);
|
||||
if (!node) return <EmptyState title="Nothing found" icon="search" />;
|
||||
const Body = page?.component;
|
||||
const parents = crumbs.slice(0, -1);
|
||||
return (
|
||||
<PageContext.Provider value={ctx}>
|
||||
<SettingsFormContext.Provider value={form}>
|
||||
<SettingsPageFocusContext.Provider value={pageFocus}>
|
||||
<SettingsHeaderSlotContext.Provider value={headerSlot}>
|
||||
<div className={styles.pageHeader}>
|
||||
<div className={styles.crumbs} aria-label={tx("Breadcrumb")}>
|
||||
{crumbs.map((c, i) => (
|
||||
<span key={i} className={styles.crumb}>
|
||||
{i > 0 && <Icon name="chevron-right" size={12} className={styles.crumbSep} />}
|
||||
<span>
|
||||
<T>{c}</T>
|
||||
</span>
|
||||
<div className={styles.crumbs} aria-label={tx("Breadcrumb")} title={crumbs.map((c) => tx(c)).join(" › ")}>
|
||||
{parents.length > 0 && (
|
||||
<span className={styles.parentCrumbs}>
|
||||
{parents.map((c, i) => (
|
||||
<span key={i} className={styles.crumb}>
|
||||
<span className={styles.crumbLabel}>
|
||||
<T>{c}</T>
|
||||
</span>
|
||||
<Icon name="chevron-right" size={12} className={styles.crumbSep} />
|
||||
</span>
|
||||
))}
|
||||
</span>
|
||||
))}
|
||||
)}
|
||||
<span className={clsx(styles.crumbLabel, styles.currentCrumb)} aria-current="page">
|
||||
<T>{node.title}</T>
|
||||
</span>
|
||||
</div>
|
||||
<div ref={setHeaderSlot} className={styles.headerSlot} />
|
||||
{dirty && (
|
||||
|
||||
@@ -405,12 +405,9 @@
|
||||
.subject {
|
||||
flex: 0 1 auto;
|
||||
min-width: var(--log-subject-min);
|
||||
color: var(--fg);
|
||||
}
|
||||
.subjectText {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
color: var(--fg);
|
||||
}
|
||||
.headSubject {
|
||||
font-weight: 600;
|
||||
@@ -440,22 +437,6 @@
|
||||
flex: none;
|
||||
max-width: calc(100% - var(--log-subject-min) - var(--space-1-5));
|
||||
}
|
||||
.commitText > .refsCompact {
|
||||
flex: 0 1 auto;
|
||||
max-width: calc(100% / 3);
|
||||
}
|
||||
.commitText:has(> .refsCompact) > .subject {
|
||||
/* Protect a short subject while leaving room for compact reference names. */
|
||||
flex: 0 1000 max-content;
|
||||
min-width: auto;
|
||||
width: min(75%, 24ch);
|
||||
}
|
||||
.commitText > .refs .ref {
|
||||
font-size: var(--fs-small);
|
||||
}
|
||||
.refsCompact .ref {
|
||||
min-width: 11px;
|
||||
}
|
||||
.refsLeft {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ export function RefLabels({
|
||||
}) {
|
||||
const labels = refLabels(refs, { compact, tagNames }, remoteNames);
|
||||
return (
|
||||
<span className={clsx(styles.refs, compact && styles.refsCompact, left && styles.refsLeft)}>
|
||||
<span className={clsx(styles.refs, left && styles.refsLeft)}>
|
||||
{labels.map((l) => (
|
||||
<span key={`${l.kind}:${l.title}`} className={clsx(styles.ref, REF_KIND_CLASS[l.kind])} title={l.title}>
|
||||
{l.text && <span className={styles.refText}>{l.text}</span>}
|
||||
|
||||
@@ -134,9 +134,7 @@ function CommitRowView({
|
||||
setTooltip(false);
|
||||
}}
|
||||
>
|
||||
<span className={styles.subjectText}>
|
||||
<IssueText text={c.summary} />
|
||||
</span>
|
||||
<IssueText text={c.summary} />
|
||||
</span>
|
||||
{!opts.refsOnLeft && refs}
|
||||
</span>
|
||||
|
||||
@@ -328,6 +328,12 @@ html {
|
||||
--radius-row: 4px;
|
||||
--radius-selection: 5px;
|
||||
--radius-control: 4px;
|
||||
/* Combo boxes follow Component.arc 8 (radius 4); ComboBox.padding 1,9,1,6 (left 9, right 6). */
|
||||
--radius-combo: 4px;
|
||||
--combo-pad-start: 9px;
|
||||
--combo-pad-end: 6px;
|
||||
/* EditorTabs.tabInsets -6,8,-6,8: the tab pill's inline padding (8px each side). */
|
||||
--tab-pad-x: 8px;
|
||||
--radius-tab: 6px;
|
||||
--radius-toolbar-button: 6px;
|
||||
/* main toolbar dropdowns (MainToolbar.Dropdown.arc 12): unchanged in compact mode */
|
||||
@@ -1534,7 +1540,14 @@ html {
|
||||
--island-radius: 8px;
|
||||
/* Compact Tree.border is "2,8,2,8": island gap 4 + tree inset 4 = 8 horizontally. */
|
||||
--tree-inset: 4px;
|
||||
/* ComboBox.arc.compact "4,4,4,4" (radius 2) and padding.compact 1,6,1,6. */
|
||||
--radius-combo: 2px;
|
||||
--combo-pad-start: 6px;
|
||||
--combo-pad-end: 6px;
|
||||
/* EditorTabs.tabInsets.compact -2,6,-2,4: the pill's inline padding shrinks 8→6/4. */
|
||||
--tab-pad-x: 6px;
|
||||
--radius-control: 3px;
|
||||
/* MainToolbar.Button.arc 12 → 8 and Button.ToolWindow.arc 12 → 8 (stripe buttons). */
|
||||
--radius-toolbar-button: 4px;
|
||||
}
|
||||
/* Use contrast scrollbars. */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
gap: var(--space-1-5);
|
||||
height: var(--h-field, 28px);
|
||||
min-width: 0;
|
||||
padding: 0 6px 0 9px;
|
||||
border-radius: var(--radius-control, 4px);
|
||||
padding: 0 var(--combo-pad-end, 6px) 0 var(--combo-pad-start, 9px);
|
||||
border-radius: var(--radius-combo, var(--radius-control, 4px));
|
||||
color: var(--fg-strong);
|
||||
transition:
|
||||
background var(--dur-fast) var(--ease),
|
||||
|
||||
@@ -11,9 +11,10 @@
|
||||
--tab-selected-bg: var(--bg-tab-selected-inactive);
|
||||
--tab-selected-border: var(--border-tab-selected-inactive);
|
||||
}
|
||||
/* Islands tabs: the selected tab is a rounded pill (tab-selected-bg / -border); no underline, no separators. */
|
||||
/* Islands tabs: the selected tab is a rounded pill (tab-selected-bg / -border); no underline, no separators.
|
||||
EditorTabs.tabInsets -6,8,-6,8 (tabInsets.compact -2,6,-2,4) put 8px (6px compact) around the tab label. */
|
||||
.editor {
|
||||
--tab-inline-padding: var(--space-2);
|
||||
--tab-inline-padding: var(--tab-pad-x, 8px);
|
||||
height: var(--h-header);
|
||||
font-size: var(--fs-chrome);
|
||||
padding: 0 4px;
|
||||
|
||||
Reference in new issue
Заблокувати користувача