Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improves card dragging at the bottom of the playable area #63

Conversation

clpetersonucf
Copy link
Member

Resolves #62, and by extension #55.

This was tricky since the arrangement of elements meant the desktop (which contains the draggable cards) and the dock (which contains the folders) occupy different stacking contexts, so z-index values were not shared. To function properly, the dock needed to remain "above" the desktop in z-height, but this caused it obfuscate cards behind it.

The solution I came up with was to move the dock element below the playable area, then reposition the folders by the inverse offset so they remain in their previous position. This allows the user to interact with folders normally, but the empty space around them is no longer blocking cards from being dragged.

This also applies overflow:hidden to the body element, which has the potential to resolve the behavior seen in #25 as well.

…osition. Applies linear gradient directly to BG image.
Copy link

@jaadez jaadez left a comment

Choose a reason for hiding this comment

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

Files "jump" back into play area and are still playable around folders and outer edges (around folders and corners).
LGTM 🙂👍

@dmols dmols self-requested a review October 3, 2024 13:54
Copy link

@dmols dmols left a comment

Choose a reason for hiding this comment

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

The cards no longer get stuck and unable to be picked up. I also didn't see the issue from #25 happen anymore, and the addition of resetting the card position works well! The area it needs to hit before a card gets reset seems a little early to me, but that might just be me nitpicking. Great work!

@clpetersonucf clpetersonucf merged commit 1ef862b into ucfopen:master Oct 3, 2024
1 check passed
@clpetersonucf clpetersonucf deleted the issue/55-improved-widget-draggability branch October 3, 2024 19:17
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.

Improve card draggability when behind the dock
3 participants