mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-19 00:10:00 +00:00
fix(settings): let Project View branch decorations be bold and italic (#3387)
The six Project View branch attributes never set fontStyle, so Settings disabled Bold and Italic for them although the Project view's branch suffix already reads --git-<attr>-bold/-italic/-effect. Setting it enables the checkboxes and makes the overrides emit those variables. Co-authored-by: akshathayadav378-boop <akshathayadav378-boop@users.noreply.github.com>
This commit is contained in:
co-authored by
akshathayadav378-boop
parent
c9dca15972
commit
b5c2d0dc5e
@@ -404,4 +404,15 @@ describe("Git colors", () => {
|
||||
act(() => fireEvent.click(within(preview).getByText("feature/login")));
|
||||
expect(screen.getByRole("treeitem", { name: "Local branch decoration", selected: true })).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("lets a project view branch decoration be set bold and italic (#3385)", () => {
|
||||
act(() => stage("editor.colorScheme", "global", "editor.colorScheme", "dark"));
|
||||
schemePage("editor.colorScheme.git");
|
||||
const preview = screen.getByLabelText("Color scheme preview");
|
||||
act(() => fireEvent.click(within(preview).getByText("feature/login")));
|
||||
const bold = screen.getByRole("checkbox", { name: "Bold" });
|
||||
expect(bold).toBeEnabled();
|
||||
act(() => fireEvent.click(bold));
|
||||
expect(value("colorOverrides")).toEqual({ dark: { gitLocalBranch: { bold: true } } });
|
||||
});
|
||||
});
|
||||
|
||||
@@ -245,26 +245,47 @@ const BASE_ATTRIBUTES: readonly AttributeDef[] = [
|
||||
bg: "--git-blame-subject-bg",
|
||||
fontStyle: true,
|
||||
},
|
||||
{ id: "gitBranchChanged", name: "Project View › Changed decoration", path: ["Git"], fg: "--git-branch-changed" },
|
||||
{ id: "gitHeadTags", name: "Project View › HEAD tags decoration", path: ["Git"], fg: "--git-head-tags" },
|
||||
{ id: "gitLocalBranch", name: "Project View › Local branch decoration", path: ["Git"], fg: "--git-local-branch" },
|
||||
{
|
||||
id: "gitBranchChanged",
|
||||
name: "Project View › Changed decoration",
|
||||
path: ["Git"],
|
||||
fg: "--git-branch-changed",
|
||||
fontStyle: true,
|
||||
},
|
||||
{
|
||||
id: "gitHeadTags",
|
||||
name: "Project View › HEAD tags decoration",
|
||||
path: ["Git"],
|
||||
fg: "--git-head-tags",
|
||||
fontStyle: true,
|
||||
},
|
||||
{
|
||||
id: "gitLocalBranch",
|
||||
name: "Project View › Local branch decoration",
|
||||
path: ["Git"],
|
||||
fg: "--git-local-branch",
|
||||
fontStyle: true,
|
||||
},
|
||||
{
|
||||
id: "gitMasterWithRemote",
|
||||
name: "Project View › master/main with remote",
|
||||
path: ["Git"],
|
||||
fg: "--git-master-with-remote",
|
||||
fontStyle: true,
|
||||
},
|
||||
{
|
||||
id: "gitMasterWithoutRemote",
|
||||
name: "Project View › master/main without remote",
|
||||
path: ["Git"],
|
||||
fg: "--git-master-without-remote",
|
||||
fontStyle: true,
|
||||
},
|
||||
{
|
||||
id: "gitTrackingBranch",
|
||||
name: "Project View › Tracking branch decoration",
|
||||
path: ["Git"],
|
||||
fg: "--git-tracking-branch",
|
||||
fontStyle: true,
|
||||
},
|
||||
|
||||
syn("keyword", "Keyword", [LD], "keyword"),
|
||||
|
||||
Reference in New Issue
Block a user