fix(git): let commit graph fill available sidebar height
Replace the 460px viewport cap with flex allocation. Bound the graph section minimum so long history scrolls internally instead of stretching the outer list. Verify tall and narrow panes, preview selection, folding and long Changes lists in the mounted host.
This commit is contained in:
1 parent
0c7868cc07
commit
38d94bdb98
7 files changed
+79
-7
No files matched your search
@@ -1078,7 +1078,7 @@ export function GitLens(props: GitLensProps) {
|
||||
{snapshot?.truncated === true && <Notice kind="warn">{t('statusTruncated')}</Notice>}
|
||||
|
||||
{isRepo && (
|
||||
<section data-scm-section="changes">
|
||||
<section className={css.changesSection} data-scm-section="changes">
|
||||
<div className={css.scmHeader}>
|
||||
<button type="button" className={css.scmDisclosure} aria-expanded={changesOpen}
|
||||
onClick={() => { setChangesOpen(open => !open) }}>
|
||||
@@ -1150,7 +1150,7 @@ export function GitLens(props: GitLensProps) {
|
||||
</section>
|
||||
)}
|
||||
|
||||
{isRepo && <section data-scm-section="graph">
|
||||
{isRepo && <section className={graphOpen ? css.graphSection : undefined} data-scm-section="graph">
|
||||
<div className={css.scmHeader}>
|
||||
<button type="button" className={css.scmDisclosure} aria-expanded={graphOpen}
|
||||
onClick={() => { setGraphOpen(open => !open) }}>
|
||||
|
||||
@@ -44,12 +44,15 @@
|
||||
min-width: 0;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/* The Graph section's own viewport: the graph keeps ONE scroll box (its rows
|
||||
page in as it reaches the end), so the section is given a bounded height
|
||||
inside the lens's scroller rather than being clipped by it. */
|
||||
.graphArea { display: flex; flex-direction: column; height: min(60vh, 460px); min-height: 220px; }
|
||||
.changesSection { flex: none; }
|
||||
/* Bound the section's minimum, not its maximum: 28px header + 220px viewport.
|
||||
An automatic minimum would let the entire history stretch the outer scroller. */
|
||||
.graphSection { flex: 1; min-height: 248px; display: flex; flex-direction: column; }
|
||||
.graphArea { flex: 1; display: flex; flex-direction: column; min-height: 0; }
|
||||
|
||||
.scmHeader { display: flex; align-items: center; min-height: 28px; padding: 0 6px; }
|
||||
.scmDisclosure { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; min-height: 28px; padding: 0; border: none; background: transparent; color: var(--dsw-alias-label-primary); font: var(--dsw-font-xxs-strong-12); text-align: left; cursor: pointer; }
|
||||
|
||||
Reference in new issue
Block a user