Файли
openidea/src/features/github/details/Details.module.css
T
Orca 98a6de6ff0 fix(github): open the selected file with Show Diff in the pull request trees (#7623)
Show Diff (Ctrl+D) on a file in the pull request Changes tree said "Select a changed file to show its diff": the diff actions ask the focused view for its selection through useDiffSource, and neither the pull request details tree nor the New Pull Request changes tree registered one. Both now do: the first selected file, else the tree's first file (a folder selection opens its first file), with the New Pull Request tree keeping its file chain for F7.

Closes #7614

Co-authored-by: og-orca <[email protected]>
2026-12-03 10:32:59 +08:00

512 рядки
9.0 KiB
CSS

/*
* The details tab, with IntelliJ's new-UI spacing (`ReviewDetailsUIUtil`): 16px left and
* 14px right gaps; title 16/16/16/14, commits row 0/16/4/14, commit info 0/16/12/14,
* statuses 6/16/10/14 (149px at most), actions 0/14/16/14.
*/
.panel {
display: flex;
flex: 1;
flex-direction: column;
min-height: 0;
overflow: hidden;
}
.centered {
display: flex;
flex: 1;
flex-direction: column;
align-items: center;
justify-content: center;
gap: var(--space-1-5);
min-height: 0;
padding: 12px;
color: var(--fg-secondary);
text-align: center;
}
.error {
color: var(--danger);
}
.secondary {
color: var(--fg-secondary);
}
.bold {
font-weight: 600;
}
.ellipsis {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* ActionLink */
.link {
display: inline-flex;
flex: none;
align-items: center;
gap: var(--space-0-5);
align-self: flex-start;
max-width: 100%;
padding: 0;
border: none;
background: none;
color: var(--link);
font: inherit;
white-space: nowrap;
cursor: pointer;
}
.link:hover:not(:disabled) {
color: var(--link-hover);
text-decoration: underline;
}
.link:disabled {
color: var(--fg-faint);
cursor: default;
}
.dropdownLink {
justify-content: flex-end;
}
/* Title */
.titlePanel {
display: flex;
flex: none;
flex-direction: column;
gap: var(--space-2);
padding: 16px 14px 16px 16px;
}
.titleRow {
display: flex;
align-items: flex-start;
gap: var(--space-2);
}
.title {
flex: 1;
min-width: 0;
margin: 0;
color: var(--fg);
font-size: calc(var(--fs-ui) + 5px);
font-weight: 600;
line-height: 1.3;
overflow-wrap: anywhere;
user-select: text;
}
.number {
color: var(--fg-secondary);
text-decoration: none;
}
.number:hover {
text-decoration: underline;
}
.tag {
margin-top: 4px;
}
/* Commits and branch */
.commitsAndBranches {
display: flex;
flex: none;
align-items: center;
justify-content: space-between;
gap: var(--space-2);
min-width: 0;
padding: 0 14px 4px 16px;
}
.commits {
display: flex;
flex: none;
align-items: center;
gap: var(--space-1);
padding: 6px 0 5px;
}
.branch {
display: flex;
align-items: center;
gap: var(--space-0-5);
min-width: 0;
padding: 6px 0 5px;
}
.branchIcon {
display: inline-flex;
flex: none;
padding: 0;
border: none;
background: none;
color: inherit;
}
.branchLink {
min-width: 0;
}
.branchPopup {
display: flex;
flex-direction: column;
min-width: 200px;
padding-top: 4px;
}
.popupRow {
display: flex;
align-items: center;
height: 100%;
margin: 0 6px;
padding: 0 8px;
border-radius: var(--radius-selection);
white-space: nowrap;
}
.popupRow[data-active] {
background: var(--bg-list-selected);
}
/* JBUI.CurrentTheme.Advertiser */
.advertiser {
display: flex;
align-items: center;
gap: var(--space-1);
margin-top: 4px;
padding: 5px 10px;
border-top: 1px solid var(--border);
background: var(--bg-popup-advertiser);
color: var(--fg-secondary);
font-size: var(--fs-small);
white-space: nowrap;
}
/* Commits popup (CommitRenderer) */
.commitsPopup {
display: flex;
flex-direction: column;
width: 360px;
height: 340px;
overflow: hidden;
resize: both;
}
.popupSearch {
flex: none;
padding: 6px 8px 4px;
}
.commitsList {
flex: 1;
min-height: 0;
padding-bottom: 4px;
}
.popupSeparator {
height: 1px;
margin: 4px 8px;
background: var(--border);
}
.commitRow {
display: flex;
align-items: center;
gap: var(--space-1-5);
height: 100%;
margin: 0 6px;
padding: 0 8px;
border-radius: var(--radius-selection);
overflow: hidden;
}
.commitRow[data-active] {
background: var(--bg-list-selected);
}
.allCommitsRow {
height: 26px;
}
.check {
display: inline-flex;
flex: none;
width: 16px;
align-self: flex-start;
margin-top: 8px;
}
.allCommitsRow .check {
align-self: center;
margin-top: 0;
}
.commitText {
display: flex;
flex: 1;
flex-direction: column;
gap: var(--space-1);
min-width: 0;
}
/* Commit info */
.commitInfo {
display: flex;
flex: none;
flex-direction: column;
gap: var(--space-2);
padding: 0 14px 12px 16px;
}
.commitInfoTop {
display: flex;
align-items: flex-start;
gap: var(--space-2);
}
.commitInfoTitle {
flex: 1;
min-width: 0;
overflow-wrap: anywhere;
user-select: text;
}
.commitDescription {
max-height: 120px;
overflow: auto;
white-space: pre-wrap;
overflow-wrap: anywhere;
user-select: text;
}
/* Changes tree (CodeReviewProgressRenderer: 4px text gap, 10px between counter and dot, 16px right) */
.changes {
display: flex;
flex: 1 1 0;
flex-direction: column;
min-height: 60px;
}
.treePane {
display: contents;
}
.tree {
flex: 1;
min-height: 0;
}
.treeEmpty {
display: flex;
flex: 1;
align-items: center;
justify-content: center;
color: var(--fg-faint);
}
.fileRow {
display: flex;
flex: 1;
align-items: center;
gap: var(--space-1-5);
min-width: 0;
white-space: nowrap;
}
.fileIcon {
flex: none;
}
.fileName {
flex: none;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
}
.fileDir {
min-width: 0;
overflow: hidden;
color: var(--fg-subtle);
text-overflow: ellipsis;
}
.progress {
display: flex;
flex: none;
align-items: center;
gap: 10px;
margin-left: auto;
padding: 0 8px 0 4px;
}
.counter {
display: inline-flex;
align-items: center;
gap: var(--space-1);
color: var(--fg-secondary);
}
.readSlot {
display: inline-flex;
flex: none;
align-items: center;
justify-content: center;
width: 16px;
}
.viewedBox {
display: inline-flex;
align-items: center;
justify-content: center;
width: 14px;
height: 14px;
border: 1px solid var(--border-checkbox);
border-radius: 3px;
background: var(--bg-checkbox);
}
.viewedChecked {
border-color: var(--accent);
background: var(--accent);
color: var(--fg-on-accent);
}
.editSource {
display: inline-flex;
}
.onHover {
display: none;
}
.changeRow:hover .onHover {
display: inline-flex;
}
.changeRow:hover .noHover {
display: none;
}
.noHover {
display: inline-flex;
}
/* Status section */
.status {
display: flex;
flex: none;
flex-direction: column;
max-height: 149px;
margin: 6px 14px 10px 16px;
overflow-x: hidden;
overflow-y: auto;
}
.statusRow {
display: flex;
align-items: center;
gap: var(--space-2);
min-width: 0;
padding: 5px 0;
}
.statusRow > .link {
align-self: center;
}
.reviewerRow {
padding: 3px 0;
}
.statusIcon {
flex: none;
}
.statusText {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* The status label's icon-text gap is 4px. */
.statusRow > .statusIcon + .statusText {
margin-left: -4px;
}
/* Actions (buttons 10px apart) */
.actions {
display: flex;
flex: none;
flex-wrap: wrap;
align-items: center;
gap: 10px;
padding: 0 14px 16px 14px;
}
.more {
flex: none;
}
.progressText {
display: inline-flex;
align-items: center;
gap: var(--space-1-5);
color: var(--fg-secondary);
}
/* JBOptionButton: the main action and an arrow opening the others. */
.optionButton {
display: inline-flex;
flex: none;
}
.optionMain {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.optionArrow {
display: inline-flex;
align-items: center;
justify-content: center;
width: 22px;
height: var(--h-button);
margin-left: -1px;
padding: 0;
border: 1px solid var(--border-button);
border-top-right-radius: var(--radius-control);
border-bottom-right-radius: var(--radius-control);
background: var(--bg-button);
color: var(--fg);
}
.optionArrow:hover {
background: var(--bg-control-hover);
}
/* Submit Review popup (insets 12) */
.submitPopup {
display: flex;
flex-direction: column;
gap: var(--space-2);
width: 500px;
max-width: calc(100vw - 12px);
height: 200px;
max-height: calc(100vh - 12px);
padding: var(--space-3);
overflow: auto;
}
.submitHeader {
display: flex;
flex: none;
align-items: flex-start;
justify-content: space-between;
gap: var(--space-1);
}
.submitHeading {
display: flex;
flex-wrap: wrap;
align-items: baseline;
align-self: center;
gap: var(--space-0-5) var(--space-2);
min-width: 0;
overflow-wrap: anywhere;
}
.submitCount {
color: var(--fg-secondary);
font-size: var(--fs-small);
}
.submitHeaderActions {
display: flex;
flex: none;
align-items: center;
gap: var(--space-1);
}
.submitEditor {
flex: 1;
min-height: 40px;
padding: var(--space-1) var(--space-2);
border: 1px solid var(--border);
border-radius: var(--radius-control);
background: var(--bg-input);
color: var(--fg);
font: inherit;
line-height: var(--lh-code);
resize: none;
outline: none;
}
.submitEditor:focus {
border-color: var(--focus-ring);
}
.submitError {
flex: 0 1 auto;
min-height: 0;
max-height: 35%;
overflow: auto;
overflow-wrap: anywhere;
color: var(--danger);
}
.submitButtons {
display: flex;
flex: none;
flex-wrap: wrap;
align-items: center;
gap: var(--space-1-5);
}
.submitButtons > button {
max-width: 100%;
height: auto;
min-height: var(--h-button);
padding-block: var(--space-1);
line-height: 1.2;
white-space: normal;
overflow-wrap: anywhere;
}