Skip to content

Allow easy reordering within a tier#13

Open
Patertuck wants to merge 7 commits intomainfrom
allow-easy-reordering-within-a-tier
Open

Allow easy reordering within a tier#13
Patertuck wants to merge 7 commits intomainfrom
allow-easy-reordering-within-a-tier

Conversation

@Patertuck
Copy link
Copy Markdown
Collaborator

No description provided.

@Patertuck Patertuck self-assigned this Jan 20, 2026
@Patertuck Patertuck linked an issue Jan 20, 2026 that may be closed by this pull request
@Patertuck Patertuck requested a review from XYQuadrat January 20, 2026 13:32
Comment on lines +305 to +367

<style>
.drop-target {
position: relative;
width: 4px;
min-width: 4px;
height: 64px;
border: 2px dashed transparent;
background-color: transparent;
transition:
width 0.2s ease,
background-color 0.2s ease,
border-color 0.2s ease;
flex-shrink: 0;

display: flex;
align-items: center;
justify-content: center;
}

.drop-target.is-dragging::after {
content: '';
position: absolute;
top: 0;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 60px;
height: 100%;
z-index: 20;
}

.drop-target.is-dragging.drop-hover::after {
width: 120px;
}

.drop-hover {
width: 64px;
background-color: rgba(74, 222, 128, 0.1);
border-color: #4ade80;
}

.full-drop-target {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: flex-start;
border: 2px dashed #ccc;
transition: border-color 0.2s;
padding-left: 4px;
}

.full-drop-target:hover {
border-color: #4ade80;
}

.drop-expand {
flex-grow: 1;
justify-content: flex-start;
padding-left: 4px;
}
</style> No newline at end of file
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of this could probably be done with Tailwind classes instead.

ondrop={() => handleDrop('uploaded', uploadedImages.length)}
role="listitem"
>
{#if activeDropTarget?.tier === 'uploaded' && activeDropTarget?.index === uploadedImages.length && draggedImage && (draggedFrom !== 'uploaded' || (draggedIndex !== uploadedImages.length && draggedIndex !== uploadedImages.length - 1))}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this condition be a little bit cleaner, maybe by moving it into a function or something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow easy reordering within a tier

2 participants