Merge pull request #14470 from desktop/fix-long-list-conflicts

Make long lists of files scrollable within dialogs
This commit is contained in:
Sergio Padrino 2022-04-28 15:32:31 +02:00 committed by GitHub
commit 24db7e1f22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 35 additions and 23 deletions

View file

@ -137,13 +137,15 @@ export class DiscardChanges extends React.Component<
return ( return (
<div> <div>
<p>Are you sure you want to discard all changes to:</p> <p>Are you sure you want to discard all changes to:</p>
<ul> <div className="file-list">
{this.props.files.map(p => ( <ul>
<li key={p.id}> {this.props.files.map(p => (
<PathText path={p.path} /> <li key={p.id}>
</li> <PathText path={p.path} />
))} </li>
</ul> ))}
</ul>
</div>
</div> </div>
) )
} }

View file

@ -1,12 +1,17 @@
#discard-changes { #discard-changes {
.dialog-content ul { .dialog-content .file-list {
list-style: none; max-height: 175px;
margin: var(--spacing) 0; overflow-y: auto;
padding: 0;
li { ul {
padding-left: 0; list-style: none;
margin-bottom: 0; margin: var(--spacing) 0;
padding: 0;
li {
padding-left: 0;
margin-bottom: 0;
}
} }
} }

View file

@ -1,14 +1,19 @@
#commit-conflict-markers-warning { #commit-conflict-markers-warning {
.dialog-content ul { .dialog-content .conflicted-files-text {
list-style: none; max-height: 175px;
margin: 0; overflow-y: auto;
padding: 0;
margin-bottom: var(--spacing);
li { ul {
padding-left: 0; list-style: none;
margin-bottom: 0; margin: 0;
font-family: var(--font-family-monospace); padding: 0;
margin-bottom: var(--spacing);
li {
padding-left: 0;
margin-bottom: 0;
font-family: var(--font-family-monospace);
}
} }
} }
} }