Some quick UI fixes for the new dropzones (#4146)

There were a few UI bugs including:
- overflow issues
- the sticky commit button stopped sticking
This commit is contained in:
Pavel Laptev 2024-06-21 13:46:23 +02:00 committed by GitHub
parent ffaffe6cde
commit 39542b82d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 17 additions and 37 deletions

View File

@ -285,15 +285,14 @@
.new-branch,
.no-changes {
flex-grow: 1;
user-select: none;
display: flex;
height: 100%;
flex-direction: column;
align-items: center;
color: var(--clr-scale-ntrl-60);
background: var(--clr-bg-1);
justify-content: center;
border-radius: var(--radius-m);
cursor: default; /* was defaulting to text cursor */
}

View File

@ -18,10 +18,8 @@
const actions = $derived(branchDragActionsFactory.build($branch));
</script>
<div class="commit-list-item">
<div class="commit-card-wrapper">
{@render moveCommitDropzone()}
</div>
<div class="dragzone-wrapper">
{@render moveCommitDropzone()}
</div>
<!-- We require the dropzones to be nested -->
@ -54,19 +52,12 @@
{/snippet}
<style>
.commit-list-item {
.dragzone-wrapper {
display: flex;
flex-direction: column;
position: relative;
padding: 0;
gap: 8px;
flex-grow: 1;
overflow: hidden;
&:last-child {
padding-bottom: 0;
}
}
.commit-card-wrapper {
position: relative;
width: 100%;
/* overflow: hidden; */
}
</style>

View File

@ -24,14 +24,12 @@
});
</script>
<div class="commit-list-item">
<div class="commit-card-wrapper">
{#if actions}
{@render ammendDropzone()}
{:else}
{@render children()}
{/if}
</div>
<div class="dropzone-wrapper">
{#if actions}
{@render ammendDropzone()}
{:else}
{@render children()}
{/if}
</div>
<!-- We require the dropzones to be nested -->
@ -56,19 +54,9 @@
{/snippet}
<style>
.commit-list-item {
display: flex;
position: relative;
padding: 0;
gap: 8px;
flex-grow: 1;
overflow: hidden;
&:last-child {
padding-bottom: 0;
}
}
.commit-card-wrapper {
.dropzone-wrapper {
position: relative;
width: 100%;
overflow: hidden;
}
</style>

View File

@ -63,6 +63,8 @@
<style lang="postcss">
.fill-height {
height: 100%;
display: flex;
flex-direction: column;
flex-grow: 1;
}
</style>