mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-06 08:07:49 +00:00
fix(vcs): remove redundant commit message expansion
This commit is contained in:
@@ -408,12 +408,6 @@
|
||||
word-break: break-word;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.expandMessage {
|
||||
display: block;
|
||||
margin-block-start: 6px;
|
||||
font-weight: normal;
|
||||
font-size: var(--fs-small);
|
||||
}
|
||||
.fullMessage {
|
||||
margin-top: 6px;
|
||||
color: var(--fg);
|
||||
|
||||
@@ -33,7 +33,6 @@ import {
|
||||
SplitHandle,
|
||||
SplitPanel,
|
||||
Spinner,
|
||||
Dialog,
|
||||
Popup,
|
||||
TOOLTIP_DELAY,
|
||||
Tabs,
|
||||
@@ -94,7 +93,7 @@ import {
|
||||
isFavoriteBranch,
|
||||
type BranchTreeNode,
|
||||
} from "./branches";
|
||||
import { chooseDateRange, chooseMany, openDialog } from "./dialogs";
|
||||
import { chooseDateRange, chooseMany } from "./dialogs";
|
||||
import { buildFileTree, dirKeys, type FileTreeNode } from "./fileTree";
|
||||
import { DIFF_KIND, diffInput } from "./diffInput";
|
||||
import {
|
||||
@@ -2518,24 +2517,6 @@ function CommitMessage({ commit, compact = false }: { commit: Commit; compact?:
|
||||
<div className={clsx(compact && styles.commitEntry)}>
|
||||
<div className={styles.subjectLine}>
|
||||
<CommitMessageText text={subject ?? ""} repo={repo} />
|
||||
{/* Only a message with a body has more to show. */}
|
||||
{body && (
|
||||
<button
|
||||
type="button"
|
||||
className={clsx(styles.linkButton, styles.expandMessage)}
|
||||
onClick={() =>
|
||||
openDialog((close) => (
|
||||
<Dialog open title={tx`Commit ${commit.shortId}`} width={760} onClose={close}>
|
||||
<div className={clsx(styles.messageBox, styles.fullMessage)}>
|
||||
<CommitMessageText text={message} repo={repo} />
|
||||
</div>
|
||||
</Dialog>
|
||||
))
|
||||
}
|
||||
>
|
||||
{tx("Expand Commit Message")}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
{body && (
|
||||
<div className={styles.fullMessage}>
|
||||
|
||||
@@ -34,7 +34,6 @@ import { commitKey } from "../multiRoot";
|
||||
import { emptyFilters, openLogTab, reloadLog, selectGitTab, useGitLog } from "../logStore";
|
||||
import { LogScope } from "../LogScope";
|
||||
import { DEFAULT_LOG_OPTIONS, useLogOptions } from "../logOptions";
|
||||
import { VcsDialogHost } from "../dialogs";
|
||||
|
||||
const c = (id: string, parents: string[] = [], refs: string[] = []): Commit => ({
|
||||
id,
|
||||
@@ -168,12 +167,7 @@ describe("log controls", () => {
|
||||
describe("commit details", () => {
|
||||
it("loads a full body, containing branches, and signature only when details are visible", async () => {
|
||||
useGitLog.setState({ selected: "/repo\0tip", selection: ["/repo\0tip"] });
|
||||
render(
|
||||
<>
|
||||
<LogView />
|
||||
<VcsDialogHost />
|
||||
</>,
|
||||
);
|
||||
render(<LogView />);
|
||||
await screen.findByRole("listbox", { name: "Commits" });
|
||||
expect(api.details).not.toHaveBeenCalled();
|
||||
await act(async () => {
|
||||
@@ -181,9 +175,6 @@ describe("commit details", () => {
|
||||
});
|
||||
expect(await screen.findByText("Full body loaded on demand")).toBeInTheDocument();
|
||||
expect(screen.getByText(/Signature.*Verified/)).toBeInTheDocument();
|
||||
fireEvent.click(screen.getByRole("button", { name: "Expand Commit Message" }));
|
||||
expect(await screen.findByRole("dialog", { name: "Commit tip" })).toHaveTextContent("Full body loaded on demand");
|
||||
fireEvent.keyDown(screen.getByRole("dialog"), { key: "Escape" });
|
||||
});
|
||||
|
||||
it("compares real merge parents and retains renamed files under affected-path filtering", async () => {
|
||||
|
||||
@@ -6138,8 +6138,6 @@
|
||||
"Collapse or expand this branch": "Contraer o expandir esta rama",
|
||||
"Diff Preview Location": "Ubicación de la vista previa de diferencias",
|
||||
"Parent": "Padre",
|
||||
"Commit {shortId}": "Confirmación {shortId}",
|
||||
"Expand Commit Message": "Expandir mensaje de confirmación",
|
||||
"Committed by": "Confirmado por",
|
||||
"Merge of": "Fusión de",
|
||||
"Containing branches": "Ramas que lo contienen",
|
||||
|
||||
@@ -6194,8 +6194,6 @@
|
||||
"Collapse or expand this branch": "折叠或展开此分支",
|
||||
"Diff Preview Location": "差异预览位置",
|
||||
"Parent": "父提交",
|
||||
"Commit {shortId}": "提交 {shortId}",
|
||||
"Expand Commit Message": "展开提交消息",
|
||||
"Committed by": "提交者",
|
||||
"Merge of": "合并自",
|
||||
"Containing branches": "包含此提交的分支",
|
||||
|
||||
Reference in New Issue
Block a user